nextjs 6,000 Q&As Showing 6,000 of 7,307

Next.js FAQ & Answers

6000 expert Next.js answers researched from official documentation. Every answer cites authoritative sources you can verify.

Jump to section:

Upgrading > Version-Specific Migration Guides (91) Configuration > Routing & Navigation (83) TypeScript > Framework Type Definitions (64) Caching and Revalidating > Cache Configuration (64) Caching and Revalidating > Caching APIs and Functions (62) Routing > Navigation (62) Turbopack (56) Upgrading > Feature Deprecations & Removals (56) Upgrading > API Breaking Changes (54) Layouts and Pages > Navigation and Linking (53) Deploying > Server-Based Deployment (52) Rendering Strategies > Caching and Revalidation Approaches (52) Caching and Revalidating > Rendering Strategies (51) Analytics (50) Forms and Mutations > Data Handling (50) Metadata and SEO > Platform-Specific Features (47) Server Actions > Navigation and Response (46) Forms and Mutations > Cache and Data Revalidation (46) Routing > Route Definition (45) Configuration > Caching & Data Management (45) Layouts and Pages > Dynamic Routing (45) Caching and Revalidating > Cache Mechanisms (45) Layouts and Pages > Layout Patterns and Composition (45) Rendering Strategies > Performance Optimization Techniques (44) Upgrading > Configuration & Package Reorganization (44) Layouts and Pages > Route Structure and Nesting (43) Testing > Testing Strategies (43) Server Actions > Data Management (43) OpenTelemetry (43) Configuration > Project Structure & Format (43) Forms and Mutations > Navigation and Side Effects (42) Routing > Backend Integration (42) TypeScript > Data Fetching Types (41) TypeScript > Routing and Navigation Types (41) Routing > Advanced Routing Patterns (41) Metadata and SEO > Basic SEO Metadata (41) Caching and Revalidating > Revalidation Methods (41) Upgrading > Build System & Bundler Updates (41) Route Handlers > Advanced Integration Patterns (40) Rendering Strategies > Dynamic Content Handling (39) Project Structure > Routing Conventions (39) Project Structure > Advanced Routing Patterns (39) Image Optimization > Caching and Delivery (39) Upgrading > Upgrade Methods & Tooling (39) Configuration > Performance & Optimization (39) Caching and Revalidating > Cache Interactions (39) Image Optimization > Performance Optimization (38) Data Fetching > Fetching Strategies (38) Installation (38) Authentication > Session Management Strategies (38) Layouts and Pages > Page and Layout Creation (38) Authentication > Core Authentication Concepts (37) Authentication > Implementation Layers (37) Route Handlers > Request Processing (37) Configuration > Security & Server Configuration (36) Data Fetching > Data Security & Configuration (36) TypeScript > TypeScript Setup and Configuration (36) Configuration > Assets & Resources (36) Static Exports (36) Routing > User Experience States (35) Routing > Dynamic & Data-Driven Routing (35) Image Optimization > Image Source Configuration (34) Route Handlers > Response Generation (34) Authentication > Security Best Practices (34) Prefetching (34) Middleware > Setup & Configuration (34) Configuration > Type Safety & Code Quality (34) Progressive Web Apps (33) Metadata and SEO > Dynamic Image Generation (33) Testing > Next.js-Specific Testing Considerations (33) TypeScript > Type Checking and Validation (33) Metadata and SEO > Implementation Approaches (33) Rendering Strategies > Rendering Timing Strategies (33) Edge Runtime > Security & Execution Restrictions (32) Linking and Navigating > Performance Troubleshooting (32) Middleware > Advanced Features & Flags (32) Route Segment Config > Rendering and Caching Control (32) Package Bundling (32) Data Fetching > Caching & Deduplication (32) Edge Runtime > Runtime Configuration (32) Routing > Request Processing (31) Rendering Strategies > Execution Environment (31) Configuration > Development Tools (31) Authentication > Authorization Patterns (31) Project Structure > Configuration Files (31) Forms and Mutations > Server Function Fundamentals (30) Server and Client Components > Data Flow and Props (30) Authentication > Authentication Libraries & Providers (30) Next.js Compiler (30) Project Structure > Top-level Structure (30) Metadata and SEO > File-Based Assets (30) Testing > Testing Tools & Frameworks (29) MDX (29) Partial Prerendering (29) Project Structure > Metadata & Assets (29) Metadata and SEO > Social Media Integration (29) unknown (29) Image Optimization > Styling and Presentation (29) Styling > Utility Frameworks (28) Middleware > Execution Context & Lifecycle (28) Server and Client Components > Code Separation and Security (28) Layouts and Pages > Type Safety and Props (28) Linking and Navigating > Link Component Configuration (28) Routing > Internationalization (28) Rendering Strategies > Component-Level Architecture (28) Environment Variables (28) Image Optimization > Layout and Sizing (28) Error Handling > Uncaught Exception Handling (27) Data Fetching > Progressive Rendering (27) Image Optimization > Security and Access Control (27) Data Fetching > Fetch Patterns (27) Instrumentation (27) Linking and Navigating > Performance Optimization (27) Server Actions > Invocation Methods (27) Styling > External Integrations (26) Scripts (26) Linking and Navigating > Navigation Mechanisms (26) Upgrading > React Integration Updates (26) Route Segment Config > Runtime and Deployment (26) Metadata and SEO > URL and Path Configuration (26) TypeScript > IDE Integration and Tooling (26) Project Structure > File Colocation Strategies (26) Layouts and Pages > Data Access Patterns (25) Forms and Mutations > Definition and Setup Patterns (25) Content Security Policy (25) Edge Runtime > API Compatibility (25) Error Handling > Server-Side Error Handling (25) Server and Client Components > Third-Party Integration (25) Linking and Navigating > Navigation Behavior Control (25) Multi-Zones (24) Deploying > Static Hosting (24) Edge Runtime > Runtime Characteristics (24) Edge Runtime > Feature Support (24) Error Handling > Expected Error Handling (24) Font Optimization (24) Route Segment Config > Dynamic Route Behavior (24) Route Handlers > HTTP Method Handling (24) Server and Client Components > Rendering and Execution Model (24) Server Actions > Error Handling (24) Forms and Mutations > State and UI Management (24) Loading UI and Streaming > HTTP Status and Error Handling (23) TypeScript > Component Type Safety (23) Image Optimization > Loading States and Placeholders (23) Route Handlers > Route Configuration (23) Middleware > Request/Response Manipulation (23) Server Actions > Configuration and Security (22) Upgrading > Runtime & Environment Requirements (22) ESLint (22) Styling > CSS-in-JS Solutions (22) Internationalization > Routing Strategy (22) Server and Client Components > Component Type Decision Criteria (22) Edge Runtime > Use Cases & Trade-offs (22) Internationalization > SEO & Metadata (22) Internationalization > Locale Configuration (22) Deploying > Containerized Deployment (22) Server and Client Components > Component Composition Patterns (22) Deploying > Platform Adapters (21) Server and Client Components > Client Component Boundaries (21) Error Handling > Client-Side Error Handling (21) Loading UI and Streaming > Streaming Behavior (20) Fast Refresh (20) Server Actions > UI State Integration (20) Static Assets (20) Middleware > Path Matching & Routing Control (20) Draft Mode (20) Loading UI and Streaming > Deployment and Platform Support (19) Forms and Mutations > Invocation Methods (19) Loading UI and Streaming > Loading State Implementation (19) Error Handling > Error Boundary Hierarchy (19) Styling > Native CSS Approaches (17) Intercepting Routes (17) Server Actions > Definition and Convention (17) Internationalization > Content Localization (17) Internationalization > Static Generation & Rendering (16) Accessibility (16) Metadata and SEO > Metadata Composition (16) Styling > CSS Preprocessors (14) Loading UI and Streaming > SEO and Crawler Considerations (14) Route Handlers > Caching & Rendering Behavior (14) optimization (12) metadata_seo (10) Lazy Loading (10) error_handling (9) caching_revalidation (8) image_optimization (8) experimental_features (8) server_actions (8) middleware_authentication (7) deployment (7) turbopack (7) integration_patterns (7) migration_pages_to_app (7) dynamic_routes (7) route_handlers (7) nextjs_15_features (6) middleware (6) environment_variables (6) advanced_routing (6) rendering_strategies (6) database_integration (5) streaming_suspense (5) common_errors (4) nextjs_15_breaking_changes (4) content_management (4) composition_patterns (3) font_optimization (3) nextjs_app_router (2) state_management (2) observability (2) client_boundary (2) debugging (2) routing_navigation (2) seo_metadata (2) advanced_caching (2) nextjs_bugs (1) security (1) streaming_ssr (1) routing_patterns (1) cms_integration (1) testing (1) data_fetching (1) api_security (1) runtime_deployment (1) build_optimization (1) static_generation (1) internationalization (1) app_router_gotchas (1) migration (1) forms (1) static_export (1) performance_scripts (1)

Upgrading > Version-Specific Migration Guides

91 questions

Configuration > Routing & Navigation

83 questions
A

It refreshes the current route by making a new request to the server, re-fetching data requests, and re-rendering Server Components. The client merges the updated payload without losing unaffected client-side state (useState) or browser state (scroll position).

Sources
95% confidence
A

An array of objects where each object represents populated dynamic segments. The structure varies by route type: single segment returns { id: string }[], multiple segments returns { category: string, product: string }[], and catch-all returns { slug: string[] }[].

Sources
95% confidence
A

It always renders dynamically. Setting revalidate to 0 ensures the route is never cached and is rendered fresh for each request.

Sources
95% confidence
A

An array of strings containing the active segments one level down from the layout the hook was called from. It returns all segments, unlike useSelectedLayoutSegment which returns only the first.

Sources
95% confidence

TypeScript > Framework Type Definitions

64 questions

Caching and Revalidating > Cache Configuration

64 questions
A

revalidatePath can be called in Server Functions and Route Handlers but cannot be called in Client Components or Proxy, as it only works in server environments.

Sources
95% confidence
A

Next.js looks for a matching request in its Data Cache. If the match is fresh, it will be returned from the cache. If there is no match or the match is stale, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource.

Sources
95% confidence
A

dynamic: 'force-dynamic' forces dynamic rendering, which results in routes being rendered for each user at request time. It is equivalent to setting every fetch() request in a layout or page to { cache: 'no-store', next: { revalidate: 0 } }.

Sources
95% confidence
A

With profile='max', data is marked as stale, and the next time a resource with that tag is visited, it will use stale-while-revalidate semantics, serving cached content while fetching fresh data in the background.

Sources
95% confidence
A

revalidateTag can only be called in Server Functions and Route Handlers. It cannot be invoked in Client Components or Proxy, as it only works in server environments.

Sources
95% confidence

Caching and Revalidating > Caching APIs and Functions

62 questions
A

updateTag can only be called from within Server Actions. It cannot be used in Route Handlers, Client Components, or other contexts.

Sources
95% confidence
A

The three cache options are: 'auto' (default - caches during build for static routes, fetches on every request in dev), 'no-store' (fetches from remote server on every request), and 'force-cache' (returns fresh cached matches, fetches and updates cache if missing or stale).

Sources
95% confidence

Routing > Navigation

62 questions
A

It refreshes the current route, making a new request to the server, re-fetching data requests, and re-rendering Server Components. Client-side state (useState) and browser state (scroll position) are preserved.

Sources
95% confidence

Turbopack

56 questions
A

No, StyleX is not currently supported. It requires a Babel transform and support for data: attributes. The team plans to investigate support after next build --turbo is stable.

Sources
95% confidence

Upgrading > Feature Deprecations & Removals

56 questions

Upgrading > API Breaking Changes

54 questions

Layouts and Pages > Navigation and Linking

53 questions

Deploying > Server-Based Deployment

52 questions

Rendering Strategies > Caching and Revalidation Approaches

52 questions

Caching and Revalidating > Rendering Strategies

51 questions
A
  1. Request Memoization - deduplicates identical fetch calls within a single render pass, 2) Data Cache - persists data fetches across server requests and deployments, 3) Full Route Cache - stores rendered HTML and RSC payload at build time, 4) Router Cache - client-side in-memory storage of RSC payloads.
Sources
95% confidence

Analytics

50 questions
A

Vercel Web Analytics collects: event timestamp, URL and dynamic path, referrer information, filtered query parameters, geolocation (country, state, city level), device OS and version, browser and version, device type (mobile, desktop, tablet), and Web Analytics script version.

Sources
95% confidence
A

Next.js provides three custom metrics: Next.js-hydration (time for the page to start and finish hydrating in ms), Next.js-route-change-to-render (time for a page to start rendering after a route change in ms), and Next.js-render (time for a page to finish render after a route change in ms).

Sources
95% confidence
A

Vercel calculates scores using HTTP Archive real-world data, mapping metric values to 0-100 scores based on log-normal distributions derived from actual website performance data.

Sources
95% confidence
A

No, Vercel Web Analytics allows you to track website traffic without using any third-party cookies. Users are identified by a hash created from the incoming request.

Sources
95% confidence

Forms and Mutations > Data Handling

50 questions
A

useOptimistic returns an array with two elements: [optimisticState, addOptimistic] where optimisticState is the resulting state and addOptimistic is a function to update the optimistic value.

Sources
95% confidence

Metadata and SEO > Platform-Specific Features

47 questions
A

Supported fields are: url (required, the page address), lastModified (timestamp as string or Date object), changeFrequency, priority (numeric 0-1 range), alternates (object with language variations), images (array of image URLs), and videos (array of video metadata objects).

Sources
95% confidence

Server Actions > Navigation and Response

46 questions

Forms and Mutations > Cache and Data Revalidation

46 questions
A

updateTag can only be called from within Server Actions. It cannot be used in Route Handlers, Client Components, or any other context.

Sources
95% confidence
A

revalidateTag purges cache entries in the Data Cache associated with that tag, invalidates the Full Route Cache as a consequence, and invalidates the Router Cache only when used in Server Actions (not in Route Handlers).

Sources
95% confidence

Routing > Route Definition

45 questions
A

Templates remount when their own segment (including dynamic params) changes or when child segments at their level change. They do NOT remount when navigations occur in deeper/child segments or when search parameters change.

Sources
95% confidence
A

default.js accepts an optional params prop—a promise that resolves to an object containing the dynamic route parameters from the root segment down to the slot's subpages.

Sources
95% confidence

Configuration > Caching & Data Management

45 questions

Layouts and Pages > Dynamic Routing

45 questions
A

Paths not generated at build time will not result in a 404. Instead, Next.js serves a fallback version of the page on first request while generating the page in the background. router.isFallback will be true during this state.

Sources
95% confidence

Caching and Revalidating > Cache Mechanisms

45 questions
A

Next.js implements four distinct caching layers: Request Memoization (server-side, per-request lifecycle), Data Cache (server-side, persistent across requests/deployments), Full Route Cache (server-side, persistent HTML and RSC payload), and Router Cache (client-side, session or time-based).

Sources
95% confidence
A

Request Memoization lasts only during a single render pass. Memory is cleared after the rendering completes, meaning it only lasts the lifetime of a server request.

Sources
95% confidence

Layouts and Pages > Layout Patterns and Composition

45 questions
A

By default, layouts in the folder hierarchy are nested, which means parent layouts wrap child layouts via their children prop. For example, the root layout (app/layout.js) would wrap the blog layout (app/blog/layout.js), which would wrap the blog pages.

Sources
95% confidence

Rendering Strategies > Performance Optimization Techniques

44 questions
A

If an error is thrown while attempting to revalidate data, the last successfully generated data will continue to be served from the cache. On the next subsequent request, Next.js will retry revalidating the data.

Sources
95% confidence
A

It ensures all fetch requests opt out of caching by setting the cache option of all fetch requests to 'no-store'. This forces all fetch requests to be re-fetched every request even if they provide a 'force-cache' option.

Sources
95% confidence

Upgrading > Configuration & Package Reorganization

44 questions

Layouts and Pages > Route Structure and Nesting

43 questions
A

No. Layouts cannot access or update query parameters (searchParams). To handle dynamic data on navigation, use Client Components with hooks like useSearchParams().

Sources
95% confidence

Testing > Testing Strategies

43 questions
A

Unit Testing focuses on testing individual units (or blocks of code) in isolation, where a unit can be a single function, hook, or component. Component Testing is a more focused version of unit testing where the primary subject is React components, testing how they render, interact with props, and behave in response to user events.

Sources
95% confidence
A

next/jest automatically: (1) sets up transform using the Next.js Compiler, (2) loads .env files into process.env, (3) loads next.config.js for flags that enable SWC transforms, (4) ignores node_modules and .next from test resolving, and (5) auto-mocks stylesheets, images, and next/font.

Sources
95% confidence

Server Actions > Data Management

43 questions
A

Two locations: (1) At the top of an async function to mark only that function as a Server Action, or (2) at the top of a file to mark all exports of that file as Server Actions. File-level placement is required when using Server Actions in Client Components.

Sources
95% confidence

OpenTelemetry

43 questions

Configuration > Project Structure & Format

43 questions
A

It receives: 1) children (required) - to render nested route segments, and 2) params (optional) - a promise resolving to dynamic route parameters that must be awaited.

Sources
95% confidence
A

No. You should NOT manually add tags such as and <meta> to root layouts. Instead, use the Metadata API which handles advanced requirements like streaming.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gDFf0" prefix="r1563" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13831996554810272397"],"question":[0,"Where can the favicon.ico file be located?"],"answer":[0,"The favicon image can ONLY be located in the top level of app/ directory - it cannot be placed in subdirectories."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-the-favicon-ico-file-be-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-the-favicon-ico-file-be-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-the-favicon-ico-file-be-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can the favicon.ico file be located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The favicon image can ONLY be located in the top level of app/ directory - it cannot be placed in subdirectories.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Za8QUg" prefix="r1564" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14030482248798228689"],"question":[0,"What is the syntax for creating a route group folder?"],"answer":[0,"Wrap the folder name in parentheses: `(folderName)`. This indicates the folder is for organizational purposes and should not be included in the route's URL path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-creating-a-route-group-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-creating-a-route-group-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-creating-a-route-group-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for creating a route group folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap the folder name in parentheses: <code>(folderName)</code>. This indicates the folder is for organizational purposes and should not be included in the route's URL path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nBvdl" prefix="r1565" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14065433236724737375"],"question":[0,"In what order does Next.js prioritize file extensions when resolving files?"],"answer":[0,"The default order is: `.tsx`, `.ts`, `.jsx`, `.js` (TypeScript extensions take priority over JavaScript)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-order-does-next-js-prioritize-file-extensions-when-resolving-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-order-does-next-js-prioritize-file-extensions-when-resolving-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-order-does-next-js-prioritize-file-extensions-when-resolving-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what order does Next.js prioritize file extensions when resolving files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default order is: <code>.tsx</code>, <code>.ts</code>, <code>.jsx</code>, <code>.js</code> (TypeScript extensions take priority over JavaScript).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JdkUK" prefix="r1566" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14650338482615445664"],"question":[0,"Must error.js files be Client Components?"],"answer":[0,"Yes. Error boundaries must be Client Components - they require the 'use client' directive at the top of the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-js-files-be-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-js-files-be-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-js-files-be-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.js files be Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Error boundaries must be Client Components - they require the 'use client' directive at the top of the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cCYSB" prefix="r1567" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15091780175915873113"],"question":[0,"Can route.js and page.js coexist in the same folder?"],"answer":[0,"No. There cannot be a route.js file at the same route segment level as page.js - this creates a conflict."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-route-js-and-page-js-coexist-in-the-same-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-route-js-and-page-js-coexist-in-the-same-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-route-js-and-page-js-coexist-in-the-same-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can route.js and page.js coexist in the same folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. There cannot be a route.js file at the same route segment level as page.js - this creates a conflict.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="forms-and-mutations-navigation-and-side-effects" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Forms and Mutations > Navigation and Side Effects</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 42 questions </span> </div> <div class="space-y-4"> <astro-island uid="ViqIB" prefix="r1568" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"21237024808917486"],"question":[0,"Can revalidateTag() be called in Client Components?"],"answer":[0,"No. revalidateTag() can be called in Server Actions and Route Handlers, but cannot be called in Client Components or Proxy environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"can-revalidatetag-be-called-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-revalidatetag-be-called-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-revalidatetag-be-called-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can revalidateTag() be called in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. revalidateTag() can be called in Server Actions and Route Handlers, but cannot be called in Client Components or Proxy environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="28H9B3" prefix="r1569" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"398060334355509031"],"question":[0,"Is useFormState deprecated in React 19?"],"answer":[0,"Yes. The useFormState hook is still available in React 19, but it is deprecated and will be removed in a future release. useActionState is recommended instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"is-useformstate-deprecated-in-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-useformstate-deprecated-in-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-useformstate-deprecated-in-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is useFormState deprecated in React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The useFormState hook is still available in React 19, but it is deprecated and will be removed in a future release. useActionState is recommended instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1wy3Ln" prefix="r1570" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1250243249903718001"],"question":[0,"What happens to the UI after setting or deleting a cookie in a Server Action?"],"answer":[0,"Next.js re-renders the current page and its layouts on the server so the UI reflects the new cookie value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-ui-after-setting-or-deleting-a-cookie-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-ui-after-setting-or-deleting-a-cookie-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-ui-after-setting-or-deleting-a-cookie-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the UI after setting or deleting a cookie in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js re-renders the current page and its layouts on the server so the UI reflects the new cookie value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JFb0V" prefix="r1571" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1429033232510248947"],"question":[0,"What value does revalidateTag() return?"],"answer":[0,"void (no return value). The function returns nothing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-revalidatetag-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-revalidatetag-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-revalidatetag-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does revalidateTag() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>void (no return value). The function returns nothing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cPMQk" prefix="r1572" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1882159700077998950"],"question":[0,"What HTTP status code does permanentRedirect() return when called in a Server Action?"],"answer":[0,"303. When permanentRedirect() is invoked within Server Actions, it serves a 303 HTTP redirect response. Otherwise, it serves a 308 (Permanent) HTTP redirect response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/permanentRedirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-permanentredirect-return-when-called-in-a-server-acti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-permanentredirect-return-when-called-in-a-server-acti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-permanentredirect-return-when-called-in-a-server-acti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does permanentRedirect() return when called in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol start="303"> <li>When permanentRedirect() is invoked within Server Actions, it serves a 303 HTTP redirect response. Otherwise, it serves a 308 (Permanent) HTTP redirect response.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/permanentRedirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26W65I" prefix="r1573" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1971139410011235546"],"question":[0,"What is the difference in revalidatePath() behavior between Route Handlers and Server Actions?"],"answer":[0,"In Route Handlers, revalidation is done on the next visit to the specified path. In Server Actions, it updates the UI immediately if viewing the affected path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-in-revalidatepath-behavior-between-route-handlers-and-ser"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-in-revalidatepath-behavior-between-route-handlers-and-ser" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-in-revalidatepath-behavior-between-route-handlers-and-ser" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference in revalidatePath() behavior between Route Handlers and Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Route Handlers, revalidation is done on the next visit to the specified path. In Server Actions, it updates the UI immediately if viewing the affected path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jQAKk" prefix="r1574" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2013003780661783319"],"question":[0,"What value does revalidatePath() return?"],"answer":[0,"void (no return value). The function does not return anything."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-revalidatepath-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-revalidatepath-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-revalidatepath-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does revalidatePath() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>void (no return value). The function does not return anything.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CETR" prefix="r1575" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2082297583834625801"],"question":[0,"What import statement is needed to use useOptimistic with Server Actions?"],"answer":[0,"import { useOptimistic } from 'react'. The hook is imported from React and must be used in a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-import-statement-is-needed-to-use-useoptimistic-with-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-import-statement-is-needed-to-use-useoptimistic-with-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-import-statement-is-needed-to-use-useoptimistic-with-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What import statement is needed to use useOptimistic with Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import { useOptimistic } from 'react'. The hook is imported from React and must be used in a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MYLW1" prefix="r1576" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2230367142355950688"],"question":[0,"Must useFormStatus be used in a Client Component or Server Component?"],"answer":[0,"Client Component. useFormStatus is a React DOM hook and must be used in Client Components (marked with 'use client')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"must-useformstatus-be-used-in-a-client-component-or-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-useformstatus-be-used-in-a-client-component-or-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-useformstatus-be-used-in-a-client-component-or-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must useFormStatus be used in a Client Component or Server Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Client Component. useFormStatus is a React DOM hook and must be used in Client Components (marked with 'use client').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1qeWrv" prefix="r1577" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2588339935864988110"],"question":[0,"What is the default value of the replace prop on the Next.js Form component?"],"answer":[0,"false. The replace prop defaults to false, meaning it will push a new entry to the browser's history stack instead of replacing the current state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-replace-prop-on-the-next-js-form-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-replace-prop-on-the-next-js-form-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-replace-prop-on-the-next-js-form-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the replace prop on the Next.js Form component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false. The replace prop defaults to false, meaning it will push a new entry to the browser's history stack instead of replacing the current state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZllnFp" prefix="r1578" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2618567329414302046"],"question":[0,"Does code after redirect() execute in a Server Action?"],"answer":[0,"No. Calling redirect() throws a framework-handled control-flow exception, so any code after it won't execute."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"does-code-after-redirect-execute-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-code-after-redirect-execute-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-code-after-redirect-execute-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does code after redirect() execute in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Calling redirect() throws a framework-handled control-flow exception, so any code after it won't execute.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PwYHs" prefix="r1579" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2634184428331448216"],"question":[0,"What formats does the bodySizeLimit configuration accept?"],"answer":[0,"It accepts the number of bytes or any string format supported by bytes, such as 1000, '500kb', or '3mb'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-formats-does-the-bodysizelimit-configuration-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-formats-does-the-bodysizelimit-configuration-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-formats-does-the-bodysizelimit-configuration-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What formats does the bodySizeLimit configuration accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It accepts the number of bytes or any string format supported by bytes, such as 1000, '500kb', or '3mb'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZeP0RK" prefix="r1580" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3122740659240081879"],"question":[0,"What is the default value of the prefetch prop on the Next.js Form component?"],"answer":[0,"true. The prefetch prop defaults to true, meaning the path will be prefetched when the form becomes visible in the user's viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-form-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-form-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-form-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the prefetch prop on the Next.js Form component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The prefetch prop defaults to true, meaning the path will be prefetched when the form becomes visible in the user's viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hWbYG" prefix="r1581" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3156350747127519194"],"question":[0,"How do Client Components handle Server Action form submissions when JavaScript isn't loaded?"],"answer":[0,"Forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-client-components-handle-server-action-form-submissions-when-javascript-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-client-components-handle-server-action-form-submissions-when-javascript-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-client-components-handle-server-action-form-submissions-when-javascript-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do Client Components handle Server Action form submissions when JavaScript isn't loaded?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aTkqR" prefix="r1582" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3223284172919993440"],"question":[0,"What is the maximum character length for the 'path' parameter in revalidatePath()?"],"answer":[0,"1024 characters. The path parameter must not exceed 1024 characters and is case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the 'path' parameter in revalidatePath()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 characters. The path parameter must not exceed 1024 characters and is case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="p9Fma" prefix="r1583" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3265480064613110571"],"question":[0,"Should redirect() be called inside or outside a try/catch block?"],"answer":[0,"Outside. redirect() throws an error so it should be called outside the try block when using try/catch statements."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"should-redirect-be-called-inside-or-outside-a-try-catch-block"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-redirect-be-called-inside-or-outside-a-try-catch-block" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-redirect-be-called-inside-or-outside-a-try-catch-block" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should redirect() be called inside or outside a try/catch block?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Outside. redirect() throws an error so it should be called outside the try block when using try/catch statements.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jHorC" prefix="r1584" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3541567147185408003"],"question":[0,"What is the function signature for revalidateTag() including the profile parameter?"],"answer":[0,"revalidateTag(tag: string, profile: string | { expire?: number }): void. The profile parameter specifies revalidation behavior—either 'max' (recommended), another cache life profile, or an object with an expire property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-function-signature-for-revalidatetag-including-the-profile-parameter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-function-signature-for-revalidatetag-including-the-profile-parameter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-function-signature-for-revalidatetag-including-the-profile-parameter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the function signature for revalidateTag() including the profile parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidateTag(tag: string, profile: string | { expire?: number }): void. The profile parameter specifies revalidation behavior—either 'max' (recommended), another cache life profile, or an object with an expire property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nO7tT" prefix="r1585" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4060034350355528152"],"question":[0,"Can updateTag() be used in Route Handlers?"],"answer":[0,"No. updateTag() is exclusively for Server Actions. If you need to invalidate cache tags in Route Handlers, use revalidateTag() instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"can-updatetag-be-used-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-updatetag-be-used-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-updatetag-be-used-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can updateTag() be used in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. updateTag() is exclusively for Server Actions. If you need to invalidate cache tags in Route Handlers, use revalidateTag() instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aWAGn" prefix="r1586" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4480937293747563678"],"question":[0,"Does the 'type' parameter have any effect when redirect() is used in Server Components?"],"answer":[0,"No. The type parameter has no effect when used in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-type-parameter-have-any-effect-when-redirect-is-used-in-server-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-type-parameter-have-any-effect-when-redirect-is-used-in-server-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-type-parameter-have-any-effect-when-redirect-is-used-in-server-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the 'type' parameter have any effect when redirect() is used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The type parameter has no effect when used in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zfmegx" prefix="r1587" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4704733650107946004"],"question":[0,"How does updateTag() differ from revalidateTag() in cache invalidation behavior?"],"answer":[0,"updateTag() immediately expires cached data and waits for fresh data (read-your-own-writes pattern), while revalidateTag() uses stale-while-revalidate semantics with profile='max', serving stale content while fetching fresh data in the background."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-updatetag-differ-from-revalidatetag-in-cache-invalidation-behavior"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-updatetag-differ-from-revalidatetag-in-cache-invalidation-behavior" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-updatetag-differ-from-revalidatetag-in-cache-invalidation-behavior" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does updateTag() differ from revalidateTag() in cache invalidation behavior?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateTag() immediately expires cached data and waits for fresh data (read-your-own-writes pattern), while revalidateTag() uses stale-while-revalidate semantics with profile='max', serving stale content while fetching fresh data in the background.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EW7kh" prefix="r1588" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4828204265230888205"],"question":[0,"What properties does the useFormStatus hook return?"],"answer":[0,"It returns an object with four properties: pending (boolean), data (FormData object or null), method (string: 'get' or 'post'), and action (function reference or null)."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-the-useformstatus-hook-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-the-useformstatus-hook-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-the-useformstatus-hook-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does the useFormStatus hook return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It returns an object with four properties: pending (boolean), data (FormData object or null), method (string: 'get' or 'post'), and action (function reference or null).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="VWSvx" prefix="r1589" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5427107638715810214"],"question":[0,"Where can updateTag() be called?"],"answer":[0,"Only within Server Actions. updateTag() can only be called from within Server Actions, not in Route Handlers, Client Components, or any other context."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-updatetag-be-called"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-updatetag-be-called" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-updatetag-be-called" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can updateTag() be called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only within Server Actions. updateTag() can only be called from within Server Actions, not in Route Handlers, Client Components, or any other context.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oWkBH" prefix="r1590" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5639541233338983162"],"question":[0,"What value does redirect() return?"],"answer":[0,"redirect does not return a value. It throws an error to interrupt execution."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-redirect-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-redirect-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-redirect-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does redirect() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect does not return a value. It throws an error to interrupt execution.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2x4Sme" prefix="r1591" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7063487530860448403"],"question":[0,"What HTTP status code does redirect() return when called in a Server Action?"],"answer":[0,"303 (See Other). When used in a Server Action, redirect() serves a 303 HTTP redirect response, which is commonly used for redirecting to a success page as a result of a POST request. Outside of Server Actions, it serves a 307 (Temporary) HTTP redirect response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-when-called-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-when-called-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-when-called-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return when called in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>303 (See Other). When used in a Server Action, redirect() serves a 303 HTTP redirect response, which is commonly used for redirecting to a success page as a result of a POST request. Outside of Server Actions, it serves a 307 (Temporary) HTTP redirect response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25Nfov" prefix="r1592" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7945536490204797794"],"question":[0,"What does revalidatePath with type='layout' invalidate compared to type='page'?"],"answer":[0,"type='layout' invalidates the layout, all nested layouts beneath it, and all pages beneath them. type='page' will not invalidate pages beneath the specific page (e.g., /blog/[slug] won't invalidate /blog/[slug]/[author])."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatepath-with-type-layout-invalidate-compared-to-type-page"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatepath-with-type-layout-invalidate-compared-to-type-page" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatepath-with-type-layout-invalidate-compared-to-type-page" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidatePath with type='layout' invalidate compared to type='page'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>type='layout' invalidates the layout, all nested layouts beneath it, and all pages beneath them. type='page' will not invalidate pages beneath the specific page (e.g., /blog/[slug] won't invalidate /blog/[slug]/[author]).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NOOSU" prefix="r1593" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8835147158427249408"],"question":[0,"What is the maximum character length for a cache tag in updateTag()?"],"answer":[0,"256 characters. The tag parameter must not exceed 256 characters and is case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-cache-tag-in-updatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-cache-tag-in-updatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-cache-tag-in-updatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a cache tag in updateTag()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>256 characters. The tag parameter must not exceed 256 characters and is case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJNrJg" prefix="r1594" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8959060734980300241"],"question":[0,"What HTML form attributes are unsupported on the Next.js Form component?"],"answer":[0,"method, encType, and target attributes are unsupported. Using these attributes will revert to native browser behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-form-attributes-are-unsupported-on-the-next-js-form-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-form-attributes-are-unsupported-on-the-next-js-form-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-form-attributes-are-unsupported-on-the-next-js-form-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML form attributes are unsupported on the Next.js Form component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>method, encType, and target attributes are unsupported. Using these attributes will revert to native browser behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oyTru" prefix="r1595" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9049412738671054254"],"question":[0,"How must a Server Function signature change when used with useActionState?"],"answer":[0,"The Server Function must accept initialState (or prevState) as its first parameter, followed by FormData. Example: async function serverAction(initialState: any, formData: FormData) { }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-must-a-server-function-signature-change-when-used-with-useactionstate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-must-a-server-function-signature-change-when-used-with-useactionstate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-must-a-server-function-signature-change-when-used-with-useactionstate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How must a Server Function signature change when used with useActionState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Server Function must accept initialState (or prevState) as its first parameter, followed by FormData. Example: async function serverAction(initialState: any, formData: FormData) { }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xj5ql" prefix="r1596" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9270477114838416198"],"question":[0,"What is the default value of the scroll prop on the Next.js Form component?"],"answer":[0,"true. The scroll prop defaults to true, which means it will scroll to the top of the new route and maintain scroll position for backwards and forwards navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-scroll-prop-on-the-next-js-form-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-scroll-prop-on-the-next-js-form-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-scroll-prop-on-the-next-js-form-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the scroll prop on the Next.js Form component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The scroll prop defaults to true, which means it will scroll to the top of the new route and maintain scroll position for backwards and forwards navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DgE5V" prefix="r1597" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9565245452890456986"],"question":[0,"Is the single-argument form revalidateTag(tag) still supported?"],"answer":[0,"It is deprecated. The single-argument form revalidateTag(tag) is deprecated and may be removed in future versions. You should use the two-argument form with a profile parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-single-argument-form-revalidatetag-tag-still-supported"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-single-argument-form-revalidatetag-tag-still-supported" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-single-argument-form-revalidatetag-tag-still-supported" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the single-argument form revalidateTag(tag) still supported?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is deprecated. The single-argument form revalidateTag(tag) is deprecated and may be removed in future versions. You should use the two-argument form with a profile parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZNcEMn" prefix="r1598" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9590286396223963246"],"question":[0,"Do the replace and scroll props work when the Form component's action is a Server Action function?"],"answer":[0,"No. When the action prop is a function (Server Action), the replace and scroll props are ignored. These props only apply when action is a string (URL/path)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"do-the-replace-and-scroll-props-work-when-the-form-component-s-action-is-a-serve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-the-replace-and-scroll-props-work-when-the-form-component-s-action-is-a-serve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-the-replace-and-scroll-props-work-when-the-form-component-s-action-is-a-serve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do the replace and scroll props work when the Form component's action is a Server Action function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When the action prop is a function (Server Action), the replace and scroll props are ignored. These props only apply when action is a string (URL/path).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jCWDL" prefix="r1599" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10085029055555016954"],"question":[0,"What is the default value of the 'type' parameter for redirect() in Server Actions?"],"answer":[0,"'push'. By default, redirect() uses 'push' (adding a new entry to the browser history stack) in Server Actions, and 'replace' (replacing the current URL in the browser history stack) everywhere else."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-type-parameter-for-redirect-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-type-parameter-for-redirect-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-type-parameter-for-redirect-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'type' parameter for redirect() in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'push'. By default, redirect() uses 'push' (adding a new entry to the browser history stack) in Server Actions, and 'replace' (replacing the current URL in the browser history stack) everywhere else.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mRUVU" prefix="r1600" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10606747234740706445"],"question":[0,"Does calling preventDefault() affect the Next.js Form component's behavior?"],"answer":[0,"Yes. Calling event.preventDefault() will override <Form> behavior such as navigating to the specified URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"does-calling-preventdefault-affect-the-next-js-form-component-s-behavior"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-calling-preventdefault-affect-the-next-js-form-component-s-behavior" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-calling-preventdefault-affect-the-next-js-form-component-s-behavior" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does calling preventDefault() affect the Next.js Form component's behavior?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Calling event.preventDefault() will override <Form> behavior such as navigating to the specified URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="28tDxA" prefix="r1601" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11581911767737212164"],"question":[0,"Where must useFormStatus be called in relation to the form element?"],"answer":[0,"Inside a child component of the <form> element. useFormStatus must be called from a component that is rendered inside a <form>. It will not return status information for any <form> rendered in the same component calling the hook."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-useformstatus-be-called-in-relation-to-the-form-element"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-useformstatus-be-called-in-relation-to-the-form-element" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-useformstatus-be-called-in-relation-to-the-form-element" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must useFormStatus be called in relation to the form element?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Inside a child component of the <form> element. useFormStatus must be called from a component that is rendered inside a <form>. It will not return status information for any <form> rendered in the same component calling the hook.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="k387v" prefix="r1602" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12677321540849584409"],"question":[0,"What does useActionState return?"],"answer":[0,"An array with three values: [state, formAction, pending]. state is the current state (matching the Server Function return type), formAction is the action function to pass to the form's action prop, and pending is a boolean indicating execution status."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useactionstate-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useactionstate-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useactionstate-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useActionState return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array with three values: [state, formAction, pending]. state is the current state (matching the Server Function return type), formAction is the action function to pass to the form's action prop, and pending is a boolean indicating execution status.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vjfOd" prefix="r1603" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13194357210380017116"],"question":[0,"Do Server Actions support progressive enhancement by default?"],"answer":[0,"Yes. Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-actions-support-progressive-enhancement-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-actions-support-progressive-enhancement-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-actions-support-progressive-enhancement-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Actions support progressive enhancement by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFMasp" prefix="r1604" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14194426513795455937"],"question":[0,"Does using startTransition to invoke Server Actions support progressive enhancement?"],"answer":[0,"No. Custom invocation with startTransition to invoke Server Actions without using action or formAction disables progressive enhancement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/updating-data"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using startTransition to invoke Server Actions support progressive enhancement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Custom invocation with startTransition to invoke Server Actions without using action or formAction disables progressive enhancement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/updating-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gxnE0" prefix="r1605" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14291126730884015034"],"question":[0,"What does the Next.js Form component do when action receives a string URL?"],"answer":[0,"It behaves like a standard HTML form using GET requests, encoding form data into the URL as query parameters. However, it performs client-side navigation rather than full page reloads, retaining shared UI and client-side state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/form"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-next-js-form-component-do-when-action-receives-a-string-url"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-next-js-form-component-do-when-action-receives-a-string-url" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-next-js-form-component-do-when-action-receives-a-string-url" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the Next.js Form component do when action receives a string URL?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It behaves like a standard HTML form using GET requests, encoding form data into the URL as query parameters. However, it performs client-side navigation rather than full page reloads, retaining shared UI and client-side state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/form" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDupwQ" prefix="r1606" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14501506105002350582"],"question":[0,"Can revalidatePath() be called in Client Components?"],"answer":[0,"No. revalidatePath() can be called in Server Functions and Route Handlers, but cannot be called in Client Components or Proxies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"can-revalidatepath-be-called-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-revalidatepath-be-called-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-revalidatepath-be-called-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can revalidatePath() be called in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. revalidatePath() can be called in Server Functions and Route Handlers, but cannot be called in Client Components or Proxies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15oC3D" prefix="r1607" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14555464259554437578"],"question":[0,"Can cookies be modified after streaming begins?"],"answer":[0,"No. The .set() and .delete() methods cannot work after streaming begins. Cookie modifications must occur before streaming starts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-cookies-be-modified-after-streaming-begins"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-cookies-be-modified-after-streaming-begins" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-cookies-be-modified-after-streaming-begins" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can cookies be modified after streaming begins?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The .set() and .delete() methods cannot work after streaming begins. Cookie modifications must occur before streaming starts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fFHBJ" prefix="r1608" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14743828585962542382"],"question":[0,"What does the allowedOrigins configuration for Server Actions accept?"],"answer":[0,"An array of domain strings. It accepts a list of extra safe origin domains from which Server Actions can be invoked, and supports wildcards (e.g., '*.my-proxy.com')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-allowedorigins-configuration-for-server-actions-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-allowedorigins-configuration-for-server-actions-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-allowedorigins-configuration-for-server-actions-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the allowedOrigins configuration for Server Actions accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of domain strings. It accepts a list of extra safe origin domains from which Server Actions can be invoked, and supports wildcards (e.g., '*.my-proxy.com').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Op3zY" prefix="r1609" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14809374801478888913"],"question":[0,"What value does updateTag() return?"],"answer":[0,"void (no return value). The function returns nothing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-updatetag-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-updatetag-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-updatetag-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does updateTag() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>void (no return value). The function returns nothing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="routing-backend-integration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Routing > Backend Integration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 42 questions </span> </div> <div class="space-y-4"> <astro-island uid="1AVi61" prefix="r1610" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"760368998689038671"],"question":[0,"What are the valid values for the 'dynamic' route segment config option in Next.js App Router?"],"answer":[0,"'auto' (default), 'force-dynamic', 'error', 'force-static'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-dynamic-route-segment-config-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-dynamic-route-segment-config-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-dynamic-route-segment-config-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'dynamic' route segment config option in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' (default), 'force-dynamic', 'error', 'force-static'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Haamh" prefix="r1611" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1379494289727676536"],"question":[0,"Does using cookies() or headers() in Next.js trigger dynamic rendering?"],"answer":[0,"Yes, using cookies() triggers dynamic rendering. Components only opt into dynamic rendering when the value is accessed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-cookies-or-headers-in-next-js-trigger-dynamic-rendering"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-cookies-or-headers-in-next-js-trigger-dynamic-rendering" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-cookies-or-headers-in-next-js-trigger-dynamic-rendering" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using cookies() or headers() in Next.js trigger dynamic rendering?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, using cookies() triggers dynamic rendering. Components only opt into dynamic rendering when the value is accessed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ppVKe" prefix="r1612" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1385005918673735812"],"question":[0,"What is the NextRequest object in Next.js route handlers?"],"answer":[0,"An extension of the Web Request API that provides additional control including easily accessing cookies and an extended, parsed URL object nextUrl"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-nextrequest-object-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-nextrequest-object-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-nextrequest-object-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the NextRequest object in Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An extension of the Web Request API that provides additional control including easily accessing cookies and an extended, parsed URL object nextUrl</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1t0PVD" prefix="r1613" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1466810803707948900"],"question":[0,"Can you use the revalidate option when runtime is set to 'edge' in Next.js App Router?"],"answer":[0,"No, the revalidate value is not available when using runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-revalidate-option-when-runtime-is-set-to-edge-in-next-js-app-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-revalidate-option-when-runtime-is-set-to-edge-in-next-js-app-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-revalidate-option-when-runtime-is-set-to-edge-in-next-js-app-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the revalidate option when runtime is set to 'edge' in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the revalidate value is not available when using runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="pB4yQ" prefix="r1614" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1554999129049543787"],"question":[0,"Can you have both route.js and page.js at the same route segment level in Next.js App Router?"],"answer":[0,"No, you cannot have both route.js and page.js at the same route segment level. Having both will cause a conflict error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-have-both-route-js-and-page-js-at-the-same-route-segment-level-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-have-both-route-js-and-page-js-at-the-same-route-segment-level-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-have-both-route-js-and-page-js-at-the-same-route-segment-level-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you have both route.js and page.js at the same route segment level in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot have both route.js and page.js at the same route segment level. Having both will cause a conflict error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mfwsc" prefix="r1615" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1889862079200045693"],"question":[0,"What are the valid values for the 'runtime' route segment config option in Next.js App Router?"],"answer":[0,"'nodejs' (default), 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-runtime-route-segment-config-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-runtime-route-segment-config-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-runtime-route-segment-config-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'runtime' route segment config option in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' (default), 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2e47b9" prefix="r1616" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1940301922921189825"],"question":[0,"What is the default HTTP status code for res.redirect() in Next.js Pages Router API routes when no status is specified?"],"answer":[0,"307 (Temporary redirect)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-http-status-code-for-res-redirect-in-next-js-pages-router-ap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-http-status-code-for-res-redirect-in-next-js-pages-router-ap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-http-status-code-for-res-redirect-in-next-js-pages-router-ap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default HTTP status code for res.redirect() in Next.js Pages Router API routes when no status is specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>307 (Temporary redirect)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="a4Qdl" prefix="r1617" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2491749301076668919"],"question":[0,"In Next.js Pages Router, where must you call res.revalidate() for a rewritten path?"],"answer":[0,"You must call revalidate() on the exact path (not the rewritten path). For example, if you have a rewrite from /post-1 -> /blog/post-1, you would need to call res.revalidate('/blog/post-1')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/rendering/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-pages-router-where-must-you-call-res-revalidate-for-a-rewritten-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-pages-router-where-must-you-call-res-revalidate-for-a-rewritten-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-pages-router-where-must-you-call-res-revalidate-for-a-rewritten-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js Pages Router, where must you call res.revalidate() for a rewritten path?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must call revalidate() on the exact path (not the rewritten path). For example, if you have a rewrite from /post-1 -> /blog/post-1, you would need to call res.revalidate('/blog/post-1').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/rendering/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2QzOF" prefix="r1618" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2660769358033532444"],"question":[0,"What HTTP verb is supported for static exports with Next.js route handlers?"],"answer":[0,"Only the GET HTTP verb is supported for static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-verb-is-supported-for-static-exports-with-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-verb-is-supported-for-static-exports-with-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-verb-is-supported-for-static-exports-with-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP verb is supported for static exports with Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the GET HTTP verb is supported for static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3vINu" prefix="r1619" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2881579112951877229"],"question":[0,"Must the revalidate value be statically analyzable in Next.js?"],"answer":[0,"Yes, for example revalidate = 600 is valid, but revalidate = 60 * 10 is not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"must-the-revalidate-value-be-statically-analyzable-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-the-revalidate-value-be-statically-analyzable-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-the-revalidate-value-be-statically-analyzable-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must the revalidate value be statically analyzable in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, for example revalidate = 600 is valid, but revalidate = 60 * 10 is not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qOTNE" prefix="r1620" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3037391202073625011"],"question":[0,"What export is required to disable the default bodyParser in Next.js Pages Router API routes?"],"answer":[0,"export const config = { api: { bodyParser: false } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-export-is-required-to-disable-the-default-bodyparser-in-next-js-pages-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-export-is-required-to-disable-the-default-bodyparser-in-next-js-pages-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-export-is-required-to-disable-the-default-bodyparser-in-next-js-pages-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What export is required to disable the default bodyParser in Next.js Pages Router API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export const config = { api: { bodyParser: false } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="g8AN2" prefix="r1621" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3863769702884785714"],"question":[0,"What is the default body size limit for Next.js Pages Router API routes?"],"answer":[0,"1mb"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-body-size-limit-for-next-js-pages-router-api-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-body-size-limit-for-next-js-pages-router-api-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-body-size-limit-for-next-js-pages-router-api-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default body size limit for Next.js Pages Router API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1mb</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ygSLN" prefix="r1622" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4088533963844471863"],"question":[0,"Does calling revalidatePath or revalidateTag immediately trigger many revalidations at once?"],"answer":[0,"No, calling revalidatePath or revalidateTag will not immediately trigger many revalidations at once."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"does-calling-revalidatepath-or-revalidatetag-immediately-trigger-many-revalidati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-calling-revalidatepath-or-revalidatetag-immediately-trigger-many-revalidati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-calling-revalidatepath-or-revalidatetag-immediately-trigger-many-revalidati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does calling revalidatePath or revalidateTag immediately trigger many revalidations at once?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, calling revalidatePath or revalidateTag will not immediately trigger many revalidations at once.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Obyrp" prefix="r1623" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4338866589156191143"],"question":[0,"Where can revalidateTag be called in Next.js?"],"answer":[0,"In Server Functions and Route Handlers. It cannot be used in Client Components or Proxy environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-revalidatetag-be-called-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-revalidatetag-be-called-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-revalidatetag-be-called-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can revalidateTag be called in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Server Functions and Route Handlers. It cannot be used in Client Components or Proxy environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bewbM" prefix="r1624" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4678517773383622235"],"question":[0,"Are Next.js Pages Router API routes same-origin only by default?"],"answer":[0,"Yes, API Routes do not specify CORS headers, meaning they are same-origin only by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"are-next-js-pages-router-api-routes-same-origin-only-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-next-js-pages-router-api-routes-same-origin-only-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-next-js-pages-router-api-routes-same-origin-only-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Next.js Pages Router API routes same-origin only by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, API Routes do not specify CORS headers, meaning they are same-origin only by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sP5pD" prefix="r1625" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5704628572442992161"],"question":[0,"Can you use 'use cache' directly inside a Route Handler body in Next.js?"],"answer":[0,"No, use cache cannot be used directly inside a Route Handler body; you must extract it to a helper function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-use-cache-directly-inside-a-route-handler-body-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-use-cache-directly-inside-a-route-handler-body-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-use-cache-directly-inside-a-route-handler-body-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use 'use cache' directly inside a Route Handler body in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, use cache cannot be used directly inside a Route Handler body; you must extract it to a helper function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9A0Ug" prefix="r1626" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5815867270573149881"],"question":[0,"Does calling revalidatePath in a Route Handler trigger immediate revalidations?"],"answer":[0,"No, it marks the path for revalidation on the next visit. Calling revalidatePath with a dynamic route segment will not immediately trigger many revalidations at once."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"does-calling-revalidatepath-in-a-route-handler-trigger-immediate-revalidations"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-calling-revalidatepath-in-a-route-handler-trigger-immediate-revalidations" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-calling-revalidatepath-in-a-route-handler-trigger-immediate-revalidations" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does calling revalidatePath in a Route Handler trigger immediate revalidations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, it marks the path for revalidation on the next visit. Calling revalidatePath with a dynamic route segment will not immediately trigger many revalidations at once.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKWCNI" prefix="r1627" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6143979155507289168"],"question":[0,"What static methods does NextResponse provide for creating responses?"],"answer":[0,"json(body, options?), redirect(url), rewrite(url), and next(options?)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-static-methods-does-nextresponse-provide-for-creating-responses"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-static-methods-does-nextresponse-provide-for-creating-responses" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-static-methods-does-nextresponse-provide-for-creating-responses" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What static methods does NextResponse provide for creating responses?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>json(body, options?), redirect(url), rewrite(url), and next(options?)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ax036" prefix="r1628" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6153822532884561217"],"question":[0,"What are the seven supported HTTP methods in Next.js App Router route handlers?"],"answer":[0,"GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-seven-supported-http-methods-in-next-js-app-router-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-seven-supported-http-methods-in-next-js-app-router-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-seven-supported-http-methods-in-next-js-app-router-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the seven supported HTTP methods in Next.js App Router route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CrtXw" prefix="r1629" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6431461969651877483"],"question":[0,"What happens when Next.js re-renders after modifying cookies in a Server Action?"],"answer":[0,"Next.js re-renders the current page and its layouts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-next-js-re-renders-after-modifying-cookies-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-next-js-re-renders-after-modifying-cookies-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-next-js-re-renders-after-modifying-cookies-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when Next.js re-renders after modifying cookies in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js re-renders the current page and its layouts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtlWmB" prefix="r1630" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6781567761135770060"],"question":[0,"What are the valid values for the 'type' parameter in revalidatePath?"],"answer":[0,"'page' or 'layout'. This parameter is required when the path contains dynamic segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-type-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-type-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-type-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'type' parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'page' or 'layout'. This parameter is required when the path contains dynamic segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3fAOt" prefix="r1631" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6784968684143313247"],"question":[0,"Can you use API Routes with Next.js static exports?"],"answer":[0,"No, API Routes from Pages Router are not supported with static exports. However, App Router Route Handlers can be used with static exports (GET method only)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-api-routes-with-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-api-routes-with-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-api-routes-with-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use API Routes with Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, API Routes from Pages Router are not supported with static exports. However, App Router Route Handlers can be used with static exports (GET method only).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xnLfp" prefix="r1632" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6802769070074177720"],"question":[0,"Should you avoid appending /page or /layout to the path when calling revalidatePath?"],"answer":[0,"Yes, you should not append /page or /layout to the path parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-avoid-appending-page-or-layout-to-the-path-when-calling-revalidatepat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-avoid-appending-page-or-layout-to-the-path-when-calling-revalidatepat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-avoid-appending-page-or-layout-to-the-path-when-calling-revalidatepat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you avoid appending /page or /layout to the path when calling revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you should not append /page or /layout to the path parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="118OlI" prefix="r1633" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7777840082730994970"],"question":[0,"What cookie management methods are available on NextResponse?"],"answer":[0,"set(name, value), get(name), getAll(name?), has(name), and delete(name)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-management-methods-are-available-on-nextresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-management-methods-are-available-on-nextresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-management-methods-are-available-on-nextresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie management methods are available on NextResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>set(name, value), get(name), getAll(name?), has(name), and delete(name)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1M2gcX" prefix="r1634" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8622142676650355763"],"question":[0,"What is the difference between catch-all routes [...slug] and optional catch-all routes [[...slug]] in Next.js?"],"answer":[0,"Optional catch-all routes [[...slug]] will also match the base path without parameters (e.g., /shop), while regular catch-all routes [...slug] require at least one parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-catch-all-routes-slug-and-optional-catch-all-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-catch-all-routes-slug-and-optional-catch-all-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-catch-all-routes-slug-and-optional-catch-all-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between catch-all routes [...slug] and optional catch-all routes [[...slug]] in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Optional catch-all routes [[...slug]] will also match the base path without parameters (e.g., /shop), while regular catch-all routes [...slug] require at least one parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Xeaz2" prefix="r1635" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8642818106120995492"],"question":[0,"What does revalidatePath return?"],"answer":[0,"void (no return value)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatepath-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatepath-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatepath-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidatePath return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>void (no return value)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZYrli0" prefix="r1636" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8787224930100490780"],"question":[0,"What is the syntax to disable the body parser in a Next.js Pages Router API route?"],"answer":[0,"export const config = { api: { bodyParser: false } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-to-disable-the-body-parser-in-a-next-js-pages-router-api-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-to-disable-the-body-parser-in-a-next-js-pages-router-api-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-to-disable-the-body-parser-in-a-next-js-pages-router-api-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax to disable the body parser in a Next.js Pages Router API route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export const config = { api: { bodyParser: false } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="12uUgH" prefix="r1637" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8807905657209325159"],"question":[0,"What is the maximum character length for the path parameter in revalidatePath?"],"answer":[0,"1024 characters (the path is case-sensitive)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 characters (the path is case-sensitive)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YAkzP" prefix="r1638" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9976371335973927615"],"question":[0,"What is the default value for the path option when setting a cookie using cookies().set() in Next.js?"],"answer":[0,"/ (root path)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-path-option-when-setting-a-cookie-using-cookie"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-path-option-when-setting-a-cookie-using-cookie" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-path-option-when-setting-a-cookie-using-cookie" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the path option when setting a cookie using cookies().set() in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>/ (root path)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PCmhW" prefix="r1639" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10377095575359045814"],"question":[0,"What are the available request helper properties on req in Next.js Pages Router API routes?"],"answer":[0,"req.cookies (object containing cookies, defaults to {}), req.query (object containing query string, defaults to {}), and req.body (parsed request body based on content-type, or null if no body was sent)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-available-request-helper-properties-on-req-in-next-js-pages-router-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-available-request-helper-properties-on-req-in-next-js-pages-router-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-available-request-helper-properties-on-req-in-next-js-pages-router-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the available request helper properties on req in Next.js Pages Router API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>req.cookies (object containing cookies, defaults to {}), req.query (object containing query string, defaults to {}), and req.body (parsed request body based on content-type, or null if no body was sent)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="E4c3q" prefix="r1640" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10407823615788451789"],"question":[0,"What is the default response size limit for Next.js Pages Router API routes?"],"answer":[0,"4MB (the system warns if this limit is exceeded)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-response-size-limit-for-next-js-pages-router-api-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-response-size-limit-for-next-js-pages-router-api-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-response-size-limit-for-next-js-pages-router-api-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default response size limit for Next.js Pages Router API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>4MB (the system warns if this limit is exceeded)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YB3Kg" prefix="r1641" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10612009173892221540"],"question":[0,"Where can revalidatePath be called in Next.js?"],"answer":[0,"In Server Functions (Server Actions) and Route Handlers. It cannot be called in Client Components or Proxy environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-revalidatepath-be-called-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-revalidatepath-be-called-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-revalidatepath-be-called-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can revalidatePath be called in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Server Functions (Server Actions) and Route Handlers. It cannot be called in Client Components or Proxy environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="z7q0r" prefix="r1642" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11815464298003586986"],"question":[0,"How do you configure the maximum execution duration for a Route Handler in Next.js App Router?"],"answer":[0,"Export a maxDuration constant with the timeout value in seconds (e.g., export const maxDuration = 30;)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-the-maximum-execution-duration-for-a-route-handler-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-the-maximum-execution-duration-for-a-route-handler-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-the-maximum-execution-duration-for-a-route-handler-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure the maximum execution duration for a Route Handler in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a maxDuration constant with the timeout value in seconds (e.g., export const maxDuration = 30;)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wtkux" prefix="r1643" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11938576664205571300"],"question":[0,"What is the recommended runtime for rendering Next.js applications?"],"answer":[0,"Next.js recommends using the Node.js runtime for rendering your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-runtime-for-rendering-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-runtime-for-rendering-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-runtime-for-rendering-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended runtime for rendering Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using the Node.js runtime for rendering your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22SuOz" prefix="r1644" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11954657929565057526"],"question":[0,"Is the single-argument form revalidateTag(tag) deprecated in Next.js?"],"answer":[0,"Yes, the single-argument form is deprecated and may be removed in future versions. Use revalidateTag(tag, profile) instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-single-argument-form-revalidatetag-tag-deprecated-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-single-argument-form-revalidatetag-tag-deprecated-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-single-argument-form-revalidatetag-tag-deprecated-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the single-argument form revalidateTag(tag) deprecated in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the single-argument form is deprecated and may be removed in future versions. Use revalidateTag(tag, profile) instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tdgUL" prefix="r1645" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12075528966055474720"],"question":[0,"Where can you write/set cookies in Next.js App Router?"],"answer":[0,"Only in Server Actions and Route Handlers. You cannot set cookies directly in a Server Component (read-only there)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-you-write-set-cookies-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-you-write-set-cookies-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-you-write-set-cookies-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can you write/set cookies in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only in Server Actions and Route Handlers. You cannot set cookies directly in a Server Component (read-only there).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="h1Ja8" prefix="r1646" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13006662517313579246"],"question":[0,"What are the available response helper methods on res in Next.js Pages Router API routes?"],"answer":[0,"res.status(code), res.json(body), res.send(body), res.redirect([status,] path), and res.revalidate()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-available-response-helper-methods-on-res-in-next-js-pages-router-ap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-available-response-helper-methods-on-res-in-next-js-pages-router-ap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-available-response-helper-methods-on-res-in-next-js-pages-router-ap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the available response helper methods on res in Next.js Pages Router API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>res.status(code), res.json(body), res.send(body), res.redirect([status,] path), and res.revalidate()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jkd1D" prefix="r1647" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13046040224702708208"],"question":[0,"What are the valid values for the 'fetchCache' route segment config option?"],"answer":[0,"'auto' (default), 'default-cache', 'only-cache', 'force-cache', 'force-no-store', 'default-no-store', 'only-no-store'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-fetchcache-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-fetchcache-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-fetchcache-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'fetchCache' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' (default), 'default-cache', 'only-cache', 'force-cache', 'force-no-store', 'default-no-store', 'only-no-store'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26CUeQ" prefix="r1648" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13188121685639434067"],"question":[0,"What is the recommended profile value for revalidateTag to enable stale-while-revalidate semantics?"],"answer":[0,"\"max\" (e.g., revalidateTag(tag, \"max\"))"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-profile-value-for-revalidatetag-to-enable-stale-while-re"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-profile-value-for-revalidatetag-to-enable-stale-while-re" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-profile-value-for-revalidatetag-to-enable-stale-while-re" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended profile value for revalidateTag to enable stale-while-revalidate semantics?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"max" (e.g., revalidateTag(tag, "max"))</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15WIav" prefix="r1649" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13249276268236915520"],"question":[0,"In what order are API routes matched in Next.js Pages Router (from highest to lowest priority)?"],"answer":[0,"Predefined/static routes (e.g., /api/post/create.js), then dynamic routes (e.g., /api/post/[pid].js), then catch-all routes (e.g., /api/post/[...slug].js)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-order-are-api-routes-matched-in-next-js-pages-router-from-highest-to-low"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-order-are-api-routes-matched-in-next-js-pages-router-from-highest-to-low" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-order-are-api-routes-matched-in-next-js-pages-router-from-highest-to-low" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what order are API routes matched in Next.js Pages Router (from highest to lowest priority)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Predefined/static routes (e.g., /api/post/create.js), then dynamic routes (e.g., /api/post/[pid].js), then catch-all routes (e.g., /api/post/[...slug].js)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CSAVB" prefix="r1650" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14374124489117318373"],"question":[0,"Can you set cookies after streaming starts in Next.js?"],"answer":[0,"No, HTTP does not allow setting cookies after streaming starts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-cookies-after-streaming-starts-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-cookies-after-streaming-starts-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-cookies-after-streaming-starts-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set cookies after streaming starts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, HTTP does not allow setting cookies after streaming starts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XsR7e" prefix="r1651" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14541464583886402619"],"question":[0,"Is runtime: 'edge' supported for Cache Components in Next.js?"],"answer":[0,"No, using runtime: 'edge' is not supported for Cache Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-runtime-edge-supported-for-cache-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-runtime-edge-supported-for-cache-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-runtime-edge-supported-for-cache-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is runtime: 'edge' supported for Cache Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, using runtime: 'edge' is not supported for Cache Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="typescript-data-fetching-types" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">TypeScript > Data Fetching Types</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 41 questions </span> </div> <div class="space-y-4"> <astro-island uid="1rIkDM" prefix="r1652" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"30714458865401740"],"question":[0,"What is the type of the req property in GetServerSidePropsContext?"],"answer":[0,"The req property is of type `http.IncomingMessage & { cookies: NextApiRequestCookies }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-req-property-in-getserversidepropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-req-property-in-getserversidepropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-req-property-in-getserversidepropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the req property in GetServerSidePropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The req property is of type <code>http.IncomingMessage & { cookies: NextApiRequestCookies }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UIvMu" prefix="r1653" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"306113403882364788"],"question":[0,"What types should be imported for getServerSideProps in Next.js?"],"answer":[0,"Import `GetServerSideProps` and `InferGetServerSidePropsType` from 'next': `import type { GetServerSideProps, InferGetServerSidePropsType } from 'next'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-should-be-imported-for-getserversideprops-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-should-be-imported-for-getserversideprops-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-should-be-imported-for-getserversideprops-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types should be imported for getServerSideProps in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import <code>GetServerSideProps</code> and <code>InferGetServerSidePropsType</code> from 'next': <code>import type { GetServerSideProps, InferGetServerSidePropsType } from 'next'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lIHeO" prefix="r1654" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"878957854870583589"],"question":[0,"Can you use cookies().set() in a Server Component?"],"answer":[0,"No, `.set()` and `.delete()` can only be used in Server Actions or Route Handlers, not in Server Components. HTTP does not allow setting cookies after streaming starts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-cookies-set-in-a-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-cookies-set-in-a-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-cookies-set-in-a-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use cookies().set() in a Server Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, <code>.set()</code> and <code>.delete()</code> can only be used in Server Actions or Route Handlers, not in Server Components. HTTP does not allow setting cookies after streaming starts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wKUIF" prefix="r1655" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1273448394995277128"],"question":[0,"What is the type of the query property in GetServerSidePropsContext?"],"answer":[0,"The query property is of type `ParsedUrlQuery` (from 'querystring')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-query-property-in-getserversidepropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-query-property-in-getserversidepropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-query-property-in-getserversidepropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the query property in GetServerSidePropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The query property is of type <code>ParsedUrlQuery</code> (from 'querystring')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fpDg2" prefix="r1656" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3275585265141384223"],"question":[0,"What type is the revalidateReason property in GetStaticPropsContext?"],"answer":[0,"The revalidateReason property is of type `'build' | 'stale' | 'on-demand'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/64258"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-revalidatereason-property-in-getstaticpropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-revalidatereason-property-in-getstaticpropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-revalidatereason-property-in-getstaticpropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the revalidateReason property in GetStaticPropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The revalidateReason property is of type <code>'build' | 'stale' | 'on-demand'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/64258" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lvqsM" prefix="r1657" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4354845954050155938"],"question":[0,"What is the recommended modern syntax for typing getStaticProps in Next.js?"],"answer":[0,"Use the `satisfies` operator: `export const getStaticProps = (async (context) => { ... }) satisfies GetStaticProps<{ repo: Repo }>`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-modern-syntax-for-typing-getstaticprops-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-modern-syntax-for-typing-getstaticprops-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-modern-syntax-for-typing-getstaticprops-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended modern syntax for typing getStaticProps in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>satisfies</code> operator: <code>export const getStaticProps = (async (context) => { ... }) satisfies GetStaticProps<{ repo: Repo }></code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="62CXw" prefix="r1658" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4861769561599411188"],"question":[0,"What types should be imported for generateMetadata in Next.js App Router?"],"answer":[0,"Import `Metadata` and `ResolvingMetadata` from 'next': `import type { Metadata, ResolvingMetadata } from 'next'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-should-be-imported-for-generatemetadata-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-should-be-imported-for-generatemetadata-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-should-be-imported-for-generatemetadata-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types should be imported for generateMetadata in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import <code>Metadata</code> and <code>ResolvingMetadata</code> from 'next': <code>import type { Metadata, ResolvingMetadata } from 'next'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WqPx" prefix="r1659" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5352208642547736965"],"question":[0,"What return type should generateStaticParams have in Next.js App Router?"],"answer":[0,"generateStaticParams should return an array of objects: `Array<{ [paramName: string]: string | string[] }>`. For example: `[{ slug: 'post-1' }, { slug: 'post-2' }]`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-should-generatestaticparams-have-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-should-generatestaticparams-have-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-should-generatestaticparams-have-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type should generateStaticParams have in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateStaticParams should return an array of objects: <code>Array<{ [paramName: string]: string | string[] }></code>. For example: <code>[{ slug: 'post-1' }, { slug: 'post-2' }]</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22y9f4" prefix="r1660" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5402384570811605923"],"question":[0,"What type is params for catch-all routes in Next.js App Router?"],"answer":[0,"For catch-all routes `[...slug]`, params is `Promise<{ slug: string[] }>`. For optional catch-all `[[...slug]]`, it can also be `Promise<{ slug: string[] | undefined }>`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-params-for-catch-all-routes-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-params-for-catch-all-routes-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-params-for-catch-all-routes-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is params for catch-all routes in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For catch-all routes <code>[...slug]</code>, params is <code>Promise<{ slug: string[] }></code>. For optional catch-all <code>[[...slug]]</code>, it can also be <code>Promise<{ slug: string[] | undefined }></code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23BRR1" prefix="r1661" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5789496883133451702"],"question":[0,"What is the type of the resolvedUrl property in GetServerSidePropsContext?"],"answer":[0,"The resolvedUrl property is of type `string` representing the normalized request URL"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-resolvedurl-property-in-getserversidepropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-resolvedurl-property-in-getserversidepropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-resolvedurl-property-in-getserversidepropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the resolvedUrl property in GetServerSidePropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The resolvedUrl property is of type <code>string</code> representing the normalized request URL</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EFPjF" prefix="r1662" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6119551797127992298"],"question":[0,"What is the return type of the cookies() function in Next.js App Router?"],"answer":[0,"cookies() returns `Promise<CookieStore>` (it is an async function)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-type-of-the-cookies-function-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-type-of-the-cookies-function-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-type-of-the-cookies-function-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return type of the cookies() function in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies() returns <code>Promise<CookieStore></code> (it is an async function)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="TFT2q" prefix="r1663" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6468103972854987499"],"question":[0,"What is the type of the params argument in generateStaticParams for nested routes?"],"answer":[0,"For nested routes, the params argument is typed as `{ params: { [parentParam: string]: string } }`. For example: `{ params: { category: string } }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-params-argument-in-generatestaticparams-for-nested-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-params-argument-in-generatestaticparams-for-nested-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-params-argument-in-generatestaticparams-for-nested-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the params argument in generateStaticParams for nested routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For nested routes, the params argument is typed as <code>{ params: { [parentParam: string]: string } }</code>. For example: <code>{ params: { category: string } }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15HYJ2" prefix="r1664" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6580990709467707370"],"question":[0,"What is the return type of the headers() function in Next.js App Router?"],"answer":[0,"headers() returns `Promise<ReadonlyHeaders>` (it is an async function that returns a read-only Web Headers object)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-type-of-the-headers-function-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-type-of-the-headers-function-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-type-of-the-headers-function-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return type of the headers() function in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>headers() returns <code>Promise<ReadonlyHeaders></code> (it is an async function that returns a read-only Web Headers object)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7mV2S" prefix="r1665" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6642349734027510531"],"question":[0,"How do you import the headers function in Next.js App Router?"],"answer":[0,"Import from 'next/headers': `import { headers } from 'next/headers'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-import-the-headers-function-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-import-the-headers-function-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-import-the-headers-function-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you import the headers function in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import from 'next/headers': <code>import { headers } from 'next/headers'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2v3ncD" prefix="r1666" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6785224628200878265"],"question":[0,"Can InferGetServerSidePropsType work correctly with conditional returns (redirect or notFound)?"],"answer":[0,"No, there is a known limitation where InferGetServerSidePropsType breaks and returns `never` when using conditional returns like redirect or notFound"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/36615"]]],"topic":[0,"nextjs"],"slug":[0,"can-infergetserversidepropstype-work-correctly-with-conditional-returns-redirect"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-infergetserversidepropstype-work-correctly-with-conditional-returns-redirect" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-infergetserversidepropstype-work-correctly-with-conditional-returns-redirect" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can InferGetServerSidePropsType work correctly with conditional returns (redirect or notFound)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, there is a known limitation where InferGetServerSidePropsType breaks and returns <code>never</code> when using conditional returns like redirect or notFound</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/36615" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2t8jSy" prefix="r1667" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6879953215614172790"],"question":[0,"What type should be imported for typing getStaticProps in Next.js?"],"answer":[0,"Import `GetStaticProps` from 'next': `import type { GetStaticProps } from 'next'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-should-be-imported-for-typing-getstaticprops-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-should-be-imported-for-typing-getstaticprops-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-should-be-imported-for-typing-getstaticprops-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type should be imported for typing getStaticProps in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import <code>GetStaticProps</code> from 'next': <code>import type { GetStaticProps } from 'next'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTHNpL" prefix="r1668" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6959814662439773372"],"question":[0,"What is the return type of generateMetadata function?"],"answer":[0,"generateMetadata must return `Promise<Metadata>`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-type-of-generatemetadata-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-type-of-generatemetadata-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-type-of-generatemetadata-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return type of generateMetadata function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateMetadata must return <code>Promise<Metadata></code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10uEX9" prefix="r1669" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7115416578346869526"],"question":[0,"How do you import the cookies function in Next.js App Router?"],"answer":[0,"Import from 'next/headers': `import { cookies } from 'next/headers'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-import-the-cookies-function-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-import-the-cookies-function-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-import-the-cookies-function-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you import the cookies function in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import from 'next/headers': <code>import { cookies } from 'next/headers'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QgS8s" prefix="r1670" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7155853862906372255"],"question":[0,"What type should be imported for typing getStaticPaths in Next.js?"],"answer":[0,"Import `GetStaticPaths` from 'next': `import type { GetStaticPaths } from 'next'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-should-be-imported-for-typing-getstaticpaths-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-should-be-imported-for-typing-getstaticpaths-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-should-be-imported-for-typing-getstaticpaths-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type should be imported for typing getStaticPaths in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import <code>GetStaticPaths</code> from 'next': <code>import type { GetStaticPaths } from 'next'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nRbEn" prefix="r1671" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7705262144430326355"],"question":[0,"What is the type of the params object in getStaticPaths return paths array?"],"answer":[0,"Each params object is of type `Record<string, string | string[] | null | undefined | false>`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-params-object-in-getstaticpaths-return-paths-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-params-object-in-getstaticpaths-return-paths-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-params-object-in-getstaticpaths-return-paths-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the params object in getStaticPaths return paths array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each params object is of type <code>Record<string, string | string[] | null | undefined | false></code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YvwJV" prefix="r1672" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8791631100628498319"],"question":[0,"What type is the locales property in GetStaticPropsContext?"],"answer":[0,"The locales property is of type `string[] | undefined` (only present if i18n is enabled)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-locales-property-in-getstaticpropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-locales-property-in-getstaticpropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-locales-property-in-getstaticpropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the locales property in GetStaticPropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The locales property is of type <code>string[] | undefined</code> (only present if i18n is enabled)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LOJGJ" prefix="r1673" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9031264033597619784"],"question":[0,"What TypeScript type represents searchParams in Next.js App Router page components?"],"answer":[0,"searchParams is typed as `Promise<{ [key: string]: string | string[] | undefined }>`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-represents-searchparams-in-next-js-app-router-page-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-represents-searchparams-in-next-js-app-router-page-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-represents-searchparams-in-next-js-app-router-page-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type represents searchParams in Next.js App Router page components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>searchParams is typed as <code>Promise<{ [key: string]: string | string[] | undefined }></code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bpvcp" prefix="r1674" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9322937051559575057"],"question":[0,"What type is the context.params property in GetStaticPropsContext?"],"answer":[0,"The params property is of type `Params | undefined`, where Params is a generic parameter containing route parameters as an object"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-context-params-property-in-getstaticpropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-context-params-property-in-getstaticpropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-context-params-property-in-getstaticpropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the context.params property in GetStaticPropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The params property is of type <code>Params | undefined</code>, where Params is a generic parameter containing route parameters as an object</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Mu5vM" prefix="r1675" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9500364283314035686"],"question":[0,"What are the three possible values for the revalidate property type in getStaticProps return?"],"answer":[0,"The revalidate property can be `number` (seconds), `false` (no revalidation), or `boolean`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-possible-values-for-the-revalidate-property-type-in-getstatic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-possible-values-for-the-revalidate-property-type-in-getstatic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-possible-values-for-the-revalidate-property-type-in-getstatic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three possible values for the revalidate property type in getStaticProps return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The revalidate property can be <code>number</code> (seconds), <code>false</code> (no revalidation), or <code>boolean</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hCri6" prefix="r1676" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9894968817030571061"],"question":[0,"What are the available methods on the CookieStore type returned by cookies()?"],"answer":[0,"CookieStore has: `get(name)`, `getAll()`, `has(name)`, `set(name, value, options)`, `delete(name)`, and `toString()`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-available-methods-on-the-cookiestore-type-returned-by-cookies"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-available-methods-on-the-cookiestore-type-returned-by-cookies" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-available-methods-on-the-cookiestore-type-returned-by-cookies" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the available methods on the CookieStore type returned by cookies()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CookieStore has: <code>get(name)</code>, <code>getAll()</code>, <code>has(name)</code>, <code>set(name, value, options)</code>, <code>delete(name)</code>, and <code>toString()</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="189ebW" prefix="r1677" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10361063910960124036"],"question":[0,"What is the type for optional catch-all route params in Next.js?"],"answer":[0,"For optional catch-all routes `[[...slug]]`, params can be `string[]` or `undefined` (e.g., `Promise<{ slug: string[] | undefined }>`)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-for-optional-catch-all-route-params-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-for-optional-catch-all-route-params-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-for-optional-catch-all-route-params-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type for optional catch-all route params in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For optional catch-all routes <code>[[...slug]]</code>, params can be <code>string[]</code> or <code>undefined</code> (e.g., <code>Promise<{ slug: string[] | undefined }></code>)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oM9O3" prefix="r1678" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10616654458137961558"],"question":[0,"What are the three possible values for the fallback property type in getStaticPaths return?"],"answer":[0,"The fallback property can be `false`, `true`, or `'blocking'` (string literal)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-possible-values-for-the-fallback-property-type-in-getstaticpa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-possible-values-for-the-fallback-property-type-in-getstaticpa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-possible-values-for-the-fallback-property-type-in-getstaticpa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three possible values for the fallback property type in getStaticPaths return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The fallback property can be <code>false</code>, <code>true</code>, or <code>'blocking'</code> (string literal)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1h3lq7" prefix="r1679" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10740332313060498836"],"question":[0,"Are searchParams synchronous or asynchronous in Next.js App Router?"],"answer":[0,"searchParams is a Promise and must be accessed with async/await or React's use() function"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"are-searchparams-synchronous-or-asynchronous-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-searchparams-synchronous-or-asynchronous-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-searchparams-synchronous-or-asynchronous-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are searchParams synchronous or asynchronous in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>searchParams is a Promise and must be accessed with async/await or React's use() function</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dOUXV" prefix="r1680" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11287913897122098524"],"question":[0,"What type is the locale property in GetStaticPropsContext?"],"answer":[0,"The locale property is of type `string | undefined` (only present if i18n is enabled)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-locale-property-in-getstaticpropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-locale-property-in-getstaticpropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-locale-property-in-getstaticpropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the locale property in GetStaticPropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The locale property is of type <code>string | undefined</code> (only present if i18n is enabled)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16ai4l" prefix="r1681" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11300754510891856769"],"question":[0,"What is the PageProps helper type used for in Next.js App Router?"],"answer":[0,"PageProps is a globally available helper type that enables autocomplete and strict keys for params: `PageProps<'/blog/[slug]'>` provides type-safe params for that route"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-pageprops-helper-type-used-for-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-pageprops-helper-type-used-for-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-pageprops-helper-type-used-for-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the PageProps helper type used for in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PageProps is a globally available helper type that enables autocomplete and strict keys for params: <code>PageProps<'/blog/[slug]'></code> provides type-safe params for that route</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="N0Qvh" prefix="r1682" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11585340810574154705"],"question":[0,"When was the satisfies operator added to TypeScript?"],"answer":[0,"The satisfies operator was added in TypeScript version 4.9"],"confidence":[0,0.95],"sources":[1,[[0,"https://www.learningtypescript.com/articles/the-satisfies-operator"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-satisfies-operator-added-to-typescript"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-satisfies-operator-added-to-typescript" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-satisfies-operator-added-to-typescript" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the satisfies operator added to TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The satisfies operator was added in TypeScript version 4.9</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.learningtypescript.com/articles/the-satisfies-operator" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>learningtypescript.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="K3Tvs" prefix="r1683" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11998433066437000644"],"question":[0,"What types should be imported for Next.js route handlers?"],"answer":[0,"Import `NextRequest` from 'next/server' and use `NextResponse` from 'next/server': `import { type NextRequest, NextResponse } from 'next/server'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-should-be-imported-for-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-should-be-imported-for-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-should-be-imported-for-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types should be imported for Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import <code>NextRequest</code> from 'next/server' and use <code>NextResponse</code> from 'next/server': <code>import { type NextRequest, NextResponse } from 'next/server'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MhTfr" prefix="r1684" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12142040476140686652"],"question":[0,"What is the RouteContext helper type used for in Next.js route handlers?"],"answer":[0,"RouteContext is a globally available helper that provides strongly typed params from a route literal: `RouteContext<'/users/[id]'>` enables type-safe access to route parameters"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-routecontext-helper-type-used-for-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-routecontext-helper-type-used-for-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-routecontext-helper-type-used-for-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the RouteContext helper type used for in Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>RouteContext is a globally available helper that provides strongly typed params from a route literal: <code>RouteContext<'/users/[id]'></code> enables type-safe access to route parameters</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bX1wz" prefix="r1685" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12167580602314254888"],"question":[0,"Are params synchronous or asynchronous in Next.js 15 App Router?"],"answer":[0,"In Next.js 15, params is a Promise and must be accessed with async/await or React's use() function"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/77609"]]],"topic":[0,"nextjs"],"slug":[0,"are-params-synchronous-or-asynchronous-in-next-js-15-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-params-synchronous-or-asynchronous-in-next-js-15-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-params-synchronous-or-asynchronous-in-next-js-15-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are params synchronous or asynchronous in Next.js 15 App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, params is a Promise and must be accessed with async/await or React's use() function</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/77609" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="zqDLH" prefix="r1686" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12175541992200732527"],"question":[0,"What is the function signature for Next.js middleware?"],"answer":[0,"Middleware is typed as: `export function middleware(req: NextRequest, event: NextFetchEvent) { return NextResponse.next() }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-function-signature-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-function-signature-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-function-signature-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the function signature for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware is typed as: <code>export function middleware(req: NextRequest, event: NextFetchEvent) { return NextResponse.next() }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z256v7X" prefix="r1687" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12508029043885836746"],"question":[0,"What is the type of the res property in GetServerSidePropsContext?"],"answer":[0,"The res property is of type `http.ServerResponse`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-res-property-in-getserversidepropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-res-property-in-getserversidepropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-res-property-in-getserversidepropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the res property in GetServerSidePropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The res property is of type <code>http.ServerResponse</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1n316S" prefix="r1688" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12862477654389909680"],"question":[0,"What are the available methods on the ReadonlyHeaders type returned by headers()?"],"answer":[0,"ReadonlyHeaders has: `get(name)`, `has(name)`, `entries()`, `keys()`, `values()`, and `forEach(callback)` (read-only Web Headers API)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-available-methods-on-the-readonlyheaders-type-returned-by-headers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-available-methods-on-the-readonlyheaders-type-returned-by-headers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-available-methods-on-the-readonlyheaders-type-returned-by-headers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the available methods on the ReadonlyHeaders type returned by headers()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ReadonlyHeaders has: <code>get(name)</code>, <code>has(name)</code>, <code>entries()</code>, <code>keys()</code>, <code>values()</code>, and <code>forEach(callback)</code> (read-only Web Headers API)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fpDey" prefix="r1689" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12930723607364706204"],"question":[0,"In which Next.js components can you use the searchParams prop?"],"answer":[0,"searchParams is only available in page.js segments, not in layout.js or other component types"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-components-can-you-use-the-searchparams-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-components-can-you-use-the-searchparams-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-components-can-you-use-the-searchparams-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js components can you use the searchParams prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>searchParams is only available in page.js segments, not in layout.js or other component types</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZlrbNY" prefix="r1690" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13461478742605694040"],"question":[0,"What type should params extend when using dynamic routes in getStaticProps?"],"answer":[0,"Params should extend `ParsedUrlQuery` from 'querystring': `interface IParams extends ParsedUrlQuery { slug: string }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://wallis.dev/blog/nextjs-getstaticprops-and-getstaticpaths-with-typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-should-params-extend-when-using-dynamic-routes-in-getstaticprops"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-should-params-extend-when-using-dynamic-routes-in-getstaticprops" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-should-params-extend-when-using-dynamic-routes-in-getstaticprops" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type should params extend when using dynamic routes in getStaticProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Params should extend <code>ParsedUrlQuery</code> from 'querystring': <code>interface IParams extends ParsedUrlQuery { slug: string }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://wallis.dev/blog/nextjs-getstaticprops-and-getstaticpaths-with-typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>wallis.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCtRDq" prefix="r1691" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13640958535446865062"],"question":[0,"What module should ParsedUrlQuery be imported from for Next.js TypeScript typing?"],"answer":[0,"Import ParsedUrlQuery from 'querystring': `import { ParsedUrlQuery } from 'querystring'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://wallis.dev/blog/nextjs-getstaticprops-and-getstaticpaths-with-typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-module-should-parsedurlquery-be-imported-from-for-next-js-typescript-typing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-module-should-parsedurlquery-be-imported-from-for-next-js-typescript-typing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-module-should-parsedurlquery-be-imported-from-for-next-js-typescript-typing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What module should ParsedUrlQuery be imported from for Next.js TypeScript typing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import ParsedUrlQuery from 'querystring': <code>import { ParsedUrlQuery } from 'querystring'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://wallis.dev/blog/nextjs-getstaticprops-and-getstaticpaths-with-typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>wallis.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fRLf7" prefix="r1692" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14403913255978397458"],"question":[0,"What types can the draftMode property have in GetStaticPropsContext?"],"answer":[0,"The draftMode property is of type `boolean`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-can-the-draftmode-property-have-in-getstaticpropscontext"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-can-the-draftmode-property-have-in-getstaticpropscontext" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-can-the-draftmode-property-have-in-getstaticpropscontext" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types can the draftMode property have in GetStaticPropsContext?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The draftMode property is of type <code>boolean</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="typescript-routing-and-navigation-types" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">TypeScript > Routing and Navigation Types</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 41 questions </span> </div> <div class="space-y-4"> <astro-island uid="TXlD4" prefix="r1693" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"97746991698767358"],"question":[0,"In Next.js 15, how must params be accessed in Client Components?"],"answer":[0,"Using React's use() function. For example: `const { id } = use(params)`. Client Components cannot use async/await for props, so React's use() hook is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@ayonaalex2/params-search-params-resolved-as-promise-in-next-js-15-444317307481"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-how-must-params-be-accessed-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-how-must-params-be-accessed-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-how-must-params-be-accessed-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, how must params be accessed in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using React's use() function. For example: <code>const { id } = use(params)</code>. Client Components cannot use async/await for props, so React's use() hook is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@ayonaalex2/params-search-params-resolved-as-promise-in-next-js-15-444317307481" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1h8pMG" prefix="r1694" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"983942132521446368"],"question":[0,"What TypeScript type should be used for layout children prop?"],"answer":[0,"React.ReactNode. Layout components should accept a children prop with this type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-should-be-used-for-layout-children-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-should-be-used-for-layout-children-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-should-be-used-for-layout-children-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type should be used for layout children prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React.ReactNode. Layout components should accept a children prop with this type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zbgblc" prefix="r1695" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1275696966525777011"],"question":[0,"What is the return type of generateStaticParams in TypeScript?"],"answer":[0,"Promise<Array<Record<string, string | string[]>>>. Returns a promise that resolves to an array of objects where each object represents the populated dynamic segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-type-of-generatestaticparams-in-typescript"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-type-of-generatestaticparams-in-typescript" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-type-of-generatestaticparams-in-typescript" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return type of generateStaticParams in TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<Array<Record<string, string | string[]>>>. Returns a promise that resolves to an array of objects where each object represents the populated dynamic segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9BKjv" prefix="r1696" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2801591501988701885"],"question":[0,"What TypeScript signature does router.replace() accept in the App Router?"],"answer":[0,"router.replace(href: string, { scroll: boolean }). Identical to push() but replaces the current history entry instead of adding a new one."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-signature-does-router-replace-accept-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-signature-does-router-replace-accept-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-signature-does-router-replace-accept-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript signature does router.replace() accept in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.replace(href: string, { scroll: boolean }). Identical to push() but replaces the current history entry instead of adding a new one.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29s0eQ" prefix="r1697" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3629590854274842917"],"question":[0,"When were params and searchParams changed from synchronous to asynchronous in Next.js?"],"answer":[0,"In Next.js v15.0.0-RC. In v14 and earlier they were synchronous objects. In v15+, they are Promises that must be awaited."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"when-were-params-and-searchparams-changed-from-synchronous-to-asynchronous-in-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-were-params-and-searchparams-changed-from-synchronous-to-asynchronous-in-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-were-params-and-searchparams-changed-from-synchronous-to-asynchronous-in-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When were params and searchParams changed from synchronous to asynchronous in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js v15.0.0-RC. In v14 and earlier they were synchronous objects. In v15+, they are Promises that must be awaited.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mCopf" prefix="r1698" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3798866397743876474"],"question":[0,"Does the useParams hook take any parameters?"],"answer":[0,"No. useParams does not take any parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-useparams-hook-take-any-parameters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-useparams-hook-take-any-parameters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-useparams-hook-take-any-parameters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the useParams hook take any parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. useParams does not take any parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQxeIz" prefix="r1699" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3967339119739467474"],"question":[0,"What methods are available on the ReadonlyURLSearchParams type returned by useSearchParams()?"],"answer":[0,"get(name), has(name), getAll(), keys(), values(), entries(), forEach(), and toString() - all read-only methods from the URLSearchParams interface."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-readonlyurlsearchparams-type-returned-by-usese"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-readonlyurlsearchparams-type-returned-by-usese" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-readonlyurlsearchparams-type-returned-by-usese" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the ReadonlyURLSearchParams type returned by useSearchParams()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>get(name), has(name), getAll(), keys(), values(), entries(), forEach(), and toString() - all read-only methods from the URLSearchParams interface.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vN4nV" prefix="r1700" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4069580008678062803"],"question":[0,"What TypeScript type is returned by the useSearchParams hook?"],"answer":[0,"A read-only version of the URLSearchParams interface (ReadonlyURLSearchParams from next/navigation)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-is-returned-by-the-usesearchparams-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-is-returned-by-the-usesearchparams-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-is-returned-by-the-usesearchparams-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type is returned by the useSearchParams hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A read-only version of the URLSearchParams interface (ReadonlyURLSearchParams from next/navigation).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="oNFM1" prefix="r1701" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4412883962044271631"],"question":[0,"What TypeScript types does Next.js extend for route handlers?"],"answer":[0,"NextRequest (extends Web Request API) and NextResponse (extends Web Response API), both imported from 'next/server'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-types-does-next-js-extend-for-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-types-does-next-js-extend-for-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-types-does-next-js-extend-for-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript types does Next.js extend for route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextRequest (extends Web Request API) and NextResponse (extends Web Response API), both imported from 'next/server'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7zwjC" prefix="r1702" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4671556989311867168"],"question":[0,"What is the TypeScript signature for the redirect() function's type parameter?"],"answer":[0,"redirect(path: string, type?: 'replace' | 'push'): never. The type defaults to 'replace' (or 'push' in Server Actions)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-signature-for-the-redirect-function-s-type-parameter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-signature-for-the-redirect-function-s-type-parameter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-signature-for-the-redirect-function-s-type-parameter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript signature for the redirect() function's type parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect(path: string, type?: 'replace' | 'push'): never. The type defaults to 'replace' (or 'push' in Server Actions).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aKcFy" prefix="r1703" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4884360298105569704"],"question":[0,"What TypeScript type should params have for an optional catch-all segment route like [[...slug]]?"],"answer":[0,"Promise<{ slug: string[] | undefined }>. Optional catch-all segments can be undefined when the route is accessed without any segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-should-params-have-for-an-optional-catch-all-segment-route-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-should-params-have-for-an-optional-catch-all-segment-route-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-should-params-have-for-an-optional-catch-all-segment-route-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type should params have for an optional catch-all segment route like [[...slug]]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ slug: string[] | undefined }>. Optional catch-all segments can be undefined when the route is accessed without any segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRstV4" prefix="r1704" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5031510553462771932"],"question":[0,"What version of Next.js introduced streaming support to generateMetadata?"],"answer":[0,"v15.2.0 introduced streaming support, allowing metadata resolution to occur after initial UI rendering for certain scenarios."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-version-of-next-js-introduced-streaming-support-to-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-version-of-next-js-introduced-streaming-support-to-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-version-of-next-js-introduced-streaming-support-to-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What version of Next.js introduced streaming support to generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v15.2.0 introduced streaming support, allowing metadata resolution to occur after initial UI rendering for certain scenarios.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqhsAf" prefix="r1705" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5309123861967472745"],"question":[0,"What TypeScript type should params have for a catch-all segment route like [... slug]?"],"answer":[0,"Promise<{ slug: string[] }>. Catch-all segments return an array of strings, and in Next.js 15+, params is a Promise."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-should-params-have-for-a-catch-all-segment-route-like-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-should-params-have-for-a-catch-all-segment-route-like-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-should-params-have-for-a-catch-all-segment-route-like-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type should params have for a catch-all segment route like [... slug]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ slug: string[] }>. Catch-all segments return an array of strings, and in Next.js 15+, params is a Promise.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1EFnpC" prefix="r1706" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5494226006165837834"],"question":[0,"What is the default value of the scroll prop on the Next.js Link component?"],"answer":[0,"true. The default behavior scrolls to the top of the page on navigation. Set scroll={false} to disable this behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-scroll-prop-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-scroll-prop-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-scroll-prop-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the scroll prop on the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The default behavior scrolls to the top of the page on navigation. Set scroll={false} to disable this behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2n9bcc" prefix="r1707" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5611232783602347933"],"question":[0,"What is the TypeScript return type of the notFound() function in Next.js?"],"answer":[0,"never. Like redirect(), it uses the TypeScript never type and does not require using `return notFound()`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-return-type-of-the-notfound-function-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-return-type-of-the-notfound-function-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-return-type-of-the-notfound-function-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript return type of the notFound() function in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>never. Like redirect(), it uses the TypeScript never type and does not require using <code>return notFound()</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kBvvi" prefix="r1708" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5710263075698361356"],"question":[0,"What is the exact TypeScript type for the params prop in Next.js 15 App Router pages?"],"answer":[0,"Promise<{ [key: string]: string | string[] | undefined }>. As of v15.0.0-RC, params became asynchronous and must be awaited or unwrapped with React's use() function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-typescript-type-for-the-params-prop-in-next-js-15-app-router-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-typescript-type-for-the-params-prop-in-next-js-15-app-router-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-typescript-type-for-the-params-prop-in-next-js-15-app-router-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact TypeScript type for the params prop in Next.js 15 App Router pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string | string[] | undefined }>. As of v15.0.0-RC, params became asynchronous and must be awaited or unwrapped with React's use() function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15Uct3" prefix="r1709" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5975772335422533852"],"question":[0,"What is the TypeScript type of the parent parameter in generateMetadata?"],"answer":[0,"ResolvingMetadata - a promise of the resolved metadata from parent route segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-of-the-parent-parameter-in-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-of-the-parent-parameter-in-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-of-the-parent-parameter-in-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type of the parent parameter in generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ResolvingMetadata - a promise of the resolved metadata from parent route segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zyfsge" prefix="r1710" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6160176339191399722"],"question":[0,"What HTTP methods are supported as named exports in Next.js route handlers?"],"answer":[0,"GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-are-supported-as-named-exports-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-are-supported-as-named-exports-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-are-supported-as-named-exports-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods are supported as named exports in Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZV21dX" prefix="r1711" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6778660466171663291"],"question":[0,"What TypeScript type is returned by the useParams hook in Next.js?"],"answer":[0,"An object containing the current route's dynamic parameters, where each value is either a string or string[] (for catch-all segments). Returns an empty object {} if no dynamic parameters exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-is-returned-by-the-useparams-hook-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-is-returned-by-the-useparams-hook-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-is-returned-by-the-useparams-hook-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type is returned by the useParams hook in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An object containing the current route's dynamic parameters, where each value is either a string or string[] (for catch-all segments). Returns an empty object {} if no dynamic parameters exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17O2eQ" prefix="r1712" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6797053220147948399"],"question":[0,"In Next.js v14 and earlier, were params and searchParams synchronous or asynchronous?"],"answer":[0,"Synchronous. They were plain objects that could be accessed directly without await or use()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-v14-and-earlier-were-params-and-searchparams-synchronous-or-asynchron"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-v14-and-earlier-were-params-and-searchparams-synchronous-or-asynchron" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-v14-and-earlier-were-params-and-searchparams-synchronous-or-asynchron" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js v14 and earlier, were params and searchParams synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Synchronous. They were plain objects that could be accessed directly without await or use().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpCGes" prefix="r1713" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6846630165116314972"],"question":[0,"When does useSelectedLayoutSegment return null?"],"answer":[0,"When navigating to the root path from a layout, or when no child segment exists below the current layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-useselectedlayoutsegment-return-null"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-useselectedlayoutsegment-return-null" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-useselectedlayoutsegment-return-null" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does useSelectedLayoutSegment return null?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When navigating to the root path from a layout, or when no child segment exists below the current layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ngzFH" prefix="r1714" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8158324161188739722"],"question":[0,"What does router.back() do in Next.js App Router?"],"answer":[0,"Navigates back to the previous route in the browser's history stack. Takes no parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-router-back-do-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-router-back-do-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-router-back-do-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does router.back() do in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Navigates back to the previous route in the browser's history stack. Takes no parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhuNwE" prefix="r1715" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8191309742406981326"],"question":[0,"What is the TypeScript return type of useSelectedLayoutSegment()?"],"answer":[0,"string | null. Returns a string of the active segment or null if one doesn't exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-return-type-of-useselectedlayoutsegment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-return-type-of-useselectedlayoutsegment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-return-type-of-useselectedlayoutsegment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript return type of useSelectedLayoutSegment()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>string | null. Returns a string of the active segment or null if one doesn't exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2g7PVG" prefix="r1716" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8674649759714712813"],"question":[0,"Can layouts access searchParams in Next.js?"],"answer":[0,"No. Layouts do not rerender on navigation, so they cannot access search params. Use the Page component's searchParams prop or useSearchParams() hook in Client Components instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"can-layouts-access-searchparams-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-layouts-access-searchparams-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-layouts-access-searchparams-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can layouts access searchParams in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Layouts do not rerender on navigation, so they cannot access search params. Use the Page component's searchParams prop or useSearchParams() hook in Client Components instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23mSqy" prefix="r1717" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8726653415075173090"],"question":[0,"What TypeScript signature does router.push() accept in the App Router?"],"answer":[0,"router.push(href: string, { scroll: boolean }). The href is a string, and the optional second parameter is an object with a scroll property that defaults to true."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-signature-does-router-push-accept-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-signature-does-router-push-accept-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-signature-does-router-push-accept-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript signature does router.push() accept in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.push(href: string, { scroll: boolean }). The href is a string, and the optional second parameter is an object with a scroll property that defaults to true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Q7jwG" prefix="r1718" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9188340947207391106"],"question":[0,"What is the TypeScript return type of usePathname()?"],"answer":[0,"string - representing the current URL's pathname. Does not take any parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-pathname"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-return-type-of-usepathname"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-return-type-of-usepathname" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-return-type-of-usepathname" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript return type of usePathname()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>string - representing the current URL's pathname. Does not take any parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-pathname" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1s5bhP" prefix="r1719" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9412329560090915508"],"question":[0,"What is the exact TypeScript type for the searchParams prop in Next.js 15 App Router pages?"],"answer":[0,"Promise<{ [key: string]: string | string[] | undefined }>. As of v15.0.0-RC, searchParams became asynchronous and must be awaited or unwrapped with React's use() function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-typescript-type-for-the-searchparams-prop-in-next-js-15-app-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-typescript-type-for-the-searchparams-prop-in-next-js-15-app-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-typescript-type-for-the-searchparams-prop-in-next-js-15-app-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact TypeScript type for the searchParams prop in Next.js 15 App Router pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string | string[] | undefined }>. As of v15.0.0-RC, searchParams became asynchronous and must be awaited or unwrapped with React's use() function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Me8NB" prefix="r1720" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9473010402800464042"],"question":[0,"What does router.refresh() do in Next.js App Router?"],"answer":[0,"Refreshes the current route, making a new request to the server and re-fetching data requests. Takes no parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-router-refresh-do-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-router-refresh-do-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-router-refresh-do-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does router.refresh() do in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Refreshes the current route, making a new request to the server and re-fetching data requests. Takes no parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdUO5w" prefix="r1721" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10365256131010681938"],"question":[0,"What is the exact TypeScript signature for a GET route handler in Next.js App Router?"],"answer":[0,"export async function GET(request: NextRequest, context?: { params: Promise<Record<string, string | string[]>> }): Promise<Response>. Both parameters are optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-typescript-signature-for-a-get-route-handler-in-next-js-app-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-typescript-signature-for-a-get-route-handler-in-next-js-app-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-typescript-signature-for-a-get-route-handler-in-next-js-app-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact TypeScript signature for a GET route handler in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export async function GET(request: NextRequest, context?: { params: Promise<Record<string, string | string[]>> }): Promise<Response>. Both parameters are optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1603IJ" prefix="r1722" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10757212990329512868"],"question":[0,"What TypeScript signature does generateMetadata accept?"],"answer":[0,"async function generateMetadata({ params, searchParams }: Props, parent: ResolvingMetadata): Promise<Metadata>. Both params and searchParams are Promises, and parent is of type ResolvingMetadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-signature-does-generatemetadata-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-signature-does-generatemetadata-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-signature-does-generatemetadata-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript signature does generateMetadata accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>async function generateMetadata({ params, searchParams }: Props, parent: ResolvingMetadata): Promise<Metadata>. Both params and searchParams are Promises, and parent is of type ResolvingMetadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2umk3C" prefix="r1723" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10806370211232204097"],"question":[0,"What is the TypeScript type for params prop in Next.js 15 layouts?"],"answer":[0,"Promise<Record<string, string | string[]>>. As of v15.0.0-RC, params became asynchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-for-params-prop-in-next-js-15-layouts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-for-params-prop-in-next-js-15-layouts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-for-params-prop-in-next-js-15-layouts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type for params prop in Next.js 15 layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<Record<string, string | string[]>>. As of v15.0.0-RC, params became asynchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27gbAv" prefix="r1724" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11359660973889552434"],"question":[0,"What is the default value of the typedRoutes configuration option in Next.js?"],"answer":[0,"false (disabled by default). You must explicitly set `typedRoutes: true` in next.config.ts to enable statically typed links."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typedroutes-configuration-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typedroutes-configuration-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typedroutes-configuration-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the typedRoutes configuration option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false (disabled by default). You must explicitly set <code>typedRoutes: true</code> in next.config.ts to enable statically typed links.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cyk22" prefix="r1725" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11600026036047785082"],"question":[0,"Can useParams be used in Server Components?"],"answer":[0,"No. useParams is a Client Component hook and must be used in components marked with 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"can-useparams-be-used-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-useparams-be-used-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-useparams-be-used-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can useParams be used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. useParams is a Client Component hook and must be used in components marked with 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrAyDq" prefix="r1726" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12283454400908251781"],"question":[0,"What TypeScript type should be used to cast non-literal href strings when typedRoutes is enabled?"],"answer":[0,"Use `as Route` to cast non-literal href strings. For example: `<Link href={('/blog/' + slug) as Route} />`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-should-be-used-to-cast-non-literal-href-strings-when-typedr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-should-be-used-to-cast-non-literal-href-strings-when-typedr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-should-be-used-to-cast-non-literal-href-strings-when-typedr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type should be used to cast non-literal href strings when typedRoutes is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>as Route</code> to cast non-literal href strings. For example: <code><Link href={('/blog/' + slug) as Route} /></code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wUfrT" prefix="r1727" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12344770057923330143"],"question":[0,"What is the TypeScript return type of useSelectedLayoutSegments()?"],"answer":[0,"string[] - an array of strings containing the active segments one level down from the layout the hook was called from, or an empty array if none exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-return-type-of-useselectedlayoutsegments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-return-type-of-useselectedlayoutsegments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-return-type-of-useselectedlayoutsegments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript return type of useSelectedLayoutSegments()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>string[] - an array of strings containing the active segments one level down from the layout the hook was called from, or an empty array if none exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="JnN7M" prefix="r1728" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12536450785315517871"],"question":[0,"From which package should useRouter be imported when using the App Router?"],"answer":[0,"'next/navigation' (not 'next/router' which is for Pages Router)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"from-which-package-should-userouter-be-imported-when-using-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="from-which-package-should-userouter-be-imported-when-using-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#from-which-package-should-userouter-be-imported-when-using-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">From which package should useRouter be imported when using the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'next/navigation' (not 'next/router' which is for Pages Router).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="195X64" prefix="r1729" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12984159750709285741"],"question":[0,"What TypeScript type helper can be used to type the context parameter in route handlers?"],"answer":[0,"RouteContext<'/route/path'>. This is a globally available helper that provides strongly-typed parameter access. Example: ctx: RouteContext<'/users/[id]'>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-helper-can-be-used-to-type-the-context-parameter-in-route-h"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-helper-can-be-used-to-type-the-context-parameter-in-route-h" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-helper-can-be-used-to-type-the-context-parameter-in-route-h" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type helper can be used to type the context parameter in route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>RouteContext<'/route/path'>. This is a globally available helper that provides strongly-typed parameter access. Example: ctx: RouteContext<'/users/[id]'></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="yQdOf" prefix="r1730" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13796330117255977247"],"question":[0,"What TypeScript signature does router.prefetch() accept in the App Router?"],"answer":[0,"router.prefetch(href: string, options?: { onInvalidate?: () => void }). The onInvalidate callback is optional and is called when the prefetched data becomes stale."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-signature-does-router-prefetch-accept-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-signature-does-router-prefetch-accept-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-signature-does-router-prefetch-accept-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript signature does router.prefetch() accept in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.prefetch(href: string, options?: { onInvalidate?: () => void }). The onInvalidate callback is optional and is called when the prefetched data becomes stale.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LFWRE" prefix="r1731" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14117173793849154187"],"question":[0,"In Next.js 15, how must params be accessed in Server Components?"],"answer":[0,"Using async/await. For example: `const { slug } = await params`. The params prop is now a Promise that must be awaited."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-how-must-params-be-accessed-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-how-must-params-be-accessed-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-how-must-params-be-accessed-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, how must params be accessed in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using async/await. For example: <code>const { slug } = await params</code>. The params prop is now a Promise that must be awaited.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xdyPs" prefix="r1732" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14659813059502330004"],"question":[0,"Can usePathname be used in Server Components?"],"answer":[0,"No. usePathname intentionally requires using a Client Component and must be used with the 'use client' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-pathname"]]],"topic":[0,"nextjs"],"slug":[0,"can-usepathname-be-used-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-usepathname-be-used-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-usepathname-be-used-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can usePathname be used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. usePathname intentionally requires using a Client Component and must be used with the 'use client' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-pathname" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29DWx0" prefix="r1733" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14921899353355923775"],"question":[0,"What is the TypeScript return type of the redirect() function in Next.js?"],"answer":[0,"never. The function throws an error to terminate rendering, which is why it uses the TypeScript never type and does not require using `return redirect()`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-return-type-of-the-redirect-function-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-return-type-of-the-redirect-function-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-return-type-of-the-redirect-function-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript return type of the redirect() function in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>never. The function throws an error to terminate rendering, which is why it uses the TypeScript never type and does not require using <code>return redirect()</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="routing-advanced-routing-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Routing > Advanced Routing Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 41 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZkgcF6" prefix="r1734" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"216777769287997166"],"question":[0,"What is the purpose of the default.js file in Next.js parallel routes?"],"answer":[0,"The default.js file serves as a fallback component in parallel routes when Next.js cannot recover a slot's active state following a full-page load (hard navigation)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-default-js-file-in-next-js-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-default-js-file-in-next-js-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-default-js-file-in-next-js-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the default.js file in Next.js parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default.js file serves as a fallback component in parallel routes when Next.js cannot recover a slot's active state following a full-page load (hard navigation).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1og3z2" prefix="r1735" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"526915096473147175"],"question":[0,"Do route groups appear in the array returned by useSelectedLayoutSegments in Next.js?"],"answer":[0,"Yes. The returned segments include Route Groups, which you might not want to be included in your UI. Use JavaScript's filter() method to remove items starting with brackets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments"]]],"topic":[0,"nextjs"],"slug":[0,"do-route-groups-appear-in-the-array-returned-by-useselectedlayoutsegments-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-route-groups-appear-in-the-array-returned-by-useselectedlayoutsegments-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-route-groups-appear-in-the-array-returned-by-useselectedlayoutsegments-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do route groups appear in the array returned by useSelectedLayoutSegments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The returned segments include Route Groups, which you might not want to be included in your UI. Use JavaScript's filter() method to remove items starting with brackets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pmxUK" prefix="r1736" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"953978702713031062"],"question":[0,"Does the implicit children slot require a default.js file in Next.js?"],"answer":[0,"Yes. The children implicit slot requires default.js to prevent 404 responses when active state cannot be recovered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-implicit-children-slot-require-a-default-js-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-implicit-children-slot-require-a-default-js-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-implicit-children-slot-require-a-default-js-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the implicit children slot require a default.js file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The children implicit slot requires default.js to prevent 404 responses when active state cannot be recovered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uws8C" prefix="r1737" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1242149614487834451"],"question":[0,"What is the exact syntax for creating a route group in Next.js?"],"answer":[0,"Route groups are created by wrapping a folder's name in parentheses: (folderName). For example, (marketing) or (shop)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-creating-a-route-group-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-creating-a-route-group-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-creating-a-route-group-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for creating a route group in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route groups are created by wrapping a folder's name in parentheses: (folderName). For example, (marketing) or (shop).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NIWsJ" prefix="r1738" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1338753748350392741"],"question":[0,"Do route groups appear in the URL path in Next.js?"],"answer":[0,"No. The folder is for organizational purposes and should not be included in the route's URL path. Route groups are transparent to URL generation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"do-route-groups-appear-in-the-url-path-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-route-groups-appear-in-the-url-path-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-route-groups-appear-in-the-url-path-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do route groups appear in the URL path in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The folder is for organizational purposes and should not be included in the route's URL path. Route groups are transparent to URL generation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26maki" prefix="r1739" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1596764139412973076"],"question":[0,"What is the exact syntax for optional catch-all segments in Next.js?"],"answer":[0,"Use [[...folderName]] with three dots inside double square brackets. For example, app/shop/[[...slug]]/page.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-optional-catch-all-segments-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-optional-catch-all-segments-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-optional-catch-all-segments-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for optional catch-all segments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use [[...folderName]] with three dots inside double square brackets. For example, app/shop/[[...slug]]/page.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ant37" prefix="r1740" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1672668891921031192"],"question":[0,"Can you mix static and dynamic slots at the same route segment level in Next.js parallel routes?"],"answer":[0,"No. If one slot is dynamic, all slots at that level must be dynamic. Static and dynamic slots cannot coexist at the same route segment level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-mix-static-and-dynamic-slots-at-the-same-route-segment-level-in-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-mix-static-and-dynamic-slots-at-the-same-route-segment-level-in-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-mix-static-and-dynamic-slots-at-the-same-route-segment-level-in-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you mix static and dynamic slots at the same route segment level in Next.js parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. If one slot is dynamic, all slots at that level must be dynamic. Static and dynamic slots cannot coexist at the same route segment level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="iNtrp" prefix="r1741" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3145833246278495947"],"question":[0,"How does template.js differ from layout.js in Next.js regarding state persistence?"],"answer":[0,"Layouts persist across routes and maintain state, while templates receive unique keys and reset child component state on navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-template-js-differ-from-layout-js-in-next-js-regarding-state-persistenc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-template-js-differ-from-layout-js-in-next-js-regarding-state-persistenc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-template-js-differ-from-layout-js-in-next-js-regarding-state-persistenc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does template.js differ from layout.js in Next.js regarding state persistence?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layouts persist across routes and maintain state, while templates receive unique keys and reset child component state on navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z26ixGv" prefix="r1742" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3256779556782683064"],"question":[0,"Do search parameter changes trigger template remounts in Next.js?"],"answer":[0,"No. Search parameter changes do not trigger remounts for template.js files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"do-search-parameter-changes-trigger-template-remounts-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-search-parameter-changes-trigger-template-remounts-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-search-parameter-changes-trigger-template-remounts-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do search parameter changes trigger template remounts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Search parameter changes do not trigger remounts for template.js files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vjnQN" prefix="r1743" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3425625271156984909"],"question":[0,"Can you add a layout inside a parallel route slot in Next.js?"],"answer":[0,"Yes. You can add a layout inside a slot to allow users to navigate the slot independently. This is useful for creating tabs with sub-navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-add-a-layout-inside-a-parallel-route-slot-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-add-a-layout-inside-a-parallel-route-slot-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-add-a-layout-inside-a-parallel-route-slot-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you add a layout inside a parallel route slot in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can add a layout inside a slot to allow users to navigate the slot independently. This is useful for creating tabs with sub-navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RwcUy" prefix="r1744" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3987787797002887667"],"question":[0,"What is the implicit slot in Next.js that doesn't need to be mapped to a folder?"],"answer":[0,"The children prop is an implicit slot that does not need to be mapped to a folder. app/page.js is equivalent to app/@children/page.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-implicit-slot-in-next-js-that-doesn-t-need-to-be-mapped-to-a-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-implicit-slot-in-next-js-that-doesn-t-need-to-be-mapped-to-a-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-implicit-slot-in-next-js-that-doesn-t-need-to-be-mapped-to-a-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the implicit slot in Next.js that doesn't need to be mapped to a folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The children prop is an implicit slot that does not need to be mapped to a folder. app/page.js is equivalent to app/@children/page.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB9FDd" prefix="r1745" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4449503927576871068"],"question":[0,"What does useSelectedLayoutSegment return when called from app/layout.js with URL /dashboard in Next.js?"],"answer":[0,"Returns 'dashboard' (as a string)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useselectedlayoutsegment-return-when-called-from-app-layout-js-with-ur"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useselectedlayoutsegment-return-when-called-from-app-layout-js-with-ur" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useselectedlayoutsegment-return-when-called-from-app-layout-js-with-ur" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSelectedLayoutSegment return when called from app/layout.js with URL /dashboard in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns 'dashboard' (as a string).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Pm93r" prefix="r1746" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4618049577496070429"],"question":[0,"Was the params prop synchronous in Next.js 14?"],"answer":[0,"Yes. In version 14 and earlier, params was a synchronous prop. This synchronous access is deprecated in Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"was-the-params-prop-synchronous-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="was-the-params-prop-synchronous-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#was-the-params-prop-synchronous-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Was the params prop synchronous in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. In version 14 and earlier, params was a synchronous prop. This synchronous access is deprecated in Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DS9m1" prefix="r1747" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4746602994930610563"],"question":[0,"What type of navigation occurs when navigating between different root layouts in Next.js?"],"answer":[0,"Navigating across multiple root layouts will cause a full page load (as opposed to a client-side navigation)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-navigation-occurs-when-navigating-between-different-root-layouts-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-navigation-occurs-when-navigating-between-different-root-layouts-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-navigation-occurs-when-navigating-between-different-root-layouts-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of navigation occurs when navigating between different root layouts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Navigating across multiple root layouts will cause a full page load (as opposed to a client-side navigation).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdcngM" prefix="r1748" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4872096872124068281"],"question":[0,"Is the params prop synchronous or asynchronous in Next.js 15?"],"answer":[0,"In Next.js 15, the params prop is a Promise and must be accessed using async/await or React's use() function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-params-prop-synchronous-or-asynchronous-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-params-prop-synchronous-or-asynchronous-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-params-prop-synchronous-or-asynchronous-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the params prop synchronous or asynchronous in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, the params prop is a Promise and must be accessed using async/await or React's use() function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVAOo5" prefix="r1749" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5082657766362919465"],"question":[0,"What happens when routes in different route groups resolve to the same URL path in Next.js?"],"answer":[0,"It causes an error. Routes in different groups should not resolve to the same URL path. For example, (marketing)/about/page.js and (shop)/about/page.js both producing /about generates an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-routes-in-different-route-groups-resolve-to-the-same-url-path-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-routes-in-different-route-groups-resolve-to-the-same-url-path-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-routes-in-different-route-groups-resolve-to-the-same-url-path-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when routes in different route groups resolve to the same URL path in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It causes an error. Routes in different groups should not resolve to the same URL path. For example, (marketing)/about/page.js and (shop)/about/page.js both producing /about generates an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RQ7fb" prefix="r1750" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5232425735136700466"],"question":[0,"What happens to Client Component state inside a template.js on navigation in Next.js?"],"answer":[0,"Any Client Component inside the template will reset its state on navigation. Effects automatically re-synchronize as the component remounts, and DOM elements are fully recreated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-client-component-state-inside-a-template-js-on-navigation-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-client-component-state-inside-a-template-js-on-navigation-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-client-component-state-inside-a-template-js-on-navigation-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to Client Component state inside a template.js on navigation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any Client Component inside the template will reset its state on navigation. Effects automatically re-synchronize as the component remounts, and DOM elements are fully recreated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fDChV" prefix="r1751" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5420333231716346055"],"question":[0,"What are the two recommended methods to close a modal created with intercepting routes in Next.js?"],"answer":[0,"You can close the modal by calling router.back() or by using the Link component with the replace prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-recommended-methods-to-close-a-modal-created-with-intercepting-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-recommended-methods-to-close-a-modal-created-with-intercepting-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-recommended-methods-to-close-a-modal-created-with-intercepting-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two recommended methods to close a modal created with intercepting routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can close the modal by calling router.back() or by using the Link component with the replace prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VmCOY" prefix="r1752" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5554554028283416074"],"question":[0,"What does useSelectedLayoutSegments return from root layout at /dashboard/settings in Next.js?"],"answer":[0,"Returns ['dashboard', 'settings']."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useselectedlayoutsegments-return-from-root-layout-at-dashboard-setting"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useselectedlayoutsegments-return-from-root-layout-at-dashboard-setting" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useselectedlayoutsegments-return-from-root-layout-at-dashboard-setting" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSelectedLayoutSegments return from root layout at /dashboard/settings in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns ['dashboard', 'settings'].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1anUcz" prefix="r1753" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5820268258604805680"],"question":[0,"Does a catch-all segment [...slug] match the base route without parameters in Next.js?"],"answer":[0,"No. app/shop/[...slug]/page.js will match /shop/clothes and /shop/clothes/tops, but cannot match the base route /shop alone."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"does-a-catch-all-segment-slug-match-the-base-route-without-parameters-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-a-catch-all-segment-slug-match-the-base-route-without-parameters-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-a-catch-all-segment-slug-match-the-base-route-without-parameters-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does a catch-all segment [...slug] match the base route without parameters in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. app/shop/[...slug]/page.js will match /shop/clothes and /shop/clothes/tops, but cannot match the base route /shop alone.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkeVLn" prefix="r1754" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6133983353672961144"],"question":[0,"What format does Next.js return for catch-all segment parameters?"],"answer":[0,"Returns values as an array. The route /shop/a/b/c produces { slug: ['a', 'b', 'c'] }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-does-next-js-return-for-catch-all-segment-parameters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-does-next-js-return-for-catch-all-segment-parameters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-does-next-js-return-for-catch-all-segment-parameters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format does Next.js return for catch-all segment parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns values as an array. The route /shop/a/b/c produces { slug: ['a', 'b', 'c'] }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOomkE" prefix="r1755" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6355453456858350142"],"question":[0,"When does a template.js file remount in Next.js?"],"answer":[0,"Templates remount when their segment level changes, including dynamic parameters. They only remount if their own segment or any child segment within their level changes—not for deeper navigations or search parameter changes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-a-template-js-file-remount-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-a-template-js-file-remount-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-a-template-js-file-remount-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does a template.js file remount in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Templates remount when their segment level changes, including dynamic parameters. They only remount if their own segment or any child segment within their level changes—not for deeper navigations or search parameter changes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hN5TP" prefix="r1756" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7141027101440940282"],"question":[0,"What is the syntax for intercepting routes one level above in Next.js?"],"answer":[0,"Use (..) to match segments one level above. For example, (..)photo intercepts the photo segment one level up."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-intercepting-routes-one-level-above-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-intercepting-routes-one-level-above-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-intercepting-routes-one-level-above-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for intercepting routes one level above in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use (..) to match segments one level above. For example, (..)photo intercepts the photo segment one level up.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sQxpa" prefix="r1757" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7325486482179474901"],"question":[0,"Do parallel route slots affect the URL structure in Next.js?"],"answer":[0,"No. Slots are not route segments and do not affect the URL structure. The URL reflects only the regular page path, not slot names."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-parallel-route-slots-affect-the-url-structure-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-parallel-route-slots-affect-the-url-structure-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-parallel-route-slots-affect-the-url-structure-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do parallel route slots affect the URL structure in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Slots are not route segments and do not affect the URL structure. The URL reflects only the regular page path, not slot names.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2iwFgf" prefix="r1758" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8288551613210404744"],"question":[0,"What happens to unmatched parallel route slots during a full-page reload in Next.js?"],"answer":[0,"During hard navigation (page refresh), unmatched slots render their default.js file. If no default.js exists, a 404 is displayed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-unmatched-parallel-route-slots-during-a-full-page-reload-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-unmatched-parallel-route-slots-during-a-full-page-reload-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-unmatched-parallel-route-slots-during-a-full-page-reload-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to unmatched parallel route slots during a full-page reload in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During hard navigation (page refresh), unmatched slots render their default.js file. If no default.js exists, a 404 is displayed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27pMOM" prefix="r1759" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9460039249832465867"],"question":[0,"When does route interception happen in Next.js - during client-side navigation or direct URL access?"],"answer":[0,"Interception happens during client-side navigation (soft navigation) when users click links within the application. It does NOT happen when navigating via shareable URLs, direct URL entry, or page refresh (hard navigation)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-route-interception-happen-in-next-js-during-client-side-navigation-or-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-route-interception-happen-in-next-js-during-client-side-navigation-or-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-route-interception-happen-in-next-js-during-client-side-navigation-or-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does route interception happen in Next.js - during client-side navigation or direct URL access?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Interception happens during client-side navigation (soft navigation) when users click links within the application. It does NOT happen when navigating via shareable URLs, direct URL entry, or page refresh (hard navigation).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="p74Uf" prefix="r1760" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9560390596328030643"],"question":[0,"What does useSelectedLayoutSegment return in Next.js?"],"answer":[0,"Returns a string of the active segment one level below the Layout it is called from, or null if none exists."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useselectedlayoutsegment-return-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useselectedlayoutsegment-return-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useselectedlayoutsegment-return-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSelectedLayoutSegment return in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns a string of the active segment one level below the Layout it is called from, or null if none exists.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zz7lP0" prefix="r1761" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10421052484826999385"],"question":[0,"What type does useSelectedLayoutSegments return in Next.js?"],"answer":[0,"Returns an array of strings containing active segments one level below the calling layout. Returns an empty array if no child segments exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-does-useselectedlayoutsegments-return-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-does-useselectedlayoutsegments-return-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-does-useselectedlayoutsegments-return-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type does useSelectedLayoutSegments return in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns an array of strings containing active segments one level below the calling layout. Returns an empty array if no child segments exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13MSdE" prefix="r1762" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10561890827143104128"],"question":[0,"What does useSelectedLayoutSegment return when called from app/layout.js with URL / in Next.js?"],"answer":[0,"Returns null."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useselectedlayoutsegment-return-when-called-from-app-layout-js-with-ur"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useselectedlayoutsegment-return-when-called-from-app-layout-js-with-ur" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useselectedlayoutsegment-return-when-called-from-app-layout-js-with-ur" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSelectedLayoutSegment return when called from app/layout.js with URL / in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns null.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BpLH1" prefix="r1763" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10646333680642282855"],"question":[0,"Can useSelectedLayoutSegment be called in Server Components in Next.js?"],"answer":[0,"No. It is a Client Component hook. Since layouts are Server Components by default, useSelectedLayoutSegment is usually called via a Client Component that is imported into a Layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"can-useselectedlayoutsegment-be-called-in-server-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-useselectedlayoutsegment-be-called-in-server-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-useselectedlayoutsegment-be-called-in-server-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can useSelectedLayoutSegment be called in Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It is a Client Component hook. Since layouts are Server Components by default, useSelectedLayoutSegment is usually called via a Client Component that is imported into a Layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nGc4Q" prefix="r1764" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10845623125971626287"],"question":[0,"Do @slot folders count as route segments when calculating interception levels in Next.js?"],"answer":[0,"No. The (..) convention is based on route segments, not the file-system. It does not consider @slot folders in Parallel Routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-slot-folders-count-as-route-segments-when-calculating-interception-levels-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-slot-folders-count-as-route-segments-when-calculating-interception-levels-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-slot-folders-count-as-route-segments-when-calculating-interception-levels-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do @slot folders count as route segments when calculating interception levels in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The (..) convention is based on route segments, not the file-system. It does not consider @slot folders in Parallel Routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJbjhS" prefix="r1765" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10945628744577575875"],"question":[0,"What is the exact syntax for intercepting routes at the same level in Next.js?"],"answer":[0,"Use (.) to match segments at the same level. For example, (.)photo intercepts the photo segment at the current level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-intercepting-routes-at-the-same-level-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-intercepting-routes-at-the-same-level-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-intercepting-routes-at-the-same-level-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for intercepting routes at the same level in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use (.) to match segments at the same level. For example, (.)photo intercepts the photo segment at the current level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bl4nl" prefix="r1766" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11066284861524275786"],"question":[0,"What is the syntax for intercepting routes from the root app directory in Next.js?"],"answer":[0,"Use (...) to match segments from the root app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-intercepting-routes-from-the-root-app-directory-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-intercepting-routes-from-the-root-app-directory-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-intercepting-routes-from-the-root-app-directory-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for intercepting routes from the root app directory in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use (...) to match segments from the root app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17FuVx" prefix="r1767" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11576798323441772345"],"question":[0,"How do you read the active segment within a parallel route slot using useSelectedLayoutSegment?"],"answer":[0,"Pass the slot name as the parallelRoutesKey parameter. For example, useSelectedLayoutSegment('auth') returns the active segment within the @auth slot."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-read-the-active-segment-within-a-parallel-route-slot-using-useselecte"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-read-the-active-segment-within-a-parallel-route-slot-using-useselecte" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-read-the-active-segment-within-a-parallel-route-slot-using-useselecte" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you read the active segment within a parallel route slot using useSelectedLayoutSegment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pass the slot name as the parallelRoutesKey parameter. For example, useSelectedLayoutSegment('auth') returns the active segment within the @auth slot.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16d3JP" prefix="r1768" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13548811611546058152"],"question":[0,"When using multiple root layouts in Next.js without a top-level layout.js, where must the home route (/) be defined?"],"answer":[0,"The home route (/) must be defined within one of the route groups."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-multiple-root-layouts-in-next-js-without-a-top-level-layout-js-where-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-multiple-root-layouts-in-next-js-without-a-top-level-layout-js-where-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-multiple-root-layouts-in-next-js-without-a-top-level-layout-js-where-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using multiple root layouts in Next.js without a top-level layout.js, where must the home route (/) be defined?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The home route (/) must be defined within one of the route groups.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1fTA6B" prefix="r1769" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13670590753547914182"],"question":[0,"What does useSelectedLayoutSegment return when called from app/dashboard/layout.js with URL /dashboard/analytics/monthly?"],"answer":[0,"Returns 'analytics' (only one level down, not the full path)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useselectedlayoutsegment-return-when-called-from-app-dashboard-layout-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useselectedlayoutsegment-return-when-called-from-app-dashboard-layout-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useselectedlayoutsegment-return-when-called-from-app-dashboard-layout-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSelectedLayoutSegment return when called from app/dashboard/layout.js with URL /dashboard/analytics/monthly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns 'analytics' (only one level down, not the full path).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iB9VM" prefix="r1770" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14117580840871409960"],"question":[0,"What does useSelectedLayoutSegments return from any layout at root URL / in Next.js?"],"answer":[0,"Returns an empty array []."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useselectedlayoutsegments-return-from-any-layout-at-root-url-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useselectedlayoutsegments-return-from-any-layout-at-root-url-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useselectedlayoutsegments-return-from-any-layout-at-root-url-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSelectedLayoutSegments return from any layout at root URL / in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns an empty array [].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2agc6B" prefix="r1771" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14242761651954286182"],"question":[0,"Does an optional catch-all segment [[...slug]] match the base route in Next.js?"],"answer":[0,"Yes. app/shop/[[...slug]]/page.js will match /shop, /shop/a, /shop/a/b, etc. With optional catch-all, the route without the parameter is also matched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"does-an-optional-catch-all-segment-slug-match-the-base-route-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-an-optional-catch-all-segment-slug-match-the-base-route-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-an-optional-catch-all-segment-slug-match-the-base-route-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does an optional catch-all segment [[...slug]] match the base route in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. app/shop/[[...slug]]/page.js will match /shop, /shop/a, /shop/a/b, etc. With optional catch-all, the route without the parameter is also matched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23PrPt" prefix="r1772" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14493069162640146124"],"question":[0,"What does Next.js return for the params object when accessing the base route of an optional catch-all segment?"],"answer":[0,"Returns undefined. At /shop with [[...slug]], params become { slug: undefined }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-js-return-for-the-params-object-when-accessing-the-base-route-of-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-js-return-for-the-params-object-when-accessing-the-base-route-of-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-js-return-for-the-params-object-when-accessing-the-base-route-of-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Next.js return for the params object when accessing the base route of an optional catch-all segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Returns undefined. At /shop with [[...slug]], params become { slug: undefined }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZS9iQB" prefix="r1773" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14910097562301372476"],"question":[0,"Can parallel routes have independent loading and error states in Next.js?"],"answer":[0,"Yes. Parallel routes can be streamed independently, allowing you to define independent error and loading states for each route. Each slot can have its own loading.tsx and error.tsx files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"can-parallel-routes-have-independent-loading-and-error-states-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-parallel-routes-have-independent-loading-and-error-states-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-parallel-routes-have-independent-loading-and-error-states-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can parallel routes have independent loading and error states in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Parallel routes can be streamed independently, allowing you to define independent error and loading states for each route. Each slot can have its own loading.tsx and error.tsx files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xJhfj" prefix="r1774" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15102332805932706941"],"question":[0,"What is the syntax for intercepting routes two levels above in Next.js?"],"answer":[0,"Use (..)(..) to match segments two levels above."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-intercepting-routes-two-levels-above-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-intercepting-routes-two-levels-above-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-intercepting-routes-two-levels-above-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for intercepting routes two levels above in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use (..)(..) to match segments two levels above.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-basic-seo-metadata" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > Basic SEO Metadata</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 41 questions </span> </div> <div class="space-y-4"> <astro-island uid="13rnDX" prefix="r1775" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"229909422380218903"],"question":[0,"How do you create multiple icon files?"],"answer":[0,"Add a number suffix to the file name (e.g., icon1.png, icon2.png). Numbered files will sort lexically."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-multiple-icon-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-multiple-icon-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-multiple-icon-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create multiple icon files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add a number suffix to the file name (e.g., icon1.png, icon2.png). Numbered files will sort lexically.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kRVk1" prefix="r1776" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"330798142498155318"],"question":[0,"Which file types can export metadata in Next.js App Router?"],"answer":[0,"Only layout.js, layout.tsx, page.js, and page.tsx files can export metadata objects or generateMetadata functions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"which-file-types-can-export-metadata-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-file-types-can-export-metadata-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-file-types-can-export-metadata-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which file types can export metadata in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only layout.js, layout.tsx, page.js, and page.tsx files can export metadata objects or generateMetadata functions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqXXyx" prefix="r1777" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"382546394540970734"],"question":[0,"What does title.absolute do?"],"answer":[0,"title.absolute ignores title.template set in parent segments, allowing you to provide a title that completely overrides the template."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-title-absolute-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-title-absolute-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-title-absolute-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does title.absolute do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>title.absolute ignores title.template set in parent segments, allowing you to provide a title that completely overrides the template.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="S7Gy8" prefix="r1778" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"419461483435442332"],"question":[0,"What HTML output does the generator metadata field generate?"],"answer":[0,"<meta name=\"generator\" content=\"[value]\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-output-does-the-generator-metadata-field-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-output-does-the-generator-metadata-field-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-output-does-the-generator-metadata-field-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML output does the generator metadata field generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><meta name="generator" content="[value]" /></div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ucNTz" prefix="r1779" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1837587557266343589"],"question":[0,"What OpenGraph field is used for article publication date?"],"answer":[0,"publishedTime (ISO 8601 datetime), which generates <meta property=\"article:published_time\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-opengraph-field-is-used-for-article-publication-date"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-opengraph-field-is-used-for-article-publication-date" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-opengraph-field-is-used-for-article-publication-date" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What OpenGraph field is used for article publication date?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>publishedTime (ISO 8601 datetime), which generates <meta property="article:published_time" /></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OKsGu" prefix="r1780" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3045677902457579644"],"question":[0,"What type of value does openGraph.authors accept for article type?"],"answer":[0,"An array of strings (string[]), where each author name generates a separate <meta property=\"article:author\" /> tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-value-does-opengraph-authors-accept-for-article-type"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-value-does-opengraph-authors-accept-for-article-type" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-value-does-opengraph-authors-accept-for-article-type" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of value does openGraph.authors accept for article type?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of strings (string[]), where each author name generates a separate <meta property="article:author" /> tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1G1zQN" prefix="r1781" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3530969006544096662"],"question":[0,"What is the priority order between file-based and config-based metadata?"],"answer":[0,"File-based metadata has higher priority and will override config-based metadata (metadata object or generateMetadata function)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-priority-order-between-file-based-and-config-based-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-priority-order-between-file-based-and-config-based-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-priority-order-between-file-based-and-config-based-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the priority order between file-based and config-based metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>File-based metadata has higher priority and will override config-based metadata (metadata object or generateMetadata function).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SAnPL" prefix="r1782" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3582682433737220861"],"question":[0,"What two meta tags does Next.js automatically add even if metadata is not defined?"],"answer":[0,"Next.js adds <meta charset=\"utf-8\" /> and <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-meta-tags-does-next-js-automatically-add-even-if-metadata-is-not-define"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-meta-tags-does-next-js-automatically-add-even-if-metadata-is-not-define" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-meta-tags-does-next-js-automatically-add-even-if-metadata-is-not-define" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two meta tags does Next.js automatically add even if metadata is not defined?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js adds <meta charset="utf-8" /> and <meta name="viewport" content="width=device-width, initial-scale=1" /></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MoR8D" prefix="r1783" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3729023243224440168"],"question":[0,"What file must you create to define a web app manifest in Next.js?"],"answer":[0,"app/manifest.ts or app/manifest.js that returns a Manifest object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-must-you-create-to-define-a-web-app-manifest-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-must-you-create-to-define-a-web-app-manifest-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-must-you-create-to-define-a-web-app-manifest-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file must you create to define a web app manifest in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>app/manifest.ts or app/manifest.js that returns a Manifest object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UWvuK" prefix="r1784" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3806213532448976772"],"question":[0,"What CSS layout features are NOT supported in ImageResponse for OG images?"],"answer":[0,"Advanced layouts like display: grid will not work. ImageResponse only supports flexbox and limited CSS properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-css-layout-features-are-not-supported-in-imageresponse-for-og-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-css-layout-features-are-not-supported-in-imageresponse-for-og-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-css-layout-features-are-not-supported-in-imageresponse-for-og-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSS layout features are NOT supported in ImageResponse for OG images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Advanced layouts like display: grid will not work. ImageResponse only supports flexbox and limited CSS properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1TRhY5" prefix="r1785" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4051521165878859266"],"question":[0,"What Twitter card type value is used for large image previews?"],"answer":[0,"'summary_large_image'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-twitter-card-type-value-is-used-for-large-image-previews"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-twitter-card-type-value-is-used-for-large-image-previews" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-twitter-card-type-value-is-used-for-large-image-previews" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Twitter card type value is used for large image previews?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'summary_large_image'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="l8QAQ" prefix="r1786" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4674194721645442493"],"question":[0,"What sizes attribute is added to SVG icons?"],"answer":[0,"sizes=\"any\" is added when the extension is .svg or the image size cannot be determined."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-sizes-attribute-is-added-to-svg-icons"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-sizes-attribute-is-added-to-svg-icons" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-sizes-attribute-is-added-to-svg-icons" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What sizes attribute is added to SVG icons?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sizes="any" is added when the extension is .svg or the image size cannot be determined.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UQ2c0" prefix="r1787" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4975074497749986177"],"question":[0,"What are the exact property names in the verification metadata object?"],"answer":[0,"google, yandex, yahoo, and other (for custom verification tags)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-property-names-in-the-verification-metadata-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-property-names-in-the-verification-metadata-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-property-names-in-the-verification-metadata-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact property names in the verification metadata object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>google, yandex, yahoo, and other (for custom verification tags).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="QGvDT" prefix="r1788" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5031257056809922222"],"question":[0,"What happens to nested metadata fields like openGraph when a child segment redefines them?"],"answer":[0,"Nested fields like openGraph and robots defined in parent segments are completely overwritten by the child segment, not merged, unless explicitly spread using the spread operator."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-nested-metadata-fields-like-opengraph-when-a-child-segment-redef"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-nested-metadata-fields-like-opengraph-when-a-child-segment-redef" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-nested-metadata-fields-like-opengraph-when-a-child-segment-redef" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to nested metadata fields like openGraph when a child segment redefines them?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Nested fields like openGraph and robots defined in parent segments are completely overwritten by the child segment, not merged, unless explicitly spread using the spread operator.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="f5Q90" prefix="r1789" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5348751578428438160"],"question":[0,"What HTML output does verification.yandex generate?"],"answer":[0,"<meta name=\"yandex-verification\" content=\"[value]\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-output-does-verification-yandex-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-output-does-verification-yandex-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-output-does-verification-yandex-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML output does verification.yandex generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><meta name="yandex-verification" content="[value]" /></div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18DJN4" prefix="r1790" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6345455948730363552"],"question":[0,"Can you export both the metadata object and generateMetadata function from the same route segment?"],"answer":[0,"No. You cannot export both the metadata object and generateMetadata function from the same route segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you export both the metadata object and generateMetadata function from the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot export both the metadata object and generateMetadata function from the same route segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2r7LIh" prefix="r1791" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6512714001176802628"],"question":[0,"In Next.js 15, what type are params and searchParams in generateMetadata?"],"answer":[0,"They are Promises that must be awaited. For example: const { id } = await params"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-what-type-are-params-and-searchparams-in-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-what-type-are-params-and-searchparams-in-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-what-type-are-params-and-searchparams-in-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, what type are params and searchParams in generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>They are Promises that must be awaited. For example: const { id } = await params</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1cpJz3" prefix="r1792" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6689641800850034612"],"question":[0,"Does title.template apply to the segment where it's defined?"],"answer":[0,"No. title.template applies to child route segments only, not the segment it's defined in."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"does-title-template-apply-to-the-segment-where-it-s-defined"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-title-template-apply-to-the-segment-where-it-s-defined" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-title-template-apply-to-the-segment-where-it-s-defined" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does title.template apply to the segment where it's defined?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. title.template applies to child route segments only, not the segment it's defined in.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fB2cs" prefix="r1793" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6977381548884317329"],"question":[0,"How is metadata merged between parent and child segments?"],"answer":[0,"Metadata objects are shallowly merged together. Duplicate keys are replaced based on their ordering, with child values overwriting parent values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-is-metadata-merged-between-parent-and-child-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-is-metadata-merged-between-parent-and-child-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-is-metadata-merged-between-parent-and-child-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How is metadata merged between parent and child segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Metadata objects are shallowly merged together. Duplicate keys are replaced based on their ordering, with child values overwriting parent values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hI7Mo" prefix="r1794" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8028962618040475343"],"question":[0,"Which file types are supported for apple-icon?"],"answer":[0,"Only .jpg, .jpeg, .png (no .ico or .svg)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"which-file-types-are-supported-for-apple-icon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-file-types-are-supported-for-apple-icon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-file-types-are-supported-for-apple-icon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which file types are supported for apple-icon?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only .jpg, .jpeg, .png (no .ico or .svg)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1e6hqf" prefix="r1795" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8111311602562773624"],"question":[0,"What is the exact TypeScript type name to import for metadata?"],"answer":[0,"The type is named 'Metadata' and is imported via: import type { Metadata } from 'next'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-typescript-type-name-to-import-for-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-typescript-type-name-to-import-for-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-typescript-type-name-to-import-for-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact TypeScript type name to import for metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The type is named 'Metadata' and is imported via: import type { Metadata } from 'next'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPoGqc" prefix="r1796" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8207468688575888367"],"question":[0,"What is the default value for the robots metadata field?"],"answer":[0,"The default is 'index,follow' (or 'all' as an alternative), meaning pages can be indexed and links can be followed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-robots-metadata-field"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-robots-metadata-field" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-robots-metadata-field" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the robots metadata field?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is 'index,follow' (or 'all' as an alternative), meaning pages can be indexed and links can be followed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1H8mUC" prefix="r1797" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8370744433566890674"],"question":[0,"Which metadata fields were deprecated in Next.js 14?"],"answer":[0,"viewport, colorScheme, and themeColor were deprecated. Use generateViewport instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-viewport"]]],"topic":[0,"nextjs"],"slug":[0,"which-metadata-fields-were-deprecated-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-metadata-fields-were-deprecated-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-metadata-fields-were-deprecated-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which metadata fields were deprecated in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>viewport, colorScheme, and themeColor were deprecated. Use generateViewport instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-viewport" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZxDzz9" prefix="r1798" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9103778960421859672"],"question":[0,"What rel attribute does apple-icon generate?"],"answer":[0,"rel=\"apple-touch-icon\" (versus rel=\"icon\" for standard icons)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-rel-attribute-does-apple-icon-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-rel-attribute-does-apple-icon-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-rel-attribute-does-apple-icon-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What rel attribute does apple-icon generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>rel="apple-touch-icon" (versus rel="icon" for standard icons)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1I6YJd" prefix="r1799" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9109022727755370750"],"question":[0,"What HTML output does the applicationName metadata field generate?"],"answer":[0,"<meta name=\"application-name\" content=\"[value]\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-output-does-the-applicationname-metadata-field-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-output-does-the-applicationname-metadata-field-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-output-does-the-applicationname-metadata-field-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML output does the applicationName metadata field generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><meta name="application-name" content="[value]" /></div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20NvtB" prefix="r1800" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9709032384682482436"],"question":[0,"What HTML output does the category metadata field generate?"],"answer":[0,"<meta name=\"category\" content=\"[value]\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-output-does-the-category-metadata-field-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-output-does-the-category-metadata-field-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-output-does-the-category-metadata-field-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML output does the category metadata field generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><meta name="category" content="[value]" /></div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1VemS0" prefix="r1801" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10641511728710903219"],"question":[0,"What are the default dimensions for OpenGraph images?"],"answer":[0,"width: 1200, height: 630"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-dimensions-for-opengraph-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-dimensions-for-opengraph-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-dimensions-for-opengraph-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default dimensions for OpenGraph images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>width: 1200, height: 630</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1nlVjr" prefix="r1802" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10826111498397801633"],"question":[0,"What are the valid values for changeFrequency in a sitemap?"],"answer":[0,"'always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', or 'never'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-changefrequency-in-a-sitemap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-changefrequency-in-a-sitemap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-changefrequency-in-a-sitemap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for changeFrequency in a sitemap?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', or 'never'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2saR3l" prefix="r1803" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11180078591156307196"],"question":[0,"Which file types are supported for the icon metadata file?"],"answer":[0,".ico, .jpg, .jpeg, .png, .svg"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"which-file-types-are-supported-for-the-icon-metadata-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-file-types-are-supported-for-the-icon-metadata-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-file-types-are-supported-for-the-icon-metadata-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which file types are supported for the icon metadata file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.ico, .jpg, .jpeg, .png, .svg</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3FlNY" prefix="r1804" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11671738351808269178"],"question":[0,"What format does lastModified accept in a sitemap?"],"answer":[0,"Either a Date string or a Date object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-does-lastmodified-accept-in-a-sitemap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-does-lastmodified-accept-in-a-sitemap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-does-lastmodified-accept-in-a-sitemap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format does lastModified accept in a sitemap?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Either a Date string or a Date object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cxd2S" prefix="r1805" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11729707065625149251"],"question":[0,"What placeholder string is used in title.template?"],"answer":[0,"The %s placeholder is used and will be replaced with the specific page title."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-placeholder-string-is-used-in-title-template"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-placeholder-string-is-used-in-title-template" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-placeholder-string-is-used-in-title-template" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What placeholder string is used in title.template?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The %s placeholder is used and will be replaced with the specific page title.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vPpJM" prefix="r1806" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12562302898329518841"],"question":[0,"Can you generate a favicon.ico programmatically in Next.js?"],"answer":[0,"No. You cannot generate a favicon icon. Only static .ico files are supported for favicon."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-generate-a-favicon-ico-programmatically-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-generate-a-favicon-ico-programmatically-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-generate-a-favicon-ico-programmatically-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you generate a favicon.ico programmatically in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot generate a favicon icon. Only static .ico files are supported for favicon.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mq4I1" prefix="r1807" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12768604305459655497"],"question":[0,"Are metadata exports supported in Client Components?"],"answer":[0,"No. The metadata object and generateMetadata function exports are only supported in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-metadata-exports-supported-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-metadata-exports-supported-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-metadata-exports-supported-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are metadata exports supported in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The metadata object and generateMetadata function exports are only supported in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nTKAu" prefix="r1808" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12933803784223431821"],"question":[0,"What HTML output does verification.google generate?"],"answer":[0,"<meta name=\"google-site-verification\" content=\"[value]\" />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-output-does-verification-google-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-output-does-verification-google-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-output-does-verification-google-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML output does verification.google generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><meta name="google-site-verification" content="[value]" /></div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2foB4k" prefix="r1809" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13081253453728423612"],"question":[0,"Is searchParams available in generateMetadata for layout.js files?"],"answer":[0,"No. searchParams is only available in page.js files, not in layout.js files. Layouts don't receive searchParams because they don't re-render during navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"is-searchparams-available-in-generatemetadata-for-layout-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-searchparams-available-in-generatemetadata-for-layout-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-searchparams-available-in-generatemetadata-for-layout-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is searchParams available in generateMetadata for layout.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. searchParams is only available in page.js files, not in layout.js files. Layouts don't receive searchParams because they don't re-render during navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25JtNg" prefix="r1810" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13543581889983390263"],"question":[0,"What format does the alternates.canonical field accept?"],"answer":[0,"Either a relative path (combined with metadataBase) or an absolute URL string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-does-the-alternates-canonical-field-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-does-the-alternates-canonical-field-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-does-the-alternates-canonical-field-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format does the alternates.canonical field accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Either a relative path (combined with metadataBase) or an absolute URL string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2r74oQ" prefix="r1811" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13603862817845074938"],"question":[0,"Is streaming metadata enabled for bots and crawlers?"],"answer":[0,"No. Streaming metadata is disabled for bots and crawlers that expect metadata in the <head> tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"is-streaming-metadata-enabled-for-bots-and-crawlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-streaming-metadata-enabled-for-bots-and-crawlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-streaming-metadata-enabled-for-bots-and-crawlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is streaming metadata enabled for bots and crawlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Streaming metadata is disabled for bots and crawlers that expect metadata in the <head> tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18aF3I" prefix="r1812" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13790204201272837829"],"question":[0,"Is robots.js cached by default?"],"answer":[0,"Yes. robots.js is a special Route Handler that is cached by default unless it uses a Dynamic API or dynamic config option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"is-robots-js-cached-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-robots-js-cached-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-robots-js-cached-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is robots.js cached by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. robots.js is a special Route Handler that is cached by default unless it uses a Dynamic API or dynamic config option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZM0Sel" prefix="r1813" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14068597159708480357"],"question":[0,"What happens if you use relative URLs in metadata fields without setting metadataBase?"],"answer":[0,"It will cause a build error. metadataBase must be explicitly set to use relative URLs in URL-based metadata fields."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-use-relative-urls-in-metadata-fields-without-setting-metadat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-use-relative-urls-in-metadata-fields-without-setting-metadat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-use-relative-urls-in-metadata-fields-without-setting-metadat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you use relative URLs in metadata fields without setting metadataBase?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It will cause a build error. metadataBase must be explicitly set to use relative URLs in URL-based metadata fields.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UdrIu" prefix="r1814" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14314090956173556509"],"question":[0,"What properties are available in the Robots object?"],"answer":[0,"rules (object or array with userAgent, allow, disallow, crawlDelay), sitemap (string or string array), and host (string)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-the-robots-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-the-robots-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-the-robots-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in the Robots object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>rules (object or array with userAgent, allow, disallow, crawlDelay), sitemap (string or string array), and host (string).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1j4J1" prefix="r1815" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14876477564785927172"],"question":[0,"What is the valid range for the priority field in a sitemap?"],"answer":[0,"A number between 0 and 1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-valid-range-for-the-priority-field-in-a-sitemap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-valid-range-for-the-priority-field-in-a-sitemap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-valid-range-for-the-priority-field-in-a-sitemap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the valid range for the priority field in a sitemap?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A number between 0 and 1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="caching-and-revalidating-revalidation-methods" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Caching and Revalidating > Revalidation Methods</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 41 questions </span> </div> <div class="space-y-4"> <astro-island uid="1o2XC1" prefix="r1816" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"328276810838419853"],"question":[0,"What happens when you call revalidateTag without the second profile argument?"],"answer":[0,"The single-argument form revalidateTag(tag) is deprecated and immediately expires the tag entry, causing a blocking revalidate on the next request. This form may be removed in future versions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-call-revalidatetag-without-the-second-profile-argument"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-call-revalidatetag-without-the-second-profile-argument" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-call-revalidatetag-without-the-second-profile-argument" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you call revalidateTag without the second profile argument?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The single-argument form revalidateTag(tag) is deprecated and immediately expires the tag entry, causing a blocking revalidate on the next request. This form may be removed in future versions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="H1ua5" prefix="r1817" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"460494875692287110"],"question":[0,"What determines the revalidation frequency when multiple layouts and pages in a single route have different revalidate values?"],"answer":[0,"The lowest revalidate value across each layout and page of a single route will determine the revalidation frequency of the entire route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-determines-the-revalidation-frequency-when-multiple-layouts-and-pages-in-a-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-determines-the-revalidation-frequency-when-multiple-layouts-and-pages-in-a-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-determines-the-revalidation-frequency-when-multiple-layouts-and-pages-in-a-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What determines the revalidation frequency when multiple layouts and pages in a single route have different revalidate values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate value across each layout and page of a single route will determine the revalidation frequency of the entire route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjfeyI" prefix="r1818" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"466772013664939726"],"question":[0,"What is the default value for the revalidate export in route segment config?"],"answer":[0,"false"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-export-in-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-export-in-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-export-in-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the revalidate export in route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Vr8n8" prefix="r1819" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"720223772277443848"],"question":[0,"What configuration is required in next.config.js to use cacheTag?"],"answer":[0,"You must enable the cacheComponents flag: const nextConfig = { cacheComponents: true }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-required-in-next-config-js-to-use-cachetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-required-in-next-config-js-to-use-cachetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-required-in-next-config-js-to-use-cachetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is required in next.config.js to use cacheTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must enable the cacheComponents flag: const nextConfig = { cacheComponents: true }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JCnMs" prefix="r1820" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"850006539261136209"],"question":[0,"What happens if an individual fetch request sets a lower revalidate value than the route's default revalidate?"],"answer":[0,"The whole route revalidation interval will be decreased to match the lower value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-an-individual-fetch-request-sets-a-lower-revalidate-value-than-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-an-individual-fetch-request-sets-a-lower-revalidate-value-than-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-an-individual-fetch-request-sets-a-lower-revalidate-value-than-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if an individual fetch request sets a lower revalidate value than the route's default revalidate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The whole route revalidation interval will be decreased to match the lower value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bLdBN" prefix="r1821" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"922303263251461820"],"question":[0,"How does updateTag differ from revalidateTag in terms of cache behavior?"],"answer":[0,"updateTag immediately expires the cached data and the next request will wait to fetch fresh data. revalidateTag (with profile=\"max\") can serve stale content while revalidating in the background."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-updatetag-differ-from-revalidatetag-in-terms-of-cache-behavior"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-updatetag-differ-from-revalidatetag-in-terms-of-cache-behavior" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-updatetag-differ-from-revalidatetag-in-terms-of-cache-behavior" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does updateTag differ from revalidateTag in terms of cache behavior?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateTag immediately expires the cached data and the next request will wait to fetch fresh data. revalidateTag (with profile="max") can serve stale content while revalidating in the background.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10Q9uA" prefix="r1822" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"982098763793718950"],"question":[0,"What does revalidatePath return?"],"answer":[0,"revalidatePath does not return a value (returns void)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatepath-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatepath-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatepath-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidatePath return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidatePath does not return a value (returns void).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZymKD5" prefix="r1823" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"992953999917561342"],"question":[0,"When is the type parameter required in revalidatePath?"],"answer":[0,"The type parameter is required when path contains dynamic segments (e.g., '/product/[slug]'). If path refers to a literal route segment (e.g., '/product/1'), you should not provide type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-type-parameter-required-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-type-parameter-required-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-type-parameter-required-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the type parameter required in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The type parameter is required when path contains dynamic segments (e.g., '/product/[slug]'). If path refers to a literal route segment (e.g., '/product/1'), you should not provide type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="12PRUc" prefix="r1824" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1969057934805186618"],"question":[0,"Where can updateTag be called?"],"answer":[0,"updateTag can only be called in Server Actions. It cannot be used in Route Handlers, Client Components, or other contexts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-updatetag-be-called"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-updatetag-be-called" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-updatetag-be-called" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can updateTag be called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateTag can only be called in Server Actions. It cannot be used in Route Handlers, Client Components, or other contexts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hdmEM" prefix="r1825" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2280824082604126883"],"question":[0,"What does next.revalidate: false mean in a fetch request?"],"answer":[0,"It caches the resource indefinitely, semantically equivalent to revalidate: Infinity. The HTTP cache may still evict older resources over time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-revalidate-false-mean-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-revalidate-false-mean-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-revalidate-false-mean-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does next.revalidate: false mean in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It caches the resource indefinitely, semantically equivalent to revalidate: Infinity. The HTTP cache may still evict older resources over time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jaU23" prefix="r1826" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4019910618949946299"],"question":[0,"What happens to a route when any fetch request has revalidate: 0 or cache: 'no-store'?"],"answer":[0,"Routes with any fetch having revalidate: 0 or no-store become dynamically rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-a-route-when-any-fetch-request-has-revalidate-0-or-cache-no-stor"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-a-route-when-any-fetch-request-has-revalidate-0-or-cache-no-stor" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-a-route-when-any-fetch-request-has-revalidate-0-or-cache-no-stor" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to a route when any fetch request has revalidate: 0 or cache: 'no-store'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Routes with any fetch having revalidate: 0 or no-store become dynamically rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MuzGd" prefix="r1827" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4179469914640670335"],"question":[0,"What is the maximum character length for a custom tag in cacheTag?"],"answer":[0,"256 characters"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-custom-tag-in-cachetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-custom-tag-in-cachetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-custom-tag-in-cachetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a custom tag in cacheTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>256 characters</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Xc0ta" prefix="r1828" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4759737088638573481"],"question":[0,"What is the maximum character length allowed for the path parameter in revalidatePath?"],"answer":[0,"1024 characters"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-allowed-for-the-path-parameter-in-revalidat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-allowed-for-the-path-parameter-in-revalidat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-allowed-for-the-path-parameter-in-revalidat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length allowed for the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 characters</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BKXys" prefix="r1829" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5890033118124910984"],"question":[0,"What requirement exists for arguments and return values of cached functions using 'use cache'?"],"answer":[0,"Arguments to cached functions and their return values must be serializable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-requirement-exists-for-arguments-and-return-values-of-cached-functions-usin"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-requirement-exists-for-arguments-and-return-values-of-cached-functions-usin" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-requirement-exists-for-arguments-and-return-values-of-cached-functions-usin" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What requirement exists for arguments and return values of cached functions using 'use cache'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Arguments to cached functions and their return values must be serializable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ULyAe" prefix="r1830" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5896869230884901236"],"question":[0,"What are the allowed values for the next.revalidate option in fetch?"],"answer":[0,"false, 0, or a number representing seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-allowed-values-for-the-next-revalidate-option-in-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-allowed-values-for-the-next-revalidate-option-in-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-allowed-values-for-the-next-revalidate-option-in-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the allowed values for the next.revalidate option in fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false, 0, or a number representing seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25RtLF" prefix="r1831" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6004354030115224618"],"question":[0,"What is the syntax for time-based revalidation in a fetch request?"],"answer":[0,"fetch('https://...', { next: { revalidate: 3600 } }) where 3600 is the number of seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-time-based-revalidation-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-time-based-revalidation-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-time-based-revalidation-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for time-based revalidation in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fetch('https://...', { next: { revalidate: 3600 } }) where 3600 is the number of seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgMnJ9" prefix="r1832" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6019986504323904331"],"question":[0,"What happens when multiple fetch requests to the same URL have different revalidate values in the same route?"],"answer":[0,"The lower value will be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-multiple-fetch-requests-to-the-same-url-have-different-revalid"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-multiple-fetch-requests-to-the-same-url-have-different-revalid" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-multiple-fetch-requests-to-the-same-url-have-different-revalid" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when multiple fetch requests to the same URL have different revalidate values in the same route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lower value will be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GGiYB" prefix="r1833" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6450018007718979069"],"question":[0,"What is the maximum character length allowed for a tag in revalidateTag?"],"answer":[0,"256 characters"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-allowed-for-a-tag-in-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-allowed-for-a-tag-in-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-allowed-for-a-tag-in-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length allowed for a tag in revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>256 characters</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eKFpl" prefix="r1834" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6619461408808412546"],"question":[0,"Where can revalidateTag be called?"],"answer":[0,"revalidateTag can be called in Server Functions and Route Handlers. It cannot be called in Client Components or Proxy environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-revalidatetag-be-called"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-revalidatetag-be-called" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-revalidatetag-be-called" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can revalidateTag be called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidateTag can be called in Server Functions and Route Handlers. It cannot be called in Client Components or Proxy environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uWkhV" prefix="r1835" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6892548100617903121"],"question":[0,"What are the default cacheLife parameters when using the 'use cache' directive without custom configuration?"],"answer":[0,"Stale time (client): 5 minutes, Revalidate time (server): 15 minutes, Expiration: Never expires by time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-cachelife-parameters-when-using-the-use-cache-directive-wit"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-cachelife-parameters-when-using-the-use-cache-directive-wit" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-cachelife-parameters-when-using-the-use-cache-directive-wit" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default cacheLife parameters when using the 'use cache' directive without custom configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Stale time (client): 5 minutes, Revalidate time (server): 15 minutes, Expiration: Never expires by time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tJ90L" prefix="r1836" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7948689901507927168"],"question":[0,"What happens when you use conflicting options like { revalidate: 3600, cache: 'no-store' } in fetch?"],"answer":[0,"Both options will be ignored, and in development mode a warning will be printed to the terminal."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-use-conflicting-options-like-revalidate-3600-cache-no-stor"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-use-conflicting-options-like-revalidate-3600-cache-no-stor" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-use-conflicting-options-like-revalidate-3600-cache-no-stor" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you use conflicting options like { revalidate: 3600, cache: 'no-store' } in fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both options will be ignored, and in development mode a warning will be printed to the terminal.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13udY7" prefix="r1837" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8252205877404200051"],"question":[0,"What does revalidateTag return?"],"answer":[0,"revalidateTag does not return a value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatetag-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatetag-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatetag-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidateTag return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidateTag does not return a value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2obKGL" prefix="r1838" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9039533965160263938"],"question":[0,"Are cache tags in Next.js case-sensitive?"],"answer":[0,"Yes, cache tags are case-sensitive for both revalidateTag, updateTag, and cacheTag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"are-cache-tags-in-next-js-case-sensitive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-cache-tags-in-next-js-case-sensitive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-cache-tags-in-next-js-case-sensitive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are cache tags in Next.js case-sensitive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, cache tags are case-sensitive for both revalidateTag, updateTag, and cacheTag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22xXGR" prefix="r1839" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9462923628315305913"],"question":[0,"Where can revalidatePath be called?"],"answer":[0,"revalidatePath can be called in Server Functions and Route Handlers. It cannot be called in Client Components or Proxy environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-revalidatepath-be-called"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-revalidatepath-be-called" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-revalidatepath-be-called" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can revalidatePath be called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidatePath can be called in Server Functions and Route Handlers. It cannot be called in Client Components or Proxy environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1S36oa" prefix="r1840" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10194034544240008941"],"question":[0,"What does next.revalidate: 0 mean in a fetch request?"],"answer":[0,"It prevents caching of the resource entirely."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-revalidate-0-mean-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-revalidate-0-mean-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-revalidate-0-mean-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does next.revalidate: 0 mean in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It prevents caching of the resource entirely.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dqzLO" prefix="r1841" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10538434390070982678"],"question":[0,"What does updateTag return?"],"answer":[0,"updateTag does not return a value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-updatetag-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-updatetag-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-updatetag-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does updateTag return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateTag does not return a value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IYxPm" prefix="r1842" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10635154290055649635"],"question":[0,"What does export const revalidate = false mean in route segment config?"],"answer":[0,"It uses the default heuristic to cache any fetch requests that set their cache option to 'force-cache' or are discovered before a Dynamic API is used. Semantically equivalent to revalidate: Infinity, meaning the resource should be cached indefinitely."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-revalidate-false-mean-in-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-revalidate-false-mean-in-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-revalidate-false-mean-in-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const revalidate = false mean in route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It uses the default heuristic to cache any fetch requests that set their cache option to 'force-cache' or are discovered before a Dynamic API is used. Semantically equivalent to revalidate: Infinity, meaning the resource should be cached indefinitely.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZycjXD" prefix="r1843" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10967367860341205322"],"question":[0,"What is the syntax for the revalidate export in route segment config?"],"answer":[0,"export const revalidate = false | 0 | number"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-the-revalidate-export-in-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-the-revalidate-export-in-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-the-revalidate-export-in-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for the revalidate export in route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export const revalidate = false | 0 | number</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aeVlL" prefix="r1844" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11003393172158563022"],"question":[0,"Can the revalidate export be used with runtime = 'edge'?"],"answer":[0,"No, the revalidate export is unavailable when using runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-revalidate-export-be-used-with-runtime-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-revalidate-export-be-used-with-runtime-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-revalidate-export-be-used-with-runtime-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the revalidate export be used with runtime = 'edge'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the revalidate export is unavailable when using runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hWzMl" prefix="r1845" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11171299372480816529"],"question":[0,"What happens if revalidation fails during ISR?"],"answer":[0,"If revalidation fails, the last successfully generated data continues serving from cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-revalidation-fails-during-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-revalidation-fails-during-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-revalidation-fails-during-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if revalidation fails during ISR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If revalidation fails, the last successfully generated data continues serving from cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28DdiT" prefix="r1846" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11360215376946506399"],"question":[0,"What is the maximum character length for a tag in updateTag?"],"answer":[0,"256 characters"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-tag-in-updatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-tag-in-updatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-tag-in-updatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a tag in updateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>256 characters</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LbqTW" prefix="r1847" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11670342280502633564"],"question":[0,"What does export const revalidate = 0 mean in route segment config?"],"answer":[0,"It ensures a layout or page is always dynamically rendered even if no Dynamic APIs or uncached data fetches are discovered. This changes the default of fetch requests that do not set a cache option to 'no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-revalidate-0-mean-in-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-revalidate-0-mean-in-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-revalidate-0-mean-in-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const revalidate = 0 mean in route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures a layout or page is always dynamically rendered even if no Dynamic APIs or uncached data fetches are discovered. This changes the default of fetch requests that do not set a cache option to 'no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zv8Uvr" prefix="r1848" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11895831650450080256"],"question":[0,"What is the recommended value for the profile parameter in revalidateTag?"],"answer":[0,"profile=\"max\" is recommended. It marks the tag entry as stale and uses stale-while-revalidate semantics on the next visit."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-value-for-the-profile-parameter-in-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-value-for-the-profile-parameter-in-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-value-for-the-profile-parameter-in-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended value for the profile parameter in revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>profile="max" is recommended. It marks the tag entry as stale and uses stale-while-revalidate semantics on the next visit.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29zJL3" prefix="r1849" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12411396040429493110"],"question":[0,"What is the maximum number of tag items allowed in cacheTag?"],"answer":[0,"128 tag items"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-tag-items-allowed-in-cachetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-tag-items-allowed-in-cachetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-tag-items-allowed-in-cachetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of tag items allowed in cacheTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>128 tag items</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lQVWX" prefix="r1850" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12417840664956254525"],"question":[0,"What gets invalidated when revalidatePath is called with type='page'?"],"answer":[0,"The specific page is invalidated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-gets-invalidated-when-revalidatepath-is-called-with-type-page"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-gets-invalidated-when-revalidatepath-is-called-with-type-page" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-gets-invalidated-when-revalidatepath-is-called-with-type-page" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What gets invalidated when revalidatePath is called with type='page'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The specific page is invalidated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuICf7" prefix="r1851" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13092167978503525289"],"question":[0,"What are the two methods to assign tags to cached data in Next.js?"],"answer":[0,"1. Using fetch with next.tags option: fetch('...', { next: { tags: ['user'] } }), and 2. Using cacheTag() function within cache components using 'use cache' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-methods-to-assign-tags-to-cached-data-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-methods-to-assign-tags-to-cached-data-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-methods-to-assign-tags-to-cached-data-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two methods to assign tags to cached data in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Using fetch with next.tags option: fetch('...', { next: { tags: ['user'] } }), and 2. Using cacheTag() function within cache components using 'use cache' directive.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oXGvT" prefix="r1852" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13571927937666299621"],"question":[0,"Can ISR be used with static exports in Next.js?"],"answer":[0,"No, static exports cannot use ISR."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"can-isr-be-used-with-static-exports-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-isr-be-used-with-static-exports-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-isr-be-used-with-static-exports-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can ISR be used with static exports in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, static exports cannot use ISR.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="E0eag" prefix="r1853" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13963134532148163150"],"question":[0,"What is the function signature of cacheTag?"],"answer":[0,"cacheTag accepts one or more string values as parameters, for example: cacheTag('tag-one', 'tag-two')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-function-signature-of-cachetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-function-signature-of-cachetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-function-signature-of-cachetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the function signature of cacheTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cacheTag accepts one or more string values as parameters, for example: cacheTag('tag-one', 'tag-two')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pLG8e" prefix="r1854" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13989867017845295086"],"question":[0,"What gets invalidated when revalidatePath is called with type='layout'?"],"answer":[0,"The layout file, all nested layouts, and all nested pages are invalidated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-gets-invalidated-when-revalidatepath-is-called-with-type-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-gets-invalidated-when-revalidatepath-is-called-with-type-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-gets-invalidated-when-revalidatepath-is-called-with-type-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What gets invalidated when revalidatePath is called with type='layout'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The layout file, all nested layouts, and all nested pages are invalidated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mTq4y" prefix="r1855" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14649428335282257337"],"question":[0,"What happens after the revalidate period expires during ISR (Incremental Static Regeneration)?"],"answer":[0,"After the revalidate period expires, the next request receives the stale cached page, while Next.js regenerates a fresh version in the background. Once successful, the updated page replaces the cached version."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-after-the-revalidate-period-expires-during-isr-incremental-static-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-after-the-revalidate-period-expires-during-isr-incremental-static-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-after-the-revalidate-period-expires-during-isr-incremental-static-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens after the revalidate period expires during ISR (Incremental Static Regeneration)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>After the revalidate period expires, the next request receives the stale cached page, while Next.js regenerates a fresh version in the background. Once successful, the updated page replaces the cached version.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Rub6B" prefix="r1856" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14662731303369320928"],"question":[0,"What is the behavior difference between calling revalidatePath in Server Functions vs Route Handlers?"],"answer":[0,"In Server Functions, it updates the UI immediately (if viewing the affected path) with a temporary side effect of refreshing all previously visited pages. In Route Handlers, it marks the path for revalidation on the next visit, and dynamic route segments won't trigger multiple simultaneous revalidations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-behavior-difference-between-calling-revalidatepath-in-server-functio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-behavior-difference-between-calling-revalidatepath-in-server-functio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-behavior-difference-between-calling-revalidatepath-in-server-functio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the behavior difference between calling revalidatePath in Server Functions vs Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Server Functions, it updates the UI immediately (if viewing the affected path) with a temporary side effect of refreshing all previously visited pages. In Route Handlers, it marks the path for revalidation on the next visit, and dynamic route segments won't trigger multiple simultaneous revalidations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="upgrading-build-system-bundler-updates" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Upgrading > Build System & Bundler Updates</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 41 questions </span> </div> <div class="space-y-4"> <astro-island uid="iefV9" prefix="r1857" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"537280658644512982"],"question":[0,"Does Turbopack support automatic root layout creation in App Router?"],"answer":[0,"No, root layout automatic creation in App Router is not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"does-turbopack-support-automatic-root-layout-creation-in-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-turbopack-support-automatic-root-layout-creation-in-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-turbopack-support-automatic-root-layout-creation-in-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Turbopack support automatic root layout creation in App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, root layout automatic creation in App Router is not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1z3hvj" prefix="r1858" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"611257917355802061"],"question":[0,"How does Turbopack handle Sass imports with the tilde (~) prefix?"],"answer":[0,"Turbopack does not support the legacy tilde (~) prefix for node_modules imports. You must either remove the tilde (e.g., change `@import '~bootstrap/...'` to `@import 'bootstrap/...'`) or use `turbopack.resolveAlias` with `'~*': '*'` mapping."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-turbopack-handle-sass-imports-with-the-tilde-prefix"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-turbopack-handle-sass-imports-with-the-tilde-prefix" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-turbopack-handle-sass-imports-with-the-tilde-prefix" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Turbopack handle Sass imports with the tilde (~) prefix?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack does not support the legacy tilde (<del>) prefix for node_modules imports. You must either remove the tilde (e.g., change `@import '</del>bootstrap/...'<code>to</code>@import 'bootstrap/...'<code>) or use </code>turbopack.resolveAlias<code>with</code>'~*': '*'` mapping.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XPBjI" prefix="r1859" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"654073212324176742"],"question":[0,"What was bundlePagesRouterDependencies called before Next.js 15?"],"answer":[0,"`bundlePagesExternals` (previously named `experimental.bundlePagesExternals`) - it was renamed in v15.0.0 when it moved from experimental to stable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-bundlepagesrouterdependencies-called-before-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-bundlepagesrouterdependencies-called-before-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-bundlepagesrouterdependencies-called-before-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was bundlePagesRouterDependencies called before Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>bundlePagesExternals</code> (previously named <code>experimental.bundlePagesExternals</code>) - it was renamed in v15.0.0 when it moved from experimental to stable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrcYGq" prefix="r1860" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"743161722879331022"],"question":[0,"What was the status of Turbopack for production builds in Next.js 15?"],"answer":[0,"Turbopack for production builds was not stable in Next.js 15.0. It progressed from alpha in 15.3 to beta in 15.5."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-status-of-turbopack-for-production-builds-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-status-of-turbopack-for-production-builds-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-status-of-turbopack-for-production-builds-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the status of Turbopack for production builds in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack for production builds was not stable in Next.js 15.0. It progressed from alpha in 15.3 to beta in 15.5.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lsulo" prefix="r1861" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"967701364870733375"],"question":[0,"Is experimental.isolatedDevBuild recommended for production use?"],"answer":[0,"No, it is currently experimental and subject to change; production use is not recommended."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/isolatedDevBuild"]]],"topic":[0,"nextjs"],"slug":[0,"is-experimental-isolateddevbuild-recommended-for-production-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-experimental-isolateddevbuild-recommended-for-production-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-experimental-isolateddevbuild-recommended-for-production-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is experimental.isolatedDevBuild recommended for production use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, it is currently experimental and subject to change; production use is not recommended.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/isolatedDevBuild" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zgcii8" prefix="r1862" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1086388207192050859"],"question":[0,"How do you pass options to a webpack loader in Turbopack configuration?"],"answer":[0,"Use the expanded format with a loader object: `loaders: [{ loader: '@svgr/webpack', options: { icon: true } }]`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-pass-options-to-a-webpack-loader-in-turbopack-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-pass-options-to-a-webpack-loader-in-turbopack-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-pass-options-to-a-webpack-loader-in-turbopack-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you pass options to a webpack loader in Turbopack configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the expanded format with a loader object: <code>loaders: [{ loader: '@svgr/webpack', options: { icon: true } }]</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJR03R" prefix="r1863" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1125750364263519036"],"question":[0,"What does setting resolveExtensions do in Turbopack configuration?"],"answer":[0,"It overwrites the original resolve extensions with the provided list. Example: `resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json']`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-resolveextensions-do-in-turbopack-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-resolveextensions-do-in-turbopack-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-resolveextensions-do-in-turbopack-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting resolveExtensions do in Turbopack configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It overwrites the original resolve extensions with the provided list. Example: <code>resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json']</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LvJWy" prefix="r1864" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1366319839993995290"],"question":[0,"What CSS features does Turbopack support natively?"],"answer":[0,"Global CSS and CSS Modules (via Lightning CSS), modern CSS nesting, @import syntax, PostCSS, and Sass/SCSS (out of box for Next.js)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-css-features-does-turbopack-support-natively"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-css-features-does-turbopack-support-natively" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-css-features-does-turbopack-support-natively" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSS features does Turbopack support natively?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Global CSS and CSS Modules (via Lightning CSS), modern CSS nesting, @import syntax, PostCSS, and Sass/SCSS (out of box for Next.js).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZV6002" prefix="r1865" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1674179889037278321"],"question":[0,"What command runs the automated Next.js upgrade CLI?"],"answer":[0,"Run `npx @next/codemod@canary upgrade latest` to automatically upgrade to the latest Next.js version."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-runs-the-automated-next-js-upgrade-cli"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-runs-the-automated-next-js-upgrade-cli" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-runs-the-automated-next-js-upgrade-cli" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command runs the automated Next.js upgrade CLI?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run <code>npx @next/codemod@canary upgrade latest</code> to automatically upgrade to the latest Next.js version.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7HAEc" prefix="r1866" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2165768161452638181"],"question":[0,"Where does the `next dev` command output files in Next.js 16?"],"answer":[0,"The `next dev` command outputs to `.next/dev` instead of `.next`, enabling concurrent execution of `next dev` and `next build`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-the-next-dev-command-output-files-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-the-next-dev-command-output-files-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-the-next-dev-command-output-files-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does the `next dev` command output files in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>next dev</code> command outputs to <code>.next/dev</code> instead of <code>.next</code>, enabling concurrent execution of <code>next dev</code> and <code>next build</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6Re1j" prefix="r1867" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4510791127557308921"],"question":[0,"What is the 'as' property in Turbopack rules configuration?"],"answer":[0,"The `as` property specifies what file type the loader output should be treated as. Example: `{ '*.svg': { loaders: ['@svgr/webpack'], as: '*.js' } }` treats SVG files as JavaScript after transformation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-as-property-in-turbopack-rules-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-as-property-in-turbopack-rules-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-as-property-in-turbopack-rules-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the 'as' property in Turbopack rules configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>as</code> property specifies what file type the loader output should be treated as. Example: <code>{ '*.svg': { loaders: ['@svgr/webpack'], as: '*.js' } }</code> treats SVG files as JavaScript after transformation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sYaIG" prefix="r1868" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5278799198921006546"],"question":[0,"How do you generate a Turbopack trace file for diagnostics?"],"answer":[0,"Run `NEXT_TURBOPACK_TRACING=1 next dev` which produces a `.next/dev/trace-turbopack` file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-generate-a-turbopack-trace-file-for-diagnostics"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-generate-a-turbopack-trace-file-for-diagnostics" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-generate-a-turbopack-trace-file-for-diagnostics" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you generate a Turbopack trace file for diagnostics?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run <code>NEXT_TURBOPACK_TRACING=1 next dev</code> which produces a <code>.next/dev/trace-turbopack</code> file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vK6R9" prefix="r1869" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5941648439681261179"],"question":[0,"What was the status of Turbopack in Next.js 15 for development?"],"answer":[0,"Turbopack for development (`next dev --turbo`) was stable and production-ready in Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-status-of-turbopack-in-next-js-15-for-development"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-status-of-turbopack-in-next-js-15-for-development" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-status-of-turbopack-in-next-js-15-for-development" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the status of Turbopack in Next.js 15 for development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack for development (<code>next dev --turbo</code>) was stable and production-ready in Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ph76U" prefix="r1870" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6612609197803555082"],"question":[0,"What types of webpack loaders are currently supported by Turbopack?"],"answer":[0,"Only loaders that return JavaScript code are supported. Loaders that transform files like stylesheets or images are not currently supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-webpack-loaders-are-currently-supported-by-turbopack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-webpack-loaders-are-currently-supported-by-turbopack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-webpack-loaders-are-currently-supported-by-turbopack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of webpack loaders are currently supported by Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only loaders that return JavaScript code are supported. Loaders that transform files like stylesheets or images are not currently supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2azvUh" prefix="r1871" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6626119432416501223"],"question":[0,"What is the minimum Node.js version required for Next.js 16?"],"answer":[0,"Node.js version 20.9.0 or higher is required for Next.js 16."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js version 20.9.0 or higher is required for Next.js 16.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LxksC" prefix="r1872" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7356465408235051631"],"question":[0,"Does Turbopack support webpack plugins?"],"answer":[0,"No, Turbopack does not support webpack plugins. However, it does support webpack loaders (with a subset of the webpack loader API)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"does-turbopack-support-webpack-plugins"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-turbopack-support-webpack-plugins" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-turbopack-support-webpack-plugins" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Turbopack support webpack plugins?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Turbopack does not support webpack plugins. However, it does support webpack loaders (with a subset of the webpack loader API).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1q1ikd" prefix="r1873" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7439809292124053525"],"question":[0,"What is the correct Turbopack tracing command for Next.js 16?"],"answer":[0,"`npx next internal trace .next/dev/trace-turbopack` (note the `.next/dev` path, not `.next`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-correct-turbopack-tracing-command-for-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-correct-turbopack-tracing-command-for-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-correct-turbopack-tracing-command-for-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the correct Turbopack tracing command for Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>npx next internal trace .next/dev/trace-turbopack</code> (note the <code>.next/dev</code> path, not <code>.next</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9cR8R" prefix="r1874" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7648583638915044581"],"question":[0,"What is the default value of experimental.turbopackFileSystemCacheForDev in Next.js 16.1.0+?"],"answer":[0,"It is enabled by default (true) as of v16.1.0 and is marked as stable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackFileSystemCache"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-experimental-turbopackfilesystemcachefordev-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-experimental-turbopackfilesystemcachefordev-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-experimental-turbopackfilesystemcachefordev-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of experimental.turbopackFileSystemCacheForDev in Next.js 16.1.0+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is enabled by default (true) as of v16.1.0 and is marked as stable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackFileSystemCache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IpzCn" prefix="r1875" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7651263546788808898"],"question":[0,"How does Next.js optimize React Compiler compile times?"],"answer":[0,"Next.js uses a custom SWC optimization that only applies the React Compiler to relevant files (like those with JSX or React Hooks), avoiding unnecessary work and leading to faster builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-optimize-react-compiler-compile-times"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-optimize-react-compiler-compile-times" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-optimize-react-compiler-compile-times" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js optimize React Compiler compile times?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses a custom SWC optimization that only applies the React Compiler to relevant files (like those with JSX or React Hooks), avoiding unnecessary work and leading to faster builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IaC9f" prefix="r1876" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7688011194769832678"],"question":[0,"What performance improvements does Turbopack provide in Next.js 16?"],"answer":[0,"Up to 10× faster Fast Refresh and 2–5× faster production builds compared to webpack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-improvements-does-turbopack-provide-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-improvements-does-turbopack-provide-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-improvements-does-turbopack-provide-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance improvements does Turbopack provide in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Up to 10× faster Fast Refresh and 2–5× faster production builds compared to webpack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nxKOY" prefix="r1877" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7938282893675646240"],"question":[0,"How does Turbopack order CSS modules?"],"answer":[0,"Turbopack follows JavaScript import order to order CSS modules. This can lead to subtle rendering changes when adopting Turbopack if applications relied on webpack's arbitrary ordering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-turbopack-order-css-modules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-turbopack-order-css-modules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-turbopack-order-css-modules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Turbopack order CSS modules?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack follows JavaScript import order to order CSS modules. This can lead to subtle rendering changes when adopting Turbopack if applications relied on webpack's arbitrary ordering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cHET9" prefix="r1878" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8382353077201074681"],"question":[0,"What are the requirements for options passed to webpack loaders in Turbopack?"],"answer":[0,"Options passed to webpack loaders must be plain JavaScript primitives, objects, and arrays."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-requirements-for-options-passed-to-webpack-loaders-in-turbopack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-requirements-for-options-passed-to-webpack-loaders-in-turbopack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-requirements-for-options-passed-to-webpack-loaders-in-turbopack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the requirements for options passed to webpack loaders in Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Options passed to webpack loaders must be plain JavaScript primitives, objects, and arrays.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29zMgp" prefix="r1879" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8389682944996739989"],"question":[0,"What behavior does Turbopack have for files outside the project root?"],"answer":[0,"Files outside of the project root are not resolved by default. For linked dependencies (via npm link, yarn link, pnpm link), you must configure `turbopack.root` to the parent directory of both the project and linked dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-behavior-does-turbopack-have-for-files-outside-the-project-root"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-behavior-does-turbopack-have-for-files-outside-the-project-root" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-behavior-does-turbopack-have-for-files-outside-the-project-root" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What behavior does Turbopack have for files outside the project root?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Files outside of the project root are not resolved by default. For linked dependencies (via npm link, yarn link, pnpm link), you must configure <code>turbopack.root</code> to the parent directory of both the project and linked dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UA5a0" prefix="r1880" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8401208566501331493"],"question":[0,"What is the type and default behavior of serverExternalPackages configuration?"],"answer":[0,"Type: Array of strings (package names). Default behavior: Next.js automatically opts out a curated list of 80+ popular packages known to have Node.js-specific dependencies (database clients, build tools, testing frameworks, etc.)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-and-default-behavior-of-serverexternalpackages-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-and-default-behavior-of-serverexternalpackages-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-and-default-behavior-of-serverexternalpackages-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type and default behavior of serverExternalPackages configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Type: Array of strings (package names). Default behavior: Next.js automatically opts out a curated list of 80+ popular packages known to have Node.js-specific dependencies (database clients, build tools, testing frameworks, etc.).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GqI76" prefix="r1881" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9060163177668207764"],"question":[0,"Which verified webpack loaders work with Turbopack?"],"answer":[0,"@mdx-js/loader, @svgr/webpack, and babel-loader are among the verified working loaders. babel-loader is configured automatically if a Babel configuration file is found."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"which-verified-webpack-loaders-work-with-turbopack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-verified-webpack-loaders-work-with-turbopack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-verified-webpack-loaders-work-with-turbopack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which verified webpack loaders work with Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@mdx-js/loader, @svgr/webpack, and babel-loader are among the verified working loaders. babel-loader is configured automatically if a Babel configuration file is found.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZvyKVs" prefix="r1882" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10692328973985988383"],"question":[0,"What is the new stable name for experimental.serverComponentsExternalPackages in Next.js 15?"],"answer":[0,"`serverExternalPackages` - it allows you to opt-out specific packages from automatic server-side bundling."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-new-stable-name-for-experimental-servercomponentsexternalpackages-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-new-stable-name-for-experimental-servercomponentsexternalpackages-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-new-stable-name-for-experimental-servercomponentsexternalpackages-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the new stable name for experimental.serverComponentsExternalPackages in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>serverExternalPackages</code> - it allows you to opt-out specific packages from automatic server-side bundling.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nUOop" prefix="r1883" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10832369455154220646"],"question":[0,"What are the four main configuration options for the turbopack object in next.config.js?"],"answer":[0,"`root` (sets application root directory), `rules` (defines webpack loaders for file transformations), `resolveAlias` (manual module name mappings), and `resolveExtensions` (modifies file extensions for module resolution)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-main-configuration-options-for-the-turbopack-object-in-next-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-main-configuration-options-for-the-turbopack-object-in-next-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-main-configuration-options-for-the-turbopack-object-in-next-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four main configuration options for the turbopack object in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>root</code> (sets application root directory), <code>rules</code> (defines webpack loaders for file transformations), <code>resolveAlias</code> (manual module name mappings), and <code>resolveExtensions</code> (modifies file extensions for module resolution).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="erymH" prefix="r1884" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10925283466395952188"],"question":[0,"What experimental Next.js features are unsupported by Turbopack?"],"answer":[0,"Yarn PnP, `experimental.urlImports`, `experimental.esmExternals`, `nextScriptWorkers`, `sri.algorithm`, and `fallbackNodePolyfills` are unsupported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-next-js-features-are-unsupported-by-turbopack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-next-js-features-are-unsupported-by-turbopack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-next-js-features-are-unsupported-by-turbopack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental Next.js features are unsupported by Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yarn PnP, <code>experimental.urlImports</code>, <code>experimental.esmExternals</code>, <code>nextScriptWorkers</code>, <code>sri.algorithm</code>, and <code>fallbackNodePolyfills</code> are unsupported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Bun58" prefix="r1885" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11709798997386344431"],"question":[0,"How do Turbopack glob patterns work in the rules configuration?"],"answer":[0,"Globs match based on file name unless the glob contains a `/` character, which causes it to match based on the full project-relative file path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-turbopack-glob-patterns-work-in-the-rules-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-turbopack-glob-patterns-work-in-the-rules-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-turbopack-glob-patterns-work-in-the-rules-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do Turbopack glob patterns work in the rules configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Globs match based on file name unless the glob contains a <code>/</code> character, which causes it to match based on the full project-relative file path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1r17OU" prefix="r1886" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12120167535463863467"],"question":[0,"What percentage of development sessions were using Turbopack on Next.js 15.3+?"],"answer":[0,"More than 50% of development sessions and 20% of production builds on Next.js 15.3+ were running on Turbopack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-percentage-of-development-sessions-were-using-turbopack-on-next-js-15-3"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-percentage-of-development-sessions-were-using-turbopack-on-next-js-15-3" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-percentage-of-development-sessions-were-using-turbopack-on-next-js-15-3" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What percentage of development sessions were using Turbopack on Next.js 15.3+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>More than 50% of development sessions and 20% of production builds on Next.js 15.3+ were running on Turbopack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1FVyty" prefix="r1887" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12243484323872917370"],"question":[0,"What command migrates from next lint to ESLint CLI?"],"answer":[0,"`npx @next/codemod@canary next-lint-to-eslint-cli .` - this is necessary because the `next lint` command has been removed entirely in Next.js 16."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-migrates-from-next-lint-to-eslint-cli"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-migrates-from-next-lint-to-eslint-cli" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-migrates-from-next-lint-to-eslint-cli" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command migrates from next lint to ESLint CLI?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>npx @next/codemod@canary next-lint-to-eslint-cli .</code> - this is necessary because the <code>next lint</code> command has been removed entirely in Next.js 16.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZcflrA" prefix="r1888" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12913484337029250662"],"question":[0,"What are the default package.json scripts for new Next.js 16 projects?"],"answer":[0,"`\"dev\": \"next dev\"`, `\"build\": \"next build\"`, `\"start\": \"next start\"`, `\"lint\": \"eslint\"`, `\"lint:fix\": \"eslint --fix\"`. No `--turbopack` flag is needed since it's the default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-package-json-scripts-for-new-next-js-16-projects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-package-json-scripts-for-new-next-js-16-projects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-package-json-scripts-for-new-next-js-16-projects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default package.json scripts for new Next.js 16 projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>"dev": "next dev"</code>, <code>"build": "next build"</code>, <code>"start": "next start"</code>, <code>"lint": "eslint"</code>, <code>"lint:fix": "eslint --fix"</code>. No <code>--turbopack</code> flag is needed since it's the default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25NCwY" prefix="r1889" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12959757000801269248"],"question":[0,"What does Turbopack's resolveAlias configuration map?"],"answer":[0,"It maps package imports to alternative destinations, similar to webpack's resolve.alias. Supports conditional aliasing with conditions like `browser`. Example: `resolveAlias: { underscore: 'lodash', mocha: { browser: 'mocha/browser-entry.js' } }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-turbopack-s-resolvealias-configuration-map"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-turbopack-s-resolvealias-configuration-map" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-turbopack-s-resolvealias-configuration-map" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Turbopack's resolveAlias configuration map?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It maps package imports to alternative destinations, similar to webpack's resolve.alias. Supports conditional aliasing with conditions like <code>browser</code>. Example: <code>resolveAlias: { underscore: 'lodash', mocha: { browser: 'mocha/browser-entry.js' } }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eoCke" prefix="r1890" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13023341210956211721"],"question":[0,"Does Turbopack support custom Sass functions via sassOptions.functions?"],"answer":[0,"No, custom Sass functions via `sassOptions.functions` are not supported due to Turbopack's Rust architecture."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"does-turbopack-support-custom-sass-functions-via-sassoptions-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-turbopack-support-custom-sass-functions-via-sassoptions-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-turbopack-support-custom-sass-functions-via-sassoptions-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Turbopack support custom Sass functions via sassOptions.functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, custom Sass functions via <code>sassOptions.functions</code> are not supported due to Turbopack's Rust architecture.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1up3gv" prefix="r1891" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13421960053925943615"],"question":[0,"What are the available condition types for Turbopack loader rules?"],"answer":[0,"Available conditions include: `browser`, `foreign`, `development`, `production`, `node`, and `edge-light`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-available-condition-types-for-turbopack-loader-rules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-available-condition-types-for-turbopack-loader-rules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-available-condition-types-for-turbopack-loader-rules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the available condition types for Turbopack loader rules?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Available conditions include: <code>browser</code>, <code>foreign</code>, <code>development</code>, <code>production</code>, <code>node</code>, and <code>edge-light</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Hh80D" prefix="r1892" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14152091463935402446"],"question":[0,"What is the performance impact of enabling React Compiler in Next.js?"],"answer":[0,"Expect compile times in development and during builds to be higher when enabling this option as the React Compiler relies on Babel."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-performance-impact-of-enabling-react-compiler-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-performance-impact-of-enabling-react-compiler-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-performance-impact-of-enabling-react-compiler-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the performance impact of enabling React Compiler in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Expect compile times in development and during builds to be higher when enabling this option as the React Compiler relies on Babel.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zpjduf" prefix="r1893" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14251952410390449553"],"question":[0,"What command interprets a Turbopack trace file?"],"answer":[0,"`npx next internal trace [path-to-file]` - then view the trace at https://trace.nextjs.org/"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-interprets-a-turbopack-trace-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-interprets-a-turbopack-trace-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-interprets-a-turbopack-trace-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command interprets a Turbopack trace file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>npx next internal trace [path-to-file]</code> - then view the trace at <a href="https://trace.nextjs.org/">https://trace.nextjs.org/</a></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aphG5" prefix="r1894" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14413582635531056611"],"question":[0,"What is the default value of experimental.turbopackFileSystemCacheForBuild?"],"answer":[0,"It is not enabled by default and remains marked as experimental (opt-in)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackFileSystemCache"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-experimental-turbopackfilesystemcacheforbuild"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-experimental-turbopackfilesystemcacheforbuild" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-experimental-turbopackfilesystemcacheforbuild" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of experimental.turbopackFileSystemCacheForBuild?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is not enabled by default and remains marked as experimental (opt-in).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackFileSystemCache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GqEtE" prefix="r1895" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14634846694264729673"],"question":[0,"What does the 'foreign' condition match in Turbopack loader rules?"],"answer":[0,"The `foreign` condition matches code in node_modules and some Next.js internals. Usually you'll want to restrict loaders to `{not: 'foreign'}` to improve performance."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-foreign-condition-match-in-turbopack-loader-rules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-foreign-condition-match-in-turbopack-loader-rules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-foreign-condition-match-in-turbopack-loader-rules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the 'foreign' condition match in Turbopack loader rules?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>foreign</code> condition matches code in node_modules and some Next.js internals. Usually you'll want to restrict loaders to <code>{not: 'foreign'}</code> to improve performance.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iWJUT" prefix="r1896" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14796185108704925122"],"question":[0,"What is the syntax to enable React Compiler in Next.js 16?"],"answer":[0,"Install `babel-plugin-react-compiler` with `npm install -D babel-plugin-react-compiler`, then set `reactCompiler: true` in next.config.js (no longer under experimental)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-to-enable-react-compiler-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-to-enable-react-compiler-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-to-enable-react-compiler-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax to enable React Compiler in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Install <code>babel-plugin-react-compiler</code> with <code>npm install -D babel-plugin-react-compiler</code>, then set <code>reactCompiler: true</code> in next.config.js (no longer under experimental).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRdQFx" prefix="r1897" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15084697888778701091"],"question":[0,"What was the previous name for the turbopack configuration option in Next.js 13-15?"],"answer":[0,"`experimental.turbo` (used in Next.js versions 13.0.0 to 15.2.x). The `experimental.turbo` option will be removed in Next.js 16."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-previous-name-for-the-turbopack-configuration-option-in-next-js-13-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-previous-name-for-the-turbopack-configuration-option-in-next-js-13-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-previous-name-for-the-turbopack-configuration-option-in-next-js-13-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the previous name for the turbopack configuration option in Next.js 13-15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>experimental.turbo</code> (used in Next.js versions 13.0.0 to 15.2.x). The <code>experimental.turbo</code> option will be removed in Next.js 16.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-handlers-advanced-integration-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Handlers > Advanced Integration Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 40 questions </span> </div> <div class="space-y-4"> <astro-island uid="1WpIdO" prefix="r1898" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"822550393745316353"],"question":[0,"In Next.js 16, can you still access cookies() and headers() synchronously?"],"answer":[0,"No, starting with Next.js 16, synchronous access is fully removed. These APIs can only be accessed asynchronously"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-16-can-you-still-access-cookies-and-headers-synchronously"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-16-can-you-still-access-cookies-and-headers-synchronously" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-16-can-you-still-access-cookies-and-headers-synchronously" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 16, can you still access cookies() and headers() synchronously?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, starting with Next.js 16, synchronous access is fully removed. These APIs can only be accessed asynchronously</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DmltY" prefix="r1899" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1474560846690239696"],"question":[0,"Does revalidating the Data Cache in a Route Handler immediately invalidate the Router Cache?"],"answer":[0,"No, the Router Cache will continue to serve the previous payload until a hard refresh, as the Route Handler isn't tied to a specific route"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-revalidating-the-data-cache-in-a-route-handler-immediately-invalidate-the-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-revalidating-the-data-cache-in-a-route-handler-immediately-invalidate-the-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-revalidating-the-data-cache-in-a-route-handler-immediately-invalidate-the-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does revalidating the Data Cache in a Route Handler immediately invalidate the Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the Router Cache will continue to serve the previous payload until a hard refresh, as the Route Handler isn't tied to a specific route</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29TbPO" prefix="r1900" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1773789846133909336"],"question":[0,"Can you delete cookies from any domain using cookies().delete() in Route Handlers?"],"answer":[0,"No, you can only delete cookies from the same domain. The delete method is only callable in Server Actions or Route Handlers"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-delete-cookies-from-any-domain-using-cookies-delete-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-delete-cookies-from-any-domain-using-cookies-delete-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-delete-cookies-from-any-domain-using-cookies-delete-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you delete cookies from any domain using cookies().delete() in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you can only delete cookies from the same domain. The delete method is only callable in Server Actions or Route Handlers</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uGWaD" prefix="r1901" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1908744293030525970"],"question":[0,"What is the difference between NextResponse.redirect() and NextResponse.rewrite()?"],"answer":[0,"redirect() sends the user to a different URL (changes browser URL), while rewrite() proxies the request to a different URL while preserving the original browser URL"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between NextResponse.redirect() and NextResponse.rewrite()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() sends the user to a different URL (changes browser URL), while rewrite() proxies the request to a different URL while preserving the original browser URL</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2axq79" prefix="r1902" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2315192104499529618"],"question":[0,"What methods are available on the NextResponse.cookies object?"],"answer":[0,"get(name), getAll(name?), set(name, value), has(name), delete(name)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-nextresponse-cookies-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-nextresponse-cookies-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-nextresponse-cookies-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the NextResponse.cookies object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>get(name), getAll(name?), set(name, value), has(name), delete(name)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zp4Lrn" prefix="r1903" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2417841324376231471"],"question":[0,"Are dynamic code evaluation methods like eval() supported in Edge Runtime Route Handlers?"],"answer":[0,"No, eval(), new Function(), WebAssembly.compile(), and WebAssembly.instantiate() are not supported in Edge Runtime"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-dynamic-code-evaluation-methods-like-eval-supported-in-edge-runtime-route-ha"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-dynamic-code-evaluation-methods-like-eval-supported-in-edge-runtime-route-ha" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-dynamic-code-evaluation-methods-like-eval-supported-in-edge-runtime-route-ha" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are dynamic code evaluation methods like eval() supported in Edge Runtime Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, eval(), new Function(), WebAssembly.compile(), and WebAssembly.instantiate() are not supported in Edge Runtime</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="eoom3" prefix="r1904" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2681584448420958398"],"question":[0,"Do you need to configure bodyParser for Route Handlers like in Pages Router API Routes?"],"answer":[0,"No, you do not need to use bodyParser or any additional configuration. Route Handlers use standard Web Request API methods like request.json(), request.formData(), and request.text()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"do-you-need-to-configure-bodyparser-for-route-handlers-like-in-pages-router-api-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-you-need-to-configure-bodyparser-for-route-handlers-like-in-pages-router-api-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-you-need-to-configure-bodyparser-for-route-handlers-like-in-pages-router-api-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do you need to configure bodyParser for Route Handlers like in Pages Router API Routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you do not need to use bodyParser or any additional configuration. Route Handlers use standard Web Request API methods like request.json(), request.formData(), and request.text()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tIIod" prefix="r1905" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3609255291404339390"],"question":[0,"What is the unit of measurement for the maxDuration segment config option?"],"answer":[0,"Seconds (it's a number representing the maximum allowed duration for the function to execute in seconds)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-unit-of-measurement-for-the-maxduration-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-unit-of-measurement-for-the-maxduration-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-unit-of-measurement-for-the-maxduration-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the unit of measurement for the maxDuration segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Seconds (it's a number representing the maximum allowed duration for the function to execute in seconds)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XiM1a" prefix="r1906" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3741106110380001634"],"question":[0,"Are native Node.js APIs supported in Edge Runtime Route Handlers?"],"answer":[0,"No, native Node.js APIs are not supported in Edge Runtime"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-native-node-js-apis-supported-in-edge-runtime-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-native-node-js-apis-supported-in-edge-runtime-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-native-node-js-apis-supported-in-edge-runtime-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are native Node.js APIs supported in Edge Runtime Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, native Node.js APIs are not supported in Edge Runtime</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15bsnA" prefix="r1907" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3752649278665161331"],"question":[0,"Can you set cookies after streaming has started in Route Handlers?"],"answer":[0,"No, you cannot set cookies after streaming initiates. You must set cookies before streaming begins"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-cookies-after-streaming-has-started-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-cookies-after-streaming-has-started-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-cookies-after-streaming-has-started-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set cookies after streaming has started in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot set cookies after streaming initiates. You must set cookies before streaming begins</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1usaD5" prefix="r1908" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3884494896334008162"],"question":[0,"What are all the possible values for the fetchCache segment config option?"],"answer":[0,"'auto' | 'default-cache' | 'only-cache' | 'force-cache' | 'force-no-store' | 'default-no-store' | 'only-no-store'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-possible-values-for-the-fetchcache-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-possible-values-for-the-fetchcache-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-possible-values-for-the-fetchcache-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the possible values for the fetchCache segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' | 'default-cache' | 'only-cache' | 'force-cache' | 'force-no-store' | 'default-no-store' | 'only-no-store'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Rvvjk" prefix="r1909" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4100756452171984569"],"question":[0,"Does using cookies() or headers() in Route Handlers affect rendering mode?"],"answer":[0,"Yes, using these functions automatically opts routes into dynamic rendering, as values cannot be determined ahead of time"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-cookies-or-headers-in-route-handlers-affect-rendering-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-cookies-or-headers-in-route-handlers-affect-rendering-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-cookies-or-headers-in-route-handlers-affect-rendering-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using cookies() or headers() in Route Handlers affect rendering mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, using these functions automatically opts routes into dynamic rendering, as values cannot be determined ahead of time</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bFA59" prefix="r1910" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4152893350209940713"],"question":[0,"What is the default value of the 'preferredRegion' segment config option in Route Handlers?"],"answer":[0,"The default value is 'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-preferredregion-segment-config-option-in-route-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-preferredregion-segment-config-option-in-route-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-preferredregion-segment-config-option-in-route-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'preferredRegion' segment config option in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pj9Mc" prefix="r1911" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4935393577996257520"],"question":[0,"What methods are available on the read-only Headers object returned by headers()?"],"answer":[0,"get(), has(), entries(), keys(), values(), and forEach()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-read-only-headers-object-returned-by-headers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-read-only-headers-object-returned-by-headers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-read-only-headers-object-returned-by-headers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the read-only Headers object returned by headers()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>get(), has(), entries(), keys(), values(), and forEach()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23TvkV" prefix="r1912" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5769165814626772536"],"question":[0,"Can you set response headers using the headers() function in Route Handlers?"],"answer":[0,"No, headers() returns a read-only Web Headers object. To set headers, you need to return a new Response with new headers"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-response-headers-using-the-headers-function-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-response-headers-using-the-headers-function-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-response-headers-using-the-headers-function-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set response headers using the headers() function in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, headers() returns a read-only Web Headers object. To set headers, you need to return a new Response with new headers</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nMn0g" prefix="r1913" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6268518262427052608"],"question":[0,"How long can Serverless Node.js functions take to boot up before processing requests?"],"answer":[0,"It can take hundreds of milliseconds for Serverless Functions to boot up before they begin processing requests"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-can-serverless-node-js-functions-take-to-boot-up-before-processing-requ"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-can-serverless-node-js-functions-take-to-boot-up-before-processing-requ" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-can-serverless-node-js-functions-take-to-boot-up-before-processing-requ" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long can Serverless Node.js functions take to boot up before processing requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It can take hundreds of milliseconds for Serverless Functions to boot up before they begin processing requests</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2i5zap" prefix="r1914" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6773046204202362558"],"question":[0,"What happens if you don't define an OPTIONS handler in a Route Handler?"],"answer":[0,"Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-don-t-define-an-options-handler-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-don-t-define-an-options-handler-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-don-t-define-an-options-handler-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you don't define an OPTIONS handler in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14T1Xn" prefix="r1915" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7563201812898315180"],"question":[0,"What is the default path value when setting a cookie using cookies().set()?"],"answer":[0,"The default path is '/'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-path-value-when-setting-a-cookie-using-cookies-set"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-path-value-when-setting-a-cookie-using-cookies-set" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-path-value-when-setting-a-cookie-using-cookies-set" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default path value when setting a cookie using cookies().set()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default path is '/'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29Vqfm" prefix="r1916" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7725670187768136189"],"question":[0,"What is the code size limit for Serverless Node.js Route Handlers on Vercel?"],"answer":[0,"Up to 50 MB including imported packages, fonts, and files"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-code-size-limit-for-serverless-node-js-route-handlers-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-code-size-limit-for-serverless-node-js-route-handlers-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-code-size-limit-for-serverless-node-js-route-handlers-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the code size limit for Serverless Node.js Route Handlers on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Up to 50 MB including imported packages, fonts, and files</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1gsYTc" prefix="r1917" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8030752934095017645"],"question":[0,"What possible values can the runtime segment config option accept?"],"answer":[0,"'nodejs' | 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-possible-values-can-the-runtime-segment-config-option-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-possible-values-can-the-runtime-segment-config-option-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-possible-values-can-the-runtime-segment-config-option-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What possible values can the runtime segment config option accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' | 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="R04nb" prefix="r1918" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8239522114904355049"],"question":[0,"What API does Next.js recommend for streaming AI-generated content in Route Handlers?"],"answer":[0,"The Vercel AI SDK with StreamingTextResponse and streamText from @ai-sdk/openai, though you can also use the native Web API ReadableStream"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-api-does-next-js-recommend-for-streaming-ai-generated-content-in-route-hand"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-api-does-next-js-recommend-for-streaming-ai-generated-content-in-route-hand" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-api-does-next-js-recommend-for-streaming-ai-generated-content-in-route-hand" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What API does Next.js recommend for streaming AI-generated content in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Vercel AI SDK with StreamingTextResponse and streamText from @ai-sdk/openai, though you can also use the native Web API ReadableStream</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2spbDo" prefix="r1919" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8593205067840704417"],"question":[0,"How do you forward modified headers to an upstream service in a proxy Route Handler?"],"answer":[0,"Use NextResponse.next({ request: { headers: modifiedHeaders } }). Note: use the request object wrapper, not just { headers: modifiedHeaders }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-forward-modified-headers-to-an-upstream-service-in-a-proxy-route-hand"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-forward-modified-headers-to-an-upstream-service-in-a-proxy-route-hand" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-forward-modified-headers-to-an-upstream-service-in-a-proxy-route-hand" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you forward modified headers to an upstream service in a proxy Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use NextResponse.next({ request: { headers: modifiedHeaders } }). Note: use the request object wrapper, not just { headers: modifiedHeaders }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uFYVK" prefix="r1920" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8854494937416502236"],"question":[0,"What is the default caching behavior for GET methods in Route Handlers in Next.js 15?"],"answer":[0,"GET methods are not cached by default in Next.js 15. This changed from static to dynamic in v15.0.0-RC."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-get-methods-in-route-handlers-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-get-methods-in-route-handlers-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-get-methods-in-route-handlers-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for GET methods in Route Handlers in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>GET methods are not cached by default in Next.js 15. This changed from static to dynamic in v15.0.0-RC.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1afWQp" prefix="r1921" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9364649357888196090"],"question":[0,"Is the headers() function in Next.js 15 synchronous or asynchronous?"],"answer":[0,"headers() is an async function that returns a promise. You must use await or React's use() function"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-headers-function-in-next-js-15-synchronous-or-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-headers-function-in-next-js-15-synchronous-or-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-headers-function-in-next-js-15-synchronous-or-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the headers() function in Next.js 15 synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>headers() is an async function that returns a promise. You must use await or React's use() function</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GtRx6" prefix="r1922" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9574810026847794619"],"question":[0,"What is the recommended approach for adding CORS headers to multiple Route Handlers?"],"answer":[0,"Use Proxy (middleware) or the next.config.js file instead of adding CORS headers to each individual Route Handler"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-adding-cors-headers-to-multiple-route-handl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-adding-cors-headers-to-multiple-route-handl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-adding-cors-headers-to-multiple-route-handl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for adding CORS headers to multiple Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use Proxy (middleware) or the next.config.js file instead of adding CORS headers to each individual Route Handler</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2f4Ux0" prefix="r1923" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10191391332410742362"],"question":[0,"Are special Route Handlers like sitemap.ts and robots.js cached by default?"],"answer":[0,"Yes, they are cached by default unless they use a Dynamic API or dynamic config option"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"are-special-route-handlers-like-sitemap-ts-and-robots-js-cached-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-special-route-handlers-like-sitemap-ts-and-robots-js-cached-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-special-route-handlers-like-sitemap-ts-and-robots-js-cached-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are special Route Handlers like sitemap.ts and robots.js cached by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, they are cached by default unless they use a Dynamic API or dynamic config option</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="4jsCl" prefix="r1924" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10409655039715931764"],"question":[0,"What possible values can the dynamic segment config option accept?"],"answer":[0,"'auto' | 'force-dynamic' | 'error' | 'force-static'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-possible-values-can-the-dynamic-segment-config-option-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-possible-values-can-the-dynamic-segment-config-option-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-possible-values-can-the-dynamic-segment-config-option-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What possible values can the dynamic segment config option accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' | 'force-dynamic' | 'error' | 'force-static'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vh0VE" prefix="r1925" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10501004141430493961"],"question":[0,"Is Incremental Static Regeneration (ISR) supported in Edge Runtime Route Handlers?"],"answer":[0,"No, ISR is not supported in Edge Runtime"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-incremental-static-regeneration-isr-supported-in-edge-runtime-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-incremental-static-regeneration-isr-supported-in-edge-runtime-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-incremental-static-regeneration-isr-supported-in-edge-runtime-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Incremental Static Regeneration (ISR) supported in Edge Runtime Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, ISR is not supported in Edge Runtime</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nIIAu" prefix="r1926" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11077423944329400335"],"question":[0,"What is the default value of the 'dynamic' segment config option in Route Handlers?"],"answer":[0,"The default value is 'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamic-segment-config-option-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamic-segment-config-option-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamic-segment-config-option-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'dynamic' segment config option in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjuSal" prefix="r1927" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11128356376658835020"],"question":[0,"What is the default value of the fetchCache segment config option?"],"answer":[0,"The default value is 'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-fetchcache-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-fetchcache-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-fetchcache-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the fetchCache segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHd2OV" prefix="r1928" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11457256545581059470"],"question":[0,"Which special file types have built-in support instead of requiring custom Route Handlers?"],"answer":[0,"sitemap.xml, robots.txt, app icons, and open graph images all have built-in support"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"which-special-file-types-have-built-in-support-instead-of-requiring-custom-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-special-file-types-have-built-in-support-instead-of-requiring-custom-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-special-file-types-have-built-in-support-instead-of-requiring-custom-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which special file types have built-in support instead of requiring custom Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sitemap.xml, robots.txt, app icons, and open graph images all have built-in support</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdF8Oi" prefix="r1929" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11642895150673506752"],"question":[0,"What cookie options are available when using cookies().set() in Route Handlers?"],"answer":[0,"name, value, expires (Date), maxAge (Number in seconds), domain, path (default '/'), secure (Boolean), httpOnly (Boolean), sameSite (Boolean | 'lax' | 'strict' | 'none'), priority ('low' | 'medium' | 'high'), partitioned (Boolean)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-options-are-available-when-using-cookies-set-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-options-are-available-when-using-cookies-set-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-options-are-available-when-using-cookies-set-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie options are available when using cookies().set() in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>name, value, expires (Date), maxAge (Number in seconds), domain, path (default '/'), secure (Boolean), httpOnly (Boolean), sameSite (Boolean | 'lax' | 'strict' | 'none'), priority ('low' | 'medium' | 'high'), partitioned (Boolean)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fG0Mr" prefix="r1930" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11733314630592759209"],"question":[0,"In Next.js 15, is the params prop in Route Handlers synchronous or asynchronous?"],"answer":[0,"params is now a Promise that must be awaited. Example: const params = await segmentData.params"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-is-the-params-prop-in-route-handlers-synchronous-or-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-is-the-params-prop-in-route-handlers-synchronous-or-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-is-the-params-prop-in-route-handlers-synchronous-or-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, is the params prop in Route Handlers synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>params is now a Promise that must be awaited. Example: const params = await segmentData.params</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zg04YG" prefix="r1931" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12565948992979723768"],"question":[0,"What happens to unspecified dynamic routes when you set dynamicParams = false in a Route Handler?"],"answer":[0,"Only paths provided by generateStaticParams will be served, and unspecified routes will return 404 or match (in the case of catch-all routes)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-unspecified-dynamic-routes-when-you-set-dynamicparams-false-in-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-unspecified-dynamic-routes-when-you-set-dynamicparams-false-in-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-unspecified-dynamic-routes-when-you-set-dynamicparams-false-in-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to unspecified dynamic routes when you set dynamicParams = false in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only paths provided by generateStaticParams will be served, and unspecified routes will return 404 or match (in the case of catch-all routes)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YI5Lz" prefix="r1932" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12761263233563024632"],"question":[0,"What is the default value of the 'revalidate' segment config option in Route Handlers?"],"answer":[0,"The default value is false"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-revalidate-segment-config-option-in-route-handl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-revalidate-segment-config-option-in-route-handl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-revalidate-segment-config-option-in-route-handl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'revalidate' segment config option in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1omaTj" prefix="r1933" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12991645003030425850"],"question":[0,"What is the typical cold boot time characteristic of Edge Runtime compared to Node.js Runtime?"],"answer":[0,"Edge Runtime has 'Low' cold boot times with 'Lowest' latency, while Node.js Runtime has 'Normal' latency with no specific cold boot concerns mentioned"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-cold-boot-time-characteristic-of-edge-runtime-compared-to-no"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-cold-boot-time-characteristic-of-edge-runtime-compared-to-no" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-cold-boot-time-characteristic-of-edge-runtime-compared-to-no" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical cold boot time characteristic of Edge Runtime compared to Node.js Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Runtime has 'Low' cold boot times with 'Lowest' latency, while Node.js Runtime has 'Normal' latency with no specific cold boot concerns mentioned</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9Onzm" prefix="r1934" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14098294029419336457"],"question":[0,"What is the purpose of the fetchCache segment config option?"],"answer":[0,"To override the default cache option behavior for fetch() requests in the Route Handler"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-fetchcache-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-fetchcache-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-fetchcache-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the fetchCache segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>To override the default cache option behavior for fetch() requests in the Route Handler</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jhJ1S" prefix="r1935" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14513197185895413672"],"question":[0,"Is the cookies() function in Next.js 15 synchronous or asynchronous?"],"answer":[0,"cookies() is an async function that returns a promise. You must use await or React's use() function: const cookieStore = await cookies()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-cookies-function-in-next-js-15-synchronous-or-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-cookies-function-in-next-js-15-synchronous-or-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-cookies-function-in-next-js-15-synchronous-or-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the cookies() function in Next.js 15 synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies() is an async function that returns a promise. You must use await or React's use() function: const cookieStore = await cookies()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kd23j" prefix="r1936" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14896500148151237114"],"question":[0,"How do you access query parameters in a Route Handlers using NextRequest?"],"answer":[0,"Use request.nextUrl.searchParams. Example: const searchParams = request.nextUrl.searchParams; const query = searchParams.get('query')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-access-query-parameters-in-a-route-handlers-using-nextrequest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-access-query-parameters-in-a-route-handlers-using-nextrequest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-access-query-parameters-in-a-route-handlers-using-nextrequest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you access query parameters in a Route Handlers using NextRequest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use request.nextUrl.searchParams. Example: const searchParams = request.nextUrl.searchParams; const query = searchParams.get('query')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z67CY0" prefix="r1937" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15020794319519971611"],"question":[0,"Can you use generateStaticParams with Route Handlers for static generation?"],"answer":[0,"Yes, Route Handlers will render a static response when running next build. Only the GET HTTP verb is supported for static generation"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-generatestaticparams-with-route-handlers-for-static-generation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-generatestaticparams-with-route-handlers-for-static-generation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-generatestaticparams-with-route-handlers-for-static-generation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use generateStaticParams with Route Handlers for static generation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Route Handlers will render a static response when running next build. Only the GET HTTP verb is supported for static generation</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="rendering-strategies-dynamic-content-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Rendering Strategies > Dynamic Content Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="HNGFi" prefix="r1938" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"101667283307725291"],"question":[0,"What is the default value of the dynamicParams route segment config?"],"answer":[0,"true. When dynamicParams = true, dynamic segments not included in generateStaticParams are generated on demand using Streaming Server Rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamicparams-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamicparams-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamicparams-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the dynamicParams route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. When dynamicParams = true, dynamic segments not included in generateStaticParams are generated on demand using Streaming Server Rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WjkEH" prefix="r1939" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"142399739035294176"],"question":[0,"What happens when dynamicParams = false and a user visits an ungenerated route?"],"answer":[0,"Only paths provided by generateStaticParams will be served, and unspecified routes will return a 404 (or match in the case of catch-all routes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-false-and-a-user-visits-an-ungenerated-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-false-and-a-user-visits-an-ungenerated-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-false-and-a-user-visits-an-ungenerated-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams = false and a user visits an ungenerated route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only paths provided by generateStaticParams will be served, and unspecified routes will return a 404 (or match in the case of catch-all routes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25OccF" prefix="r1940" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"148633433029408729"],"question":[0,"What does setting dynamic = 'force-dynamic' do to fetch requests in a route?"],"answer":[0,"Setting dynamic = 'force-dynamic' is functionally equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-dynamic-force-dynamic-do-to-fetch-requests-in-a-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-dynamic-force-dynamic-do-to-fetch-requests-in-a-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-dynamic-force-dynamic-do-to-fetch-requests-in-a-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting dynamic = 'force-dynamic' do to fetch requests in a route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting dynamic = 'force-dynamic' is functionally equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zrXEb" prefix="r1941" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"384550448822456030"],"question":[0,"Is there a codemod available to migrate to async dynamic APIs in Next.js 15?"],"answer":[0,"Yes. A codemod is available to automate the process: npx @next/codemod@canary next-async-request-api ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-codemod-available-to-migrate-to-async-dynamic-apis-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-codemod-available-to-migrate-to-async-dynamic-apis-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-codemod-available-to-migrate-to-async-dynamic-apis-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a codemod available to migrate to async dynamic APIs in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. A codemod is available to automate the process: npx @next/codemod@canary next-async-request-api .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zq479I" prefix="r1942" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"526074262535466502"],"question":[0,"What does the use cache directive do in Next.js?"],"answer":[0,"The use cache directive marks a route, React component, or function as cacheable. It can be used at the top of a file to indicate all exports should be cached, or inline at the top of a function/component to cache the return value. It provides longer-term caching across multiple requests with automatic cache key generation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-use-cache-directive-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-use-cache-directive-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-use-cache-directive-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the use cache directive do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The use cache directive marks a route, React component, or function as cacheable. It can be used at the top of a file to indicate all exports should be cached, or inline at the top of a function/component to cache the return value. It provides longer-term caching across multiple requests with automatic cache key generation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1AlncW" prefix="r1943" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"915138146801320997"],"question":[0,"What is the scope of memoization provided by React's cache function?"],"answer":[0,"React cache provides request-level memoization within a single render pass, allowing you to call the same function multiple times while only executing it once."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-scope-of-memoization-provided-by-react-s-cache-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-scope-of-memoization-provided-by-react-s-cache-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-scope-of-memoization-provided-by-react-s-cache-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the scope of memoization provided by React's cache function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React cache provides request-level memoization within a single render pass, allowing you to call the same function multiple times while only executing it once.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1D3gB" prefix="r1944" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1228360191951751106"],"question":[0,"What does setting revalidate = 0 in route segment config do?"],"answer":[0,"Setting revalidate = 0 ensures a layout or page is always dynamically rendered, even if no dynamic functions or uncached data fetches are discovered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-revalidate-0-in-route-segment-config-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-revalidate-0-in-route-segment-config-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-revalidate-0-in-route-segment-config-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting revalidate = 0 in route segment config do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting revalidate = 0 ensures a layout or page is always dynamically rendered, even if no dynamic functions or uncached data fetches are discovered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QgWhH" prefix="r1945" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1889432587821219492"],"question":[0,"What function replaced unstable_noStore in Next.js 15?"],"answer":[0,"connection() replaced unstable_noStore in Next.js 15.0.0. As of v15.0.0, unstable_noStore is deprecated and is now a legacy API."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/unstable_noStore"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-replaced-unstable-nostore-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-replaced-unstable-nostore-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-replaced-unstable-nostore-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function replaced unstable_noStore in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>connection() replaced unstable_noStore in Next.js 15.0.0. As of v15.0.0, unstable_noStore is deprecated and is now a legacy API.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/unstable_noStore" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DFllK" prefix="r1946" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2499533792859121142"],"question":[0,"What are the four possible values for the 'dynamic' route segment config option?"],"answer":[0,"The four values are: 'auto' (default), 'force-dynamic', 'error', and 'force-static'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-possible-values-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-possible-values-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-possible-values-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four possible values for the 'dynamic' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The four values are: 'auto' (default), 'force-dynamic', 'error', and 'force-static'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wfvhs" prefix="r1947" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2617640182744820243"],"question":[0,"When did draftMode() become async in Next.js?"],"answer":[0,"draftMode() transitioned to an asynchronous function in v15.0.0-RC. It was originally introduced as synchronous in v13.4.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-draftmode-become-async-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-draftmode-become-async-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-draftmode-become-async-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did draftMode() become async in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>draftMode() transitioned to an asynchronous function in v15.0.0-RC. It was originally introduced as synchronous in v13.4.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ilHt0" prefix="r1948" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3449105160289821337"],"question":[0,"Does wrapping a component in Suspense make the component itself dynamic in PPR?"],"answer":[0,"No. Wrapping a component in Suspense doesn't make the component itself dynamic, but rather Suspense is used as a boundary. Components become dynamic when using specific APIs like cookies, headers, connection, draftMode, searchParams, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"does-wrapping-a-component-in-suspense-make-the-component-itself-dynamic-in-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-wrapping-a-component-in-suspense-make-the-component-itself-dynamic-in-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-wrapping-a-component-in-suspense-make-the-component-itself-dynamic-in-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does wrapping a component in Suspense make the component itself dynamic in PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Wrapping a component in Suspense doesn't make the component itself dynamic, but rather Suspense is used as a boundary. Components become dynamic when using specific APIs like cookies, headers, connection, draftMode, searchParams, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tT3Pt" prefix="r1949" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3738346873010643407"],"question":[0,"How does setting dynamic = 'error' affect the default value of dynamicParams?"],"answer":[0,"Setting dynamic = 'error' or dynamic = 'force-static' changes the default of dynamicParams from true to false."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-setting-dynamic-error-affect-the-default-value-of-dynamicparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-setting-dynamic-error-affect-the-default-value-of-dynamicparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-setting-dynamic-error-affect-the-default-value-of-dynamicparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does setting dynamic = 'error' affect the default value of dynamicParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting dynamic = 'error' or dynamic = 'force-static' changes the default of dynamicParams from true to false.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="B5Rkg" prefix="r1950" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4645055101662516271"],"question":[0,"What happens to the bypass cookie value in draftMode() between builds?"],"answer":[0,"A new bypass cookie value will be generated each time you run next build. This ensures that the bypass cookie can't be guessed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-bypass-cookie-value-in-draftmode-between-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-bypass-cookie-value-in-draftmode-between-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-bypass-cookie-value-in-draftmode-between-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the bypass cookie value in draftMode() between builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A new bypass cookie value will be generated each time you run next build. This ensures that the bypass cookie can't be guessed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1L1puJ" prefix="r1951" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4679332066085590781"],"question":[0,"What does generateStaticParams return?"],"answer":[0,"An array of objects where each object represents the populated dynamic segments of a single route. Property names correspond to segment names, with values filling those segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-generatestaticparams-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-generatestaticparams-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-generatestaticparams-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does generateStaticParams return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of objects where each object represents the populated dynamic segments of a single route. Property names correspond to segment names, with values filling those segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHMbeN" prefix="r1952" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5997407792629197605"],"question":[0,"What does setting next.revalidate to false do in a fetch request?"],"answer":[0,"Setting next.revalidate to false caches the resource indefinitely (equivalent to Infinity)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-next-revalidate-to-false-do-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-next-revalidate-to-false-do-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-next-revalidate-to-false-do-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting next.revalidate to false do in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting next.revalidate to false caches the resource indefinitely (equivalent to Infinity).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHyAv4" prefix="r1953" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6345308870632136750"],"question":[0,"What is the current status of Partial Prerendering (PPR) in Next.js 15?"],"answer":[0,"PPR is experimental and subject to change; it is not recommended for production as of Next.js 15.5.8."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-current-status-of-partial-prerendering-ppr-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-current-status-of-partial-prerendering-ppr-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-current-status-of-partial-prerendering-ppr-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the current status of Partial Prerendering (PPR) in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PPR is experimental and subject to change; it is not recommended for production as of Next.js 15.5.8.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JjAWI" prefix="r1954" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6390320089090359880"],"question":[0,"Can you still access dynamic APIs synchronously in Next.js 15?"],"answer":[0,"Temporarily yes, for backward compatibility. The APIs can be accessed synchronously but will show warnings in development and production. However, starting with Next.js 16, synchronous access is fully removed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-still-access-dynamic-apis-synchronously-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-still-access-dynamic-apis-synchronously-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-still-access-dynamic-apis-synchronously-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you still access dynamic APIs synchronously in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Temporarily yes, for backward compatibility. The APIs can be accessed synchronously but will show warnings in development and production. However, starting with Next.js 16, synchronous access is fully removed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10PqVO" prefix="r1955" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6444310867935111557"],"question":[0,"Which Dynamic APIs will opt a whole route into dynamic rendering at request time?"],"answer":[0,"cookies, headers, connection, draftMode, searchParams, unstable_noStore, and fetch with { cache: 'no-store' } will all opt the whole route into dynamic rendering at request time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"which-dynamic-apis-will-opt-a-whole-route-into-dynamic-rendering-at-request-time"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-dynamic-apis-will-opt-a-whole-route-into-dynamic-rendering-at-request-time" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-dynamic-apis-will-opt-a-whole-route-into-dynamic-rendering-at-request-time" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Dynamic APIs will opt a whole route into dynamic rendering at request time?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies, headers, connection, draftMode, searchParams, unstable_noStore, and fetch with { cache: 'no-store' } will all opt the whole route into dynamic rendering at request time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="XOPKv" prefix="r1956" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8197127477439159158"],"question":[0,"What happens when you use fetch with cache: 'no-store' in Next.js?"],"answer":[0,"Next.js fetches the resource from the remote server on every request, even if Dynamic APIs are not detected on the route. This opts out of the Data Cache entirely."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-use-fetch-with-cache-no-store-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-use-fetch-with-cache-no-store-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-use-fetch-with-cache-no-store-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you use fetch with cache: 'no-store' in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js fetches the resource from the remote server on every request, even if Dynamic APIs are not detected on the route. This opts out of the Data Cache entirely.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23TE8P" prefix="r1957" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8489604278935925775"],"question":[0,"Can you use cookies.set() and cookies.delete() in Server Components?"],"answer":[0,"No. cookies.set() and cookies.delete() only work in Server Actions or Route Handlers, not in Server Components, because cookies are stored by the browser, not the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-cookies-set-and-cookies-delete-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-cookies-set-and-cookies-delete-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-cookies-set-and-cookies-delete-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use cookies.set() and cookies.delete() in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. cookies.set() and cookies.delete() only work in Server Actions or Route Handlers, not in Server Components, because cookies are stored by the browser, not the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1A7Ub4" prefix="r1958" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8939396580020269445"],"question":[0,"When multiple components in a route have different revalidate values, which value determines the route's revalidation frequency?"],"answer":[0,"The lowest revalidate value across each layout and page of a single route will determine the revalidation frequency of the entire route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"when-multiple-components-in-a-route-have-different-revalidate-values-which-value"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-multiple-components-in-a-route-have-different-revalidate-values-which-value" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-multiple-components-in-a-route-have-different-revalidate-values-which-value" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When multiple components in a route have different revalidate values, which value determines the route's revalidation frequency?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate value across each layout and page of a single route will determine the revalidation frequency of the entire route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Q4e06" prefix="r1959" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9248554455795835251"],"question":[0,"How does Next.js handle duplicate query string keys in searchParams?"],"answer":[0,"Duplicate keys become arrays. For example, /shop?a=1&a=2 resolves to Promise<{ a: ['1', '2'] }>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-duplicate-query-string-keys-in-searchparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-duplicate-query-string-keys-in-searchparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-duplicate-query-string-keys-in-searchparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle duplicate query string keys in searchParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Duplicate keys become arrays. For example, /shop?a=1&a=2 resolves to Promise<{ a: ['1', '2'] }>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24CHdh" prefix="r1960" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9546601558632912238"],"question":[0,"Are fetch requests in generateStaticParams automatically memoized?"],"answer":[0,"Yes. Fetch requests are automatically memoized for the same data across all generate-prefixed functions, Layouts, Pages, and Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"are-fetch-requests-in-generatestaticparams-automatically-memoized"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-fetch-requests-in-generatestaticparams-automatically-memoized" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-fetch-requests-in-generatestaticparams-automatically-memoized" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are fetch requests in generateStaticParams automatically memoized?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Fetch requests are automatically memoized for the same data across all generate-prefixed functions, Layouts, Pages, and Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="h6Gc" prefix="r1961" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9822211638752836019"],"question":[0,"What does loading.js automatically do to page.js?"],"answer":[0,"loading.js automatically wraps the page.js file and child components in a <Suspense> boundary. The fallback UI is shown during loading, and the new content is automatically swapped in once complete."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-loading-js-automatically-do-to-page-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-loading-js-automatically-do-to-page-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-loading-js-automatically-do-to-page-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does loading.js automatically do to page.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js automatically wraps the page.js file and child components in a <Suspense> boundary. The fallback UI is shown during loading, and the new content is automatically swapped in once complete.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JDzhL" prefix="r1962" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10154068773212049271"],"question":[0,"When does generateStaticParams run during next dev vs next build?"],"answer":[0,"During next dev, it runs when navigating to a route. During next build, it executes before corresponding Layouts or Pages are generated. During revalidation (ISR), it does not run again."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-run-during-next-dev-vs-next-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-run-during-next-dev-vs-next-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-run-during-next-dev-vs-next-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams run during next dev vs next build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During next dev, it runs when navigating to a route. During next build, it executes before corresponding Layouts or Pages are generated. During revalidation (ISR), it does not run again.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3tjJF" prefix="r1963" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10266127521690406184"],"question":[0,"What does the connection() function return?"],"answer":[0,"connection() returns a Promise<void> that is not meant to be consumed. It accepts no parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/connection"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-connection-function-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-connection-function-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-connection-function-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the connection() function return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>connection() returns a Promise<void> that is not meant to be consumed. It accepts no parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/connection" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1At3cM" prefix="r1964" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10353273824541789699"],"question":[0,"What happens if you use useSearchParams() in a statically rendered route without a Suspense boundary?"],"answer":[0,"During production builds, the build will fail with a 'Missing Suspense boundary with useSearchParams' error. The Client Component using useSearchParams must be wrapped in a <Suspense/> boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-use-usesearchparams-in-a-statically-rendered-route-without-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-use-usesearchparams-in-a-statically-rendered-route-without-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-use-usesearchparams-in-a-statically-rendered-route-without-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you use useSearchParams() in a statically rendered route without a Suspense boundary?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During production builds, the build will fail with a 'Missing Suspense boundary with useSearchParams' error. The Client Component using useSearchParams must be wrapped in a <Suspense/> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1z0VCY" prefix="r1965" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10781660764941450759"],"question":[0,"What happens to the Full Route Cache when you use cookies() in a route?"],"answer":[0,"Using cookies() opts the route out of the Full Route Cache and triggers dynamic rendering at request time, but the route can still use the Data Cache for data requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-full-route-cache-when-you-use-cookies-in-a-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-full-route-cache-when-you-use-cookies-in-a-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-full-route-cache-when-you-use-cookies-in-a-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the Full Route Cache when you use cookies() in a route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using cookies() opts the route out of the Full Route Cache and triggers dynamic rendering at request time, but the route can still use the Data Cache for data requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVYNsU" prefix="r1966" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11948962673770408677"],"question":[0,"What methods are available on the draftMode() object?"],"answer":[0,"Three capabilities: isEnabled (boolean indicating Draft Mode status), enable() (activates Draft Mode via __prerender_bypass cookie), and disable() (deactivates Draft Mode by removing the cookie)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-draftmode-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-draftmode-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-draftmode-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the draftMode() object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Three capabilities: isEnabled (boolean indicating Draft Mode status), enable() (activates Draft Mode via __prerender_bypass cookie), and disable() (deactivates Draft Mode by removing the cookie).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="o9NE3" prefix="r1967" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12154746786955934004"],"question":[0,"What is the default caching behavior for fetch in Next.js during development vs production?"],"answer":[0,"In development, Next.js fetches the resource from the remote server on every request. During next build, it fetches once because static prerendering occurs. Dynamic APIs trigger fresh fetches per request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-in-next-js-during-development-vs-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-in-next-js-during-development-vs-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-in-next-js-during-development-vs-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch in Next.js during development vs production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In development, Next.js fetches the resource from the remote server on every request. During next build, it fetches once because static prerendering occurs. Dynamic APIs trigger fresh fetches per request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rxmxT" prefix="r1968" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12434498367666536904"],"question":[0,"What is the minimum response size some browsers require before displaying streamed content?"],"answer":[0,"Some browsers buffer responses until they exceed 1024 bytes, potentially delaying visible feedback in minimal applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-response-size-some-browsers-require-before-displaying-stream"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-response-size-some-browsers-require-before-displaying-stream" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-response-size-some-browsers-require-before-displaying-stream" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum response size some browsers require before displaying streamed content?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some browsers buffer responses until they exceed 1024 bytes, potentially delaying visible feedback in minimal applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1oxckl" prefix="r1969" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12555130834859720139"],"question":[0,"What is the exact type of the searchParams prop in Next.js 15?"],"answer":[0,"Promise<{ [key: string]: string | string[] | undefined }>. It became a promise in v15.0.0-RC, whereas in version 14 and earlier it was synchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-type-of-the-searchparams-prop-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-type-of-the-searchparams-prop-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-type-of-the-searchparams-prop-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact type of the searchParams prop in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string | string[] | undefined }>. It became a promise in v15.0.0-RC, whereas in version 14 and earlier it was synchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1gSRJm" prefix="r1970" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13368271581056103411"],"question":[0,"When was the connection() function introduced and stabilized in Next.js?"],"answer":[0,"connection() was introduced in v15.0.0-RC and became stabilized in v15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/connection"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-connection-function-introduced-and-stabilized-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-connection-function-introduced-and-stabilized-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-connection-function-introduced-and-stabilized-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the connection() function introduced and stabilized in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>connection() was introduced in v15.0.0-RC and became stabilized in v15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/connection" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1o88Kv" prefix="r1971" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13627834582042139018"],"question":[0,"What happens when fetch requests have conflicting cache options like { revalidate: 3600, cache: 'no-store' }?"],"answer":[0,"Conflicting options are disallowed. You cannot combine revalidate with cache: 'no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-fetch-requests-have-conflicting-cache-options-like-revalidate-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-fetch-requests-have-conflicting-cache-options-like-revalidate-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-fetch-requests-have-conflicting-cache-options-like-revalidate-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when fetch requests have conflicting cache options like { revalidate: 3600, cache: 'no-store' }?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Conflicting options are disallowed. You cannot combine revalidate with cache: 'no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHNThw" prefix="r1972" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13651902423715301650"],"question":[0,"What type of object does headers() return?"],"answer":[0,"headers() returns a read-only Web Headers object with methods including get(), has(), entries(), keys(), values(), and forEach()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-object-does-headers-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-object-does-headers-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-object-does-headers-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of object does headers() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>headers() returns a read-only Web Headers object with methods including get(), has(), entries(), keys(), values(), and forEach().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dIrxa" prefix="r1973" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14075429293095926357"],"question":[0,"In which Next.js version did cookies() become asynchronous?"],"answer":[0,"cookies() became async in Next.js v15.0.0-RC. In version 14 and earlier, it was synchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-cookies-become-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-cookies-become-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-cookies-become-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did cookies() become asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies() became async in Next.js v15.0.0-RC. In version 14 and earlier, it was synchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KHhjU" prefix="r1974" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14172139545387941360"],"question":[0,"What happens if you use a Dynamic API in PPR without wrapping it in Suspense?"],"answer":[0,"Using Dynamic APIs like cookies, headers, connection, draftMode, searchParams, unstable_noStore, or fetch with cache: 'no-store' throws a React error during build unless wrapped in Suspense."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-use-a-dynamic-api-in-ppr-without-wrapping-it-in-suspense"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-use-a-dynamic-api-in-ppr-without-wrapping-it-in-suspense" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-use-a-dynamic-api-in-ppr-without-wrapping-it-in-suspense" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you use a Dynamic API in PPR without wrapping it in Suspense?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using Dynamic APIs like cookies, headers, connection, draftMode, searchParams, unstable_noStore, or fetch with cache: 'no-store' throws a React error during build unless wrapped in Suspense.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uMTFj" prefix="r1975" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14285306884258403869"],"question":[0,"What is the relationship between React's cache function and fetch in Next.js?"],"answer":[0,"Fetch requests are automatically memoized in Next.js, so you don't need to wrap them in React cache. Use React cache to manually memoize data requests when fetch is not suitable (e.g., database clients, CMS clients, or GraphQL clients)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-relationship-between-react-s-cache-function-and-fetch-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-relationship-between-react-s-cache-function-and-fetch-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-relationship-between-react-s-cache-function-and-fetch-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the relationship between React's cache function and fetch in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Fetch requests are automatically memoized in Next.js, so you don't need to wrap them in React cache. Use React cache to manually memoize data requests when fetch is not suitable (e.g., database clients, CMS clients, or GraphQL clients).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1t6xPB" prefix="r1976" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14879801126271537672"],"question":[0,"When should you use connection() instead of other dynamic APIs?"],"answer":[0,"connection() is only necessary when dynamic rendering is required and common Dynamic APIs (cookies, headers, searchParams, etc.) are not used, such as when accessing values like Math.random() or new Date() that should produce different results per request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/connection"]]],"topic":[0,"nextjs"],"slug":[0,"when-should-you-use-connection-instead-of-other-dynamic-apis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-should-you-use-connection-instead-of-other-dynamic-apis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-should-you-use-connection-instead-of-other-dynamic-apis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When should you use connection() instead of other dynamic APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>connection() is only necessary when dynamic rendering is required and common Dynamic APIs (cookies, headers, searchParams, etc.) are not used, such as when accessing values like Math.random() or new Date() that should produce different results per request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/connection" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="project-structure-routing-conventions" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Project Structure > Routing Conventions</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1OzMFj" prefix="r1977" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"159518528438728909"],"question":[0,"Do layouts preserve state during navigation in Next.js?"],"answer":[0,"Yes, on navigation, layouts preserve state, remain interactive, and do not rerender."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"do-layouts-preserve-state-during-navigation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-layouts-preserve-state-during-navigation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-layouts-preserve-state-during-navigation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do layouts preserve state during navigation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, on navigation, layouts preserve state, remain interactive, and do not rerender.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GaaEO" prefix="r1978" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"478656350699277062"],"question":[0,"Is a page always the leaf of the route subtree in Next.js?"],"answer":[0,"Yes, a page is always the leaf of the route subtree, meaning it cannot have child routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-page-always-the-leaf-of-the-route-subtree-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-page-always-the-leaf-of-the-route-subtree-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-page-always-the-leaf-of-the-route-subtree-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a page always the leaf of the route subtree in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, a page is always the leaf of the route subtree, meaning it cannot have child routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cORB4" prefix="r1979" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"838078771723362075"],"question":[0,"What file extensions are supported for the icon file in Next.js?"],"answer":[0,".ico, .jpg, .jpeg, .png, .svg"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-the-icon-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-the-icon-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-the-icon-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for the icon file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.ico, .jpg, .jpeg, .png, .svg</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rLGLp" prefix="r1980" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"857678102704968974"],"question":[0,"Where should the instrumentation.js file be placed in Next.js?"],"answer":[0,"Place the file in the root of your project, or inside a src folder if using one, at the same level as pages or app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-instrumentation-js-file-be-placed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-instrumentation-js-file-be-placed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-instrumentation-js-file-be-placed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the instrumentation.js file be placed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place the file in the root of your project, or inside a src folder if using one, at the same level as pages or app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1eE2F9" prefix="r1981" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1269187519072313945"],"question":[0,"How many middleware files can you have per Next.js project?"],"answer":[0,"Only one middleware.ts file is supported per project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-middleware-files-can-you-have-per-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-middleware-files-can-you-have-per-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-middleware-files-can-you-have-per-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many middleware files can you have per Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only one middleware.ts file is supported per project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1qL9H6" prefix="r1982" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3203257481133422094"],"question":[0,"What file extensions are supported for page.js in Next.js?"],"answer":[0,".js, .jsx, or .tsx file extensions can be used for page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-page-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-page-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-page-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for page.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.js, .jsx, or .tsx file extensions can be used for page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgGfV7" prefix="r1983" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3239361493423047664"],"question":[0,"Do parallel route slots affect the URL structure in Next.js?"],"answer":[0,"No, slots are not route segments and do not affect the URL structure. For example, for /@analytics/views, the URL will be /views since @analytics is a slot."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-parallel-route-slots-affect-the-url-structure-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-parallel-route-slots-affect-the-url-structure-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-parallel-route-slots-affect-the-url-structure-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do parallel route slots affect the URL structure in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, slots are not route segments and do not affect the URL structure. For example, for /@analytics/views, the URL will be /views since @analytics is a slot.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1e2pcT" prefix="r1984" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4561950023548708251"],"question":[0,"How do you create a private folder that opts out of routing in Next.js?"],"answer":[0,"Prefix the folder with an underscore: _folderName. This opts the folder and all its subfolders out of routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-private-folder-that-opts-out-of-routing-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-private-folder-that-opts-out-of-routing-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-private-folder-that-opts-out-of-routing-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a private folder that opts out of routing in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefix the folder with an underscore: _folderName. This opts the folder and all its subfolders out of routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSGFI5" prefix="r1985" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4568234621909271560"],"question":[0,"What happens when navigating between routes with different root layouts in Next.js?"],"answer":[0,"When you navigate between routes that use different root layouts, it triggers a full page reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-navigating-between-routes-with-different-root-layouts-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-navigating-between-routes-with-different-root-layouts-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-navigating-between-routes-with-different-root-layouts-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when navigating between routes with different root layouts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When you navigate between routes that use different root layouts, it triggers a full page reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1q42up" prefix="r1986" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4614508066878772861"],"question":[0,"How do you create a dynamic route segment in Next.js?"],"answer":[0,"Use square brackets: [segment] for a single dynamic parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-dynamic-route-segment-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-dynamic-route-segment-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-dynamic-route-segment-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a dynamic route segment in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use square brackets: [segment] for a single dynamic parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hHkDk" prefix="r1987" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5162785979638352120"],"question":[0,"What prop must layout.js accept in Next.js?"],"answer":[0,"Layout components should accept and use a children prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-prop-must-layout-js-accept-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prop-must-layout-js-accept-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prop-must-layout-js-accept-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prop must layout.js accept in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layout components should accept and use a children prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zv5bHP" prefix="r1988" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5300959337113527472"],"question":[0,"How do you create a route group in Next.js?"],"answer":[0,"Wrap the folder name in parentheses: (folderName). This indicates the folder is for organizational purposes and should not be included in the route's URL path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-route-group-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-route-group-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-route-group-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a route group in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap the folder name in parentheses: (folderName). This indicates the folder is for organizational purposes and should not be included in the route's URL path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zUBFl" prefix="r1989" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6442770183727857527"],"question":[0,"What convention is used for intercepting routes two levels up in Next.js?"],"answer":[0,"(..)(..)folder - intercepts routes two levels up."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-convention-is-used-for-intercepting-routes-two-levels-up-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-convention-is-used-for-intercepting-routes-two-levels-up-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-convention-is-used-for-intercepting-routes-two-levels-up-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What convention is used for intercepting routes two levels up in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>(..)(..)folder - intercepts routes two levels up.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WVrVP" prefix="r1990" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6759933096009996891"],"question":[0,"When is default.js rendered in Next.js parallel routes?"],"answer":[0,"default.js is rendered when Next.js cannot recover a slot's active state after a full-page load."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-default-js-rendered-in-next-js-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-default-js-rendered-in-next-js-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-default-js-rendered-in-next-js-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is default.js rendered in Next.js parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>default.js is rendered when Next.js cannot recover a slot's active state after a full-page load.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ajQWl" prefix="r1991" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6777119937461228079"],"question":[0,"How do you create a URL segment that starts with an underscore in Next.js?"],"answer":[0,"Prefix the folder name with %5F (the URL-encoded form of an underscore): %5FfolderName."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-url-segment-that-starts-with-an-underscore-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-url-segment-that-starts-with-an-underscore-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-url-segment-that-starts-with-an-underscore-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a URL segment that starts with an underscore in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefix the folder name with %5F (the URL-encoded form of an underscore): %5FfolderName.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6PSNs" prefix="r1992" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7012357500681586863"],"question":[0,"Where should middleware.ts be placed in Next.js?"],"answer":[0,"Create a middleware.ts (or .js) file in the project root, or inside src if applicable, at the same level as pages or app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-middleware-ts-be-placed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-middleware-ts-be-placed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-middleware-ts-be-placed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should middleware.ts be placed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a middleware.ts (or .js) file in the project root, or inside src if applicable, at the same level as pages or app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="g4lHM" prefix="r1993" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7119087130326815928"],"question":[0,"Where can favicon.ico be located in Next.js?"],"answer":[0,"The favicon image can only be located in the top level of app/."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-favicon-ico-be-located-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-favicon-ico-be-located-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-favicon-ico-be-located-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can favicon.ico be located in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The favicon image can only be located in the top level of app/.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Lfe98" prefix="r1994" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7331011101932209963"],"question":[0,"What convention is used for intercepting routes on the same level in Next.js?"],"answer":[0,"(.)folder - matches segments on the same level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-convention-is-used-for-intercepting-routes-on-the-same-level-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-convention-is-used-for-intercepting-routes-on-the-same-level-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-convention-is-used-for-intercepting-routes-on-the-same-level-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What convention is used for intercepting routes on the same level in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>(.)folder - matches segments on the same level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gsgvC" prefix="r1995" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7878714012324473952"],"question":[0,"Do shared layouts remain interactive while new route segments load in Next.js?"],"answer":[0,"Yes, shared layouts remain interactive while new route segments load."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"do-shared-layouts-remain-interactive-while-new-route-segments-load-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-shared-layouts-remain-interactive-while-new-route-segments-load-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-shared-layouts-remain-interactive-while-new-route-segments-load-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do shared layouts remain interactive while new route segments load in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, shared layouts remain interactive while new route segments load.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yVMCO" prefix="r1996" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7956442269965291470"],"question":[0,"What file extensions are supported for the apple-icon file in Next.js?"],"answer":[0,".jpg, .jpeg, .png"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-the-apple-icon-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-the-apple-icon-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-the-apple-icon-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for the apple-icon file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.jpg, .jpeg, .png</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IHK7a" prefix="r1997" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10143038507289080203"],"question":[0,"How do you create an optional catch-all route in Next.js?"],"answer":[0,"Use [[...segment]] for optional catch-all segments. This will match the base route /shop, in addition to /shop/clothes, /shop/clothes/tops, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-an-optional-catch-all-route-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-an-optional-catch-all-route-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-an-optional-catch-all-route-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create an optional catch-all route in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use [[...segment]] for optional catch-all segments. This will match the base route /shop, in addition to /shop/clothes, /shop/clothes/tops, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15QrYq" prefix="r1998" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10266240994206279354"],"question":[0,"What convention is used for intercepting routes from the root in Next.js?"],"answer":[0,"(...)folder - intercepts routes from the root."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-convention-is-used-for-intercepting-routes-from-the-root-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-convention-is-used-for-intercepting-routes-from-the-root-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-convention-is-used-for-intercepting-routes-from-the-root-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What convention is used for intercepting routes from the root in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>(...)folder - intercepts routes from the root.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WYHVg" prefix="r1999" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10364939417228302575"],"question":[0,"What convention is used for intercepting routes one level up in Next.js?"],"answer":[0,"(..)folder - intercepts routes one level up (similar to ../)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-convention-is-used-for-intercepting-routes-one-level-up-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-convention-is-used-for-intercepting-routes-one-level-up-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-convention-is-used-for-intercepting-routes-one-level-up-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What convention is used for intercepting routes one level up in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>(..)folder - intercepts routes one level up (similar to ../).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15slRc" prefix="r2000" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10462073190627848813"],"question":[0,"Do templates preserve state during navigation in Next.js?"],"answer":[0,"No, templates are given a unique key, meaning children Client Components reset their state on navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"do-templates-preserve-state-during-navigation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-templates-preserve-state-during-navigation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-templates-preserve-state-during-navigation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do templates preserve state during navigation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, templates are given a unique key, meaning children Client Components reset their state on navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2PhPl" prefix="r2001" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11585073010959710621"],"question":[0,"Can you programmatically generate a favicon in Next.js?"],"answer":[0,"No, you cannot generate a favicon icon. Use icon or a favicon.ico file instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-programmatically-generate-a-favicon-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-programmatically-generate-a-favicon-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-programmatically-generate-a-favicon-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you programmatically generate a favicon in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot generate a favicon icon. Use icon or a favicon.ico file instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kU9Xi" prefix="r2002" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11623430210388970311"],"question":[0,"What are the default page extensions in Next.js?"],"answer":[0,"By default, Next.js accepts files with the following extensions: .tsx, .ts, .jsx, .js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-page-extensions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-page-extensions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-page-extensions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default page extensions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js accepts files with the following extensions: .tsx, .ts, .jsx, .js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBL2ix" prefix="r2003" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11641092233856758332"],"question":[0,"Can error.js catch errors thrown in layout.js in the same segment?"],"answer":[0,"No, an error.js boundary will not handle errors thrown in a layout.js component in the same segment because the error boundary is nested inside that layout's component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"can-error-js-catch-errors-thrown-in-layout-js-in-the-same-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-error-js-catch-errors-thrown-in-layout-js-in-the-same-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-error-js-catch-errors-thrown-in-layout-js-in-the-same-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can error.js catch errors thrown in layout.js in the same segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, an error.js boundary will not handle errors thrown in a layout.js component in the same segment because the error boundary is nested inside that layout's component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rTdgd" prefix="r2004" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12310136161217591950"],"question":[0,"How do you create parallel routes in Next.js?"],"answer":[0,"Slots are defined with the @folder convention (e.g., @analytics, @team). Slots are passed as props to the shared parent layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-parallel-routes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-parallel-routes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-parallel-routes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create parallel routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Slots are defined with the @folder convention (e.g., @analytics, @team). Slots are passed as props to the shared parent layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zn3c3d" prefix="r2005" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12953160288690415776"],"question":[0,"What HTTP status codes does not-found.js return in Next.js?"],"answer":[0,"not-found.js returns a 200 HTTP status code for streamed responses, and 404 for non-streamed responses."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-codes-does-not-found-js-return-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-codes-does-not-found-js-return-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-codes-does-not-found-js-return-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status codes does not-found.js return in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>not-found.js returns a 200 HTTP status code for streamed responses, and 404 for non-streamed responses.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EGVBT" prefix="r2006" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13134501677523944834"],"question":[0,"What HTTP methods are supported in Next.js route.js files?"],"answer":[0,"GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-are-supported-in-next-js-route-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-are-supported-in-next-js-route-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-are-supported-in-next-js-route-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods are supported in Next.js route.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ahvbc" prefix="r2007" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13242535590083326065"],"question":[0,"Are params and searchParams promises in Next.js 15?"],"answer":[0,"Yes, starting in Next.js v15.0.0-RC, params and searchParams are promises that must be awaited using async/await or React's use() function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"are-params-and-searchparams-promises-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-params-and-searchparams-promises-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-params-and-searchparams-promises-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are params and searchParams promises in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, starting in Next.js v15.0.0-RC, params and searchParams are promises that must be awaited using async/await or React's use() function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11v2KQ" prefix="r2008" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13343496304300984519"],"question":[0,"Is the OPTIONS HTTP method automatically implemented in Next.js route handlers?"],"answer":[0,"Yes, OPTIONS is automatically implemented if not explicitly defined, with Next.js setting the appropriate Response Allow header depending on the other methods defined."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-options-http-method-automatically-implemented-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-options-http-method-automatically-implemented-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-options-http-method-automatically-implemented-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the OPTIONS HTTP method automatically implemented in Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, OPTIONS is automatically implemented if not explicitly defined, with Next.js setting the appropriate Response Allow header depending on the other methods defined.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yku45" prefix="r2009" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13711411034122522125"],"question":[0,"Are pages Server Components or Client Components by default in Next.js?"],"answer":[0,"Pages are Server Components by default, but can be set to a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"are-pages-server-components-or-client-components-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-pages-server-components-or-client-components-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-pages-server-components-or-client-components-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are pages Server Components or Client Components by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pages are Server Components by default, but can be set to a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zFxME" prefix="r2010" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13993493318441025269"],"question":[0,"What file extensions are supported for layout.js in Next.js?"],"answer":[0,".js, .jsx, or .tsx file extensions can be used for layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-layout-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-layout-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-layout-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for layout.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.js, .jsx, or .tsx file extensions can be used for layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11J546" prefix="r2011" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14300910288362948511"],"question":[0,"Must the root layout in Next.js define html and body tags?"],"answer":[0,"Yes, the root layout must define <html> and <body> tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"must-the-root-layout-in-next-js-define-html-and-body-tags"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-the-root-layout-in-next-js-define-html-and-body-tags" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-the-root-layout-in-next-js-define-html-and-body-tags" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must the root layout in Next.js define html and body tags?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the root layout must define <html> and <body> tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1okhrG" prefix="r2012" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14881307822936650121"],"question":[0,"What function must you export in instrumentation.js in Next.js?"],"answer":[0,"You export a register function in the file, which will be called once when a new Next.js server instance is initiated. The register function can be an async function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-must-you-export-in-instrumentation-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-must-you-export-in-instrumentation-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-must-you-export-in-instrumentation-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function must you export in instrumentation.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You export a register function in the file, which will be called once when a new Next.js server instance is initiated. The register function can be an async function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z86Ik2" prefix="r2013" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14949337765395493969"],"question":[0,"What props does error.js receive in Next.js?"],"answer":[0,"error.js receives two props: error (an Error object instance with optional digest property) and reset() (a function to attempt recovery by re-rendering the segment)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-props-does-error-js-receive-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-props-does-error-js-receive-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-props-does-error-js-receive-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What props does error.js receive in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>error.js receives two props: error (an Error object instance with optional digest property) and reset() (a function to attempt recovery by re-rendering the segment).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HTULI" prefix="r2014" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15018420235635478816"],"question":[0,"Must error.js be a Client Component in Next.js?"],"answer":[0,"Yes, error.js must be a Client Component (must use the 'use client' directive). Error boundaries must be Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-js-be-a-client-component-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-js-be-a-client-component-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-js-be-a-client-component-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.js be a Client Component in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, error.js must be a Client Component (must use the 'use client' directive). Error boundaries must be Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dLWDz" prefix="r2015" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15118886027996956813"],"question":[0,"What is the default caching behavior for GET handlers in route.js as of Next.js 15?"],"answer":[0,"The default caching for GET handlers was changed from static to dynamic in v15.0.0-RC."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-get-handlers-in-route-js-as-of-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-get-handlers-in-route-js-as-of-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-get-handlers-in-route-js-as-of-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for GET handlers in route.js as of Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default caching for GET handlers was changed from static to dynamic in v15.0.0-RC.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="project-structure-advanced-routing-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Project Structure > Advanced Routing Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="Zsv00s" prefix="r2016" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"230299910230148974"],"question":[0,"What props does a parallel route slot receive in the parent layout?"],"answer":[0,"Slots are passed as props to the shared parent layout. For example, slots `@analytics` and `@team` are passed as `analytics` and `team` props (without the @ prefix) alongside the `children` prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-props-does-a-parallel-route-slot-receive-in-the-parent-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-props-does-a-parallel-route-slot-receive-in-the-parent-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-props-does-a-parallel-route-slot-receive-in-the-parent-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What props does a parallel route slot receive in the parent layout?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Slots are passed as props to the shared parent layout. For example, slots <code>@analytics</code> and <code>@team</code> are passed as <code>analytics</code> and <code>team</code> props (without the @ prefix) alongside the <code>children</code> prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqlrcS" prefix="r2017" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"664628611751007442"],"question":[0,"How do you create a URL segment that starts with an underscore in Next.js?"],"answer":[0,"Prefix the folder name with `%5F` (the URL-encoded form of an underscore): `%5FfolderName`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/colocation"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-url-segment-that-starts-with-an-underscore-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-url-segment-that-starts-with-an-underscore-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-url-segment-that-starts-with-an-underscore-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a URL segment that starts with an underscore in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefix the folder name with <code>%5F</code> (the URL-encoded form of an underscore): <code>%5FfolderName</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/colocation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZXHBEu" prefix="r2018" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"704472493565963805"],"question":[0,"What is the exact syntax for an optional catch-all dynamic segment in Next.js?"],"answer":[0,"`[[...folderName]]` (double square brackets). For example, `app/shop/[[...slug]]/page.js` will match `/shop` as well as `/shop/clothes`, `/shop/clothes/tops`, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-an-optional-catch-all-dynamic-segment-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-an-optional-catch-all-dynamic-segment-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-an-optional-catch-all-dynamic-segment-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for an optional catch-all dynamic segment in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>[[...folderName]]</code> (double square brackets). For example, <code>app/shop/[[...slug]]/page.js</code> will match <code>/shop</code> as well as <code>/shop/clothes</code>, <code>/shop/clothes/tops</code>, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZcaxP9" prefix="r2019" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"870970917284681601"],"question":[0,"Do parallel route slots affect the URL structure?"],"answer":[0,"No. Slots are not route segments and do not affect the URL structure. A file at `/@analytics/views` renders at the `/views` URL path only—the slot name doesn't appear in the browser address bar."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-parallel-route-slots-affect-the-url-structure"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-parallel-route-slots-affect-the-url-structure" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-parallel-route-slots-affect-the-url-structure" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do parallel route slots affect the URL structure?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Slots are not route segments and do not affect the URL structure. A file at <code>/@analytics/views</code> renders at the <code>/views</code> URL path only—the slot name doesn't appear in the browser address bar.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pTMT7" prefix="r2020" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"885961366157528157"],"question":[0,"Are fetch requests deduplicated in generateStaticParams?"],"answer":[0,"Yes. Fetch requests are automatically memoized for the same data across all generate-prefixed functions, Layouts, Pages, and Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"are-fetch-requests-deduplicated-in-generatestaticparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-fetch-requests-deduplicated-in-generatestaticparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-fetch-requests-deduplicated-in-generatestaticparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are fetch requests deduplicated in generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Fetch requests are automatically memoized for the same data across all generate-prefixed functions, Layouts, Pages, and Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KTPpQ" prefix="r2021" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1165673633560657712"],"question":[0,"What is the default value for the revalidate route segment config option?"],"answer":[0,"The default value is `false`, which caches indefinitely (equivalent to `Infinity`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the revalidate route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>false</code>, which caches indefinitely (equivalent to <code>Infinity</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jvrLq" prefix="r2022" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1683074066273140444"],"question":[0,"What happens to intercepting routes during hard navigation (page refresh)?"],"answer":[0,"Hard navigation bypasses interception and renders the full route instead. Only soft navigation (client-side) triggers the interception behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-intercepting-routes-during-hard-navigation-page-refresh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-intercepting-routes-during-hard-navigation-page-refresh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-intercepting-routes-during-hard-navigation-page-refresh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to intercepting routes during hard navigation (page refresh)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Hard navigation bypasses interception and renders the full route instead. Only soft navigation (client-side) triggers the interception behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dMdDY" prefix="r2023" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2895991725874872712"],"question":[0,"What should default.js return for a modal slot that should close when inactive?"],"answer":[0,"Return `null`. For example, inside the @auth slot for a modal pattern, add a default.js file that returns null to ensure the modal is not rendered when it's not active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-default-js-return-for-a-modal-slot-that-should-close-when-inactive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-default-js-return-for-a-modal-slot-that-should-close-when-inactive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-default-js-return-for-a-modal-slot-that-should-close-when-inactive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should default.js return for a modal slot that should close when inactive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Return <code>null</code>. For example, inside the @auth slot for a modal pattern, add a default.js file that returns null to ensure the modal is not rendered when it's not active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7TVHO" prefix="r2024" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2999849382934290469"],"question":[0,"Does the children slot in a layout require a default.js file?"],"answer":[0,"Yes, when using parallel routes. Since children is an implicit slot, you also need to create a default.js file to render a fallback for children when Next.js cannot recover the active state of the parent page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-children-slot-in-a-layout-require-a-default-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-children-slot-in-a-layout-require-a-default-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-children-slot-in-a-layout-require-a-default-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the children slot in a layout require a default.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, when using parallel routes. Since children is an implicit slot, you also need to create a default.js file to render a fallback for children when Next.js cannot recover the active state of the parent page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13Cjsp" prefix="r2025" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3424138113583952039"],"question":[0,"What is the exact syntax for creating a route group in Next.js?"],"answer":[0,"Wrap a folder name in parentheses: `(folderName)`. The folder is for organizational purposes and is not included in the route's URL path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-creating-a-route-group-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-creating-a-route-group-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-creating-a-route-group-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for creating a route group in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap a folder name in parentheses: <code>(folderName)</code>. The folder is for organizational purposes and is not included in the route's URL path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCx9ku" prefix="r2026" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3542252506406901767"],"question":[0,"Is a page.js or route.js file required for a route segment to be publicly accessible?"],"answer":[0,"Yes. Only the content returned by page.js or route.js is sent to the client. A route becomes public when a page or route file exists."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/colocation"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-page-js-or-route-js-file-required-for-a-route-segment-to-be-publicly-access"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-page-js-or-route-js-file-required-for-a-route-segment-to-be-publicly-access" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-page-js-or-route-js-file-required-for-a-route-segment-to-be-publicly-access" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a page.js or route.js file required for a route segment to be publicly accessible?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Only the content returned by page.js or route.js is sent to the client. A route becomes public when a page or route file exists.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/colocation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZLprFd" prefix="r2027" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3870541686109292216"],"question":[0,"For a route with multiple dynamic segments like [category] and [product], what is the structure of the params object?"],"answer":[0,"The params object contains properties matching each segment name. For example: `params: Promise<{ category: string; product: string }>`. Each property name is the segment's name, and the value is what the segment is filled in with."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"for-a-route-with-multiple-dynamic-segments-like-category-and-product-what-is-the"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-a-route-with-multiple-dynamic-segments-like-category-and-product-what-is-the" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-a-route-with-multiple-dynamic-segments-like-category-and-product-what-is-the" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For a route with multiple dynamic segments like [category] and [product], what is the structure of the params object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The params object contains properties matching each segment name. For example: <code>params: Promise<{ category: string; product: string }></code>. Each property name is the segment's name, and the value is what the segment is filled in with.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ISQtC" prefix="r2028" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3972931271239596773"],"question":[0,"When does generateStaticParams run during next build?"],"answer":[0,"During `next build`, generateStaticParams runs before the corresponding Layouts or Pages are generated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-run-during-next-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-run-during-next-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-run-during-next-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams run during next build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During <code>next build</code>, generateStaticParams runs before the corresponding Layouts or Pages are generated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nyDGG" prefix="r2029" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4321671009349456821"],"question":[0,"What is the exact syntax for creating a private folder that opts out of routing?"],"answer":[0,"Prefix a folder with an underscore: `_folderName`. This indicates the folder is a private implementation detail and should not be considered by the routing system, opting the folder and all its subfolders out of routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/colocation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-creating-a-private-folder-that-opts-out-of-routing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-creating-a-private-folder-that-opts-out-of-routing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-creating-a-private-folder-that-opts-out-of-routing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for creating a private folder that opts out of routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefix a folder with an underscore: <code>_folderName</code>. This indicates the folder is a private implementation detail and should not be considered by the routing system, opting the folder and all its subfolders out of routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/colocation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7kH3L" prefix="r2030" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4342547664948200430"],"question":[0,"Does generateStaticParams run again during revalidation (ISR)?"],"answer":[0,"No. During revalidation (ISR), generateStaticParams will not be called again."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"does-generatestaticparams-run-again-during-revalidation-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-generatestaticparams-run-again-during-revalidation-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-generatestaticparams-run-again-during-revalidation-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does generateStaticParams run again during revalidation (ISR)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. During revalidation (ISR), generateStaticParams will not be called again.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5L9uF" prefix="r2031" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5401005641510150541"],"question":[0,"What parameters does useSelectedLayoutSegment accept for parallel routes?"],"answer":[0,"It accepts a `parallelRoutesKey` parameter. When a user navigates to a route, the function returns the active route segment name within that specific slot (e.g., the string `'login'` for the login segment)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-useselectedlayoutsegment-accept-for-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-useselectedlayoutsegment-accept-for-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-useselectedlayoutsegment-accept-for-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does useSelectedLayoutSegment accept for parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It accepts a <code>parallelRoutesKey</code> parameter. When a user navigates to a route, the function returns the active route segment name within that specific slot (e.g., the string <code>'login'</code> for the login segment).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KQRRo" prefix="r2032" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5679255928876356050"],"question":[0,"Are intercepting route conventions based on the file-system or route segments?"],"answer":[0,"Route segments. The `(..)` convention is based on route segments, not the file-system. For example, it does not consider `@slot` folders in Parallel Routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"are-intercepting-route-conventions-based-on-the-file-system-or-route-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-intercepting-route-conventions-based-on-the-file-system-or-route-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-intercepting-route-conventions-based-on-the-file-system-or-route-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are intercepting route conventions based on the file-system or route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route segments. The <code>(..)</code> convention is based on route segments, not the file-system. For example, it does not consider <code>@slot</code> folders in Parallel Routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1H7LAy" prefix="r2033" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5854643482752170139"],"question":[0,"What happens when you navigate between different root layouts created with route groups?"],"answer":[0,"Navigating across multiple root layouts will cause a full page load (as opposed to a client-side navigation). This only applies to multiple root layouts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-navigate-between-different-root-layouts-created-with-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-navigate-between-different-root-layouts-created-with-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-navigate-between-different-root-layouts-created-with-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you navigate between different root layouts created with route groups?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Navigating across multiple root layouts will cause a full page load (as opposed to a client-side navigation). This only applies to multiple root layouts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dGTis" prefix="r2034" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5968402646285080450"],"question":[0,"What value does params.slug have for an optional catch-all route [[...slug]] when accessing the base route?"],"answer":[0,"The value is `undefined` when accessing the base route (e.g., `/shop` for `app/shop/[[...slug]]/page.js`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-params-slug-have-for-an-optional-catch-all-route-slug-when-acces"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-params-slug-have-for-an-optional-catch-all-route-slug-when-acces" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-params-slug-have-for-an-optional-catch-all-route-slug-when-acces" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does params.slug have for an optional catch-all route [[...slug]] when accessing the base route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The value is <code>undefined</code> when accessing the base route (e.g., <code>/shop</code> for <code>app/shop/[[...slug]]/page.js</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zSj59" prefix="r2035" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6592196239780515422"],"question":[0,"What happens to dynamicParams default when using dynamic = 'error' or dynamic = 'force-static'?"],"answer":[0,"The default of dynamicParams changes from `true` to `false`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-dynamicparams-default-when-using-dynamic-error-or-dynamic-force-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-dynamicparams-default-when-using-dynamic-error-or-dynamic-force-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-dynamicparams-default-when-using-dynamic-error-or-dynamic-force-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to dynamicParams default when using dynamic = 'error' or dynamic = 'force-static'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default of dynamicParams changes from <code>true</code> to <code>false</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DfiEq" prefix="r2036" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6789407266811964829"],"question":[0,"What is the default value for the runtime route segment config option?"],"answer":[0,"The default value is `'nodejs'`. The other possible value is `'edge'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the runtime route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>'nodejs'</code>. The other possible value is <code>'edge'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cn55Q" prefix="r2037" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7050901201038214282"],"question":[0,"Can parallel routes have independent error and loading states?"],"answer":[0,"Yes. Parallel Routes can be streamed independently, allowing you to define independent error and loading states for each route as they're being streamed in independently."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"can-parallel-routes-have-independent-error-and-loading-states"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-parallel-routes-have-independent-error-and-loading-states" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-parallel-routes-have-independent-error-and-loading-states" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can parallel routes have independent error and loading states?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Parallel Routes can be streamed independently, allowing you to define independent error and loading states for each route as they're being streamed in independently.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29xNrc" prefix="r2038" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7194482380357407194"],"question":[0,"What requirement does the revalidate value have in Next.js?"],"answer":[0,"The revalidate value needs to be statically analyzable. For example, `revalidate = 600` is valid, but `revalidate = 60 * 10` is not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-requirement-does-the-revalidate-value-have-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-requirement-does-the-revalidate-value-have-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-requirement-does-the-revalidate-value-have-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What requirement does the revalidate value have in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The revalidate value needs to be statically analyzable. For example, <code>revalidate = 600</code> is valid, but <code>revalidate = 60 * 10</code> is not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hCtAO" prefix="r2039" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8265171063895271107"],"question":[0,"When is the default.js file rendered in parallel routes?"],"answer":[0,"During hard navigation (full-page load) when Next.js cannot recover a slot's active state. It renders as a fallback for unmatched slots during the initial load or full-page reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-default-js-file-rendered-in-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-default-js-file-rendered-in-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-default-js-file-rendered-in-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the default.js file rendered in parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During hard navigation (full-page load) when Next.js cannot recover a slot's active state. It renders as a fallback for unmatched slots during the initial load or full-page reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LMNcJ" prefix="r2040" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8503794381474913728"],"question":[0,"How many times does a child generateStaticParams function execute for nested dynamic routes?"],"answer":[0,"The child generateStaticParams function is executed once for each segment a parent generateStaticParams generates."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-does-a-child-generatestaticparams-function-execute-for-nested-dyn"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-does-a-child-generatestaticparams-function-execute-for-nested-dyn" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-does-a-child-generatestaticparams-function-execute-for-nested-dyn" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times does a child generateStaticParams function execute for nested dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The child generateStaticParams function is executed once for each segment a parent generateStaticParams generates.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UsK14" prefix="r2041" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8523760065520090763"],"question":[0,"What are all possible values for the dynamic route segment config option?"],"answer":[0,"`'auto'` (default), `'force-dynamic'`, `'error'`, and `'force-static'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-possible-values-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-possible-values-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-possible-values-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all possible values for the dynamic route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>'auto'</code> (default), <code>'force-dynamic'</code>, <code>'error'</code>, and <code>'force-static'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2p434q" prefix="r2042" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10854446646041168912"],"question":[0,"What type is params.slug for an optional catch-all segment [[...slug]]?"],"answer":[0,"`string[] | undefined`. It's an array of strings for nested paths, or `undefined` for the base route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-params-slug-for-an-optional-catch-all-segment-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-params-slug-for-an-optional-catch-all-segment-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-params-slug-for-an-optional-catch-all-segment-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is params.slug for an optional catch-all segment [[...slug]]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>string[] | undefined</code>. It's an array of strings for nested paths, or <code>undefined</code> for the base route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="R8iwy" prefix="r2043" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10976972633484293615"],"question":[0,"What happens when dynamicParams is set to false?"],"answer":[0,"Only paths provided by generateStaticParams will be served, and unspecified routes will return 404 or match (in the case of catch-all routes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-set-to-false"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-set-to-false" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-set-to-false" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is set to false?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only paths provided by generateStaticParams will be served, and unspecified routes will return 404 or match (in the case of catch-all routes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17IQOY" prefix="r2044" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11106022546145794339"],"question":[0,"What type is params.slug for a catch-all segment [...slug]?"],"answer":[0,"`string[]` (an array of strings). For example, `/shop/clothes/tops` would have `params.slug = ['clothes', 'tops']`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-params-slug-for-a-catch-all-segment-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-params-slug-for-a-catch-all-segment-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-params-slug-for-a-catch-all-segment-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is params.slug for a catch-all segment [...slug]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>string[]</code> (an array of strings). For example, <code>/shop/clothes/tops</code> would have <code>params.slug = ['clothes', 'tops']</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZI9N7G" prefix="r2045" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11111310985260032489"],"question":[0,"Can routes in different route groups resolve to the same URL path?"],"answer":[0,"No. Routes in different groups should not resolve to the same URL path. For example, `(marketing)/about/page.js` and `(shop)/about/page.js` both resolving to `/about` will cause an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"can-routes-in-different-route-groups-resolve-to-the-same-url-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-routes-in-different-route-groups-resolve-to-the-same-url-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-routes-in-different-route-groups-resolve-to-the-same-url-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can routes in different route groups resolve to the same URL path?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Routes in different groups should not resolve to the same URL path. For example, <code>(marketing)/about/page.js</code> and <code>(shop)/about/page.js</code> both resolving to <code>/about</code> will cause an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QOUGA" prefix="r2046" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11378228118300269812"],"question":[0,"In Next.js 15+, what type is the params prop in page, layout, and route handlers?"],"answer":[0,"A Promise. You must use async/await or React's `use` hook to access the values. For example: `params: Promise<{ slug: string }>`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-what-type-is-the-params-prop-in-page-layout-and-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-what-type-is-the-params-prop-in-page-layout-and-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-what-type-is-the-params-prop-in-page-layout-and-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15+, what type is the params prop in page, layout, and route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A Promise. You must use async/await or React's <code>use</code> hook to access the values. For example: <code>params: Promise<{ slug: string }></code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hq6Vh" prefix="r2047" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11429330145045053000"],"question":[0,"What happens if a default.js file doesn't exist for a parallel route slot?"],"answer":[0,"A 404 is rendered for named slots. The documentation states: 'If default.js doesn't exist, an error is returned for named slots...and requires you to define a default.js'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-a-default-js-file-doesn-t-exist-for-a-parallel-route-slot"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-a-default-js-file-doesn-t-exist-for-a-parallel-route-slot" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-a-default-js-file-doesn-t-exist-for-a-parallel-route-slot" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if a default.js file doesn't exist for a parallel route slot?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A 404 is rendered for named slots. The documentation states: 'If default.js doesn't exist, an error is returned for named slots...and requires you to define a default.js'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Un7V8" prefix="r2048" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11986320898174584329"],"question":[0,"What is the default value for the preferredRegion route segment config option?"],"answer":[0,"The default value is `'auto'`. It inherits from the parent layout if unspecified."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-preferredregion-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-preferredregion-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-preferredregion-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the preferredRegion route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>'auto'</code>. It inherits from the parent layout if unspecified.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gwzvd" prefix="r2049" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12569242993391123654"],"question":[0,"Can generateStaticParams be used in both page and layout components?"],"answer":[0,"Yes, but with different capabilities. Pages can generate params for current and parent segments. Layouts can only generate params for their own segment, not children."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"can-generatestaticparams-be-used-in-both-page-and-layout-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-generatestaticparams-be-used-in-both-page-and-layout-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-generatestaticparams-be-used-in-both-page-and-layout-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can generateStaticParams be used in both page and layout components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but with different capabilities. Pages can generate params for current and parent segments. Layouts can only generate params for their own segment, not children.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pK4Fw" prefix="r2050" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12920245963927519737"],"question":[0,"When does generateStaticParams execute in development (next dev)?"],"answer":[0,"During development, the function executes when you navigate to a route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-execute-in-development-next-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-execute-in-development-next-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-execute-in-development-next-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams execute in development (next dev)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During development, the function executes when you navigate to a route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9aQel" prefix="r2051" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13942767515970207070"],"question":[0,"What is the default value for the dynamicParams route segment config option?"],"answer":[0,"The default value is `true`, which means dynamic segments not included in generateStaticParams are generated on demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamicparams-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamicparams-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamicparams-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the dynamicParams route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>true</code>, which means dynamic segments not included in generateStaticParams are generated on demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jdkL4" prefix="r2052" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14048363588236447885"],"question":[0,"What is the key difference between `[...slug]` and `[[...slug]]`?"],"answer":[0,"With optional catch-all `[[...slug]]`, the route without the parameter is also matched (e.g., `/shop`). Required catch-all `[...slug]` requires at least one segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-key-difference-between-slug-and-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-key-difference-between-slug-and-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-key-difference-between-slug-and-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the key difference between `[...slug]` and `[[...slug]]`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With optional catch-all <code>[[...slug]]</code>, the route without the parameter is also matched (e.g., <code>/shop</code>). Required catch-all <code>[...slug]</code> requires at least one segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB1ip" prefix="r2053" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14091197987556154378"],"question":[0,"Can you safely colocate project files inside route segments in the app directory?"],"answer":[0,"Yes. Project files can be safely colocated inside route segments in the app directory without accidentally being routable, because only content returned by page.js or route.js gets sent to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/colocation"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-safely-colocate-project-files-inside-route-segments-in-the-app-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-safely-colocate-project-files-inside-route-segments-in-the-app-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-safely-colocate-project-files-inside-route-segments-in-the-app-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you safely colocate project files inside route segments in the app directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Project files can be safely colocated inside route segments in the app directory without accidentally being routable, because only content returned by page.js or route.js gets sent to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/colocation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="goiSC" prefix="r2054" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15021765383822605593"],"question":[0,"Can you mix static and dynamic slots at the same route segment level in parallel routes?"],"answer":[0,"No. If one slot is dynamic, all slots at that level must be dynamic. You cannot have separate static and dynamic slots at the same route segment level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-mix-static-and-dynamic-slots-at-the-same-route-segment-level-in-parallel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-mix-static-and-dynamic-slots-at-the-same-route-segment-level-in-parallel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-mix-static-and-dynamic-slots-at-the-same-route-segment-level-in-parallel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you mix static and dynamic slots at the same route segment level in parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. If one slot is dynamic, all slots at that level must be dynamic. You cannot have separate static and dynamic slots at the same route segment level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-caching-and-delivery" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Caching and Delivery</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2jCjsR" prefix="r2055" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"297584333684767122"],"question":[0,"Which image processor is recommended for Next.js production environments?"],"answer":[0,"Sharp - it is significantly faster than Squoosh and uses less memory. It's a fast and efficient image optimization Node.js module using the native libvips library."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sharp-missing-in-production"]]],"topic":[0,"nextjs"],"slug":[0,"which-image-processor-is-recommended-for-next-js-production-environments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-image-processor-is-recommended-for-next-js-production-environments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-image-processor-is-recommended-for-next-js-production-environments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which image processor is recommended for Next.js production environments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Sharp - it is significantly faster than Squoosh and uses less memory. It's a fast and efficient image optimization Node.js module using the native libvips library.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sharp-missing-in-production" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2qD7T1" prefix="r2056" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"416876106192526859"],"question":[0,"Where are optimized images cached in a Next.js application?"],"answer":[0,"Optimized images are cached in the <distDir>/cache/images directory (typically .next/cache/images)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-optimized-images-cached-in-a-next-js-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-optimized-images-cached-in-a-next-js-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-optimized-images-cached-in-a-next-js-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are optimized images cached in a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Optimized images are cached in the <distDir>/cache/images directory (typically .next/cache/images).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14b83M" prefix="r2057" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"546695893272046158"],"question":[0,"What attribute does the priority prop automatically set on the img element?"],"answer":[0,"fetchpriority=\"high\" - this has been automatic since Next.js 13.3+."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-attribute-does-the-priority-prop-automatically-set-on-the-img-element"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-attribute-does-the-priority-prop-automatically-set-on-the-img-element" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-attribute-does-the-priority-prop-automatically-set-on-the-img-element" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What attribute does the priority prop automatically set on the img element?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fetchpriority="high" - this has been automatic since Next.js 13.3+.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzQIHi" prefix="r2058" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"837465166180026186"],"question":[0,"Is pattern matching in remotePatterns case-sensitive?"],"answer":[0,"Yes, each part of the src value is strictly matched against your remotePatterns definitions with exact and case-sensitive matching."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"is-pattern-matching-in-remotepatterns-case-sensitive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-pattern-matching-in-remotepatterns-case-sensitive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-pattern-matching-in-remotepatterns-case-sensitive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is pattern matching in remotePatterns case-sensitive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, each part of the src value is strictly matched against your remotePatterns definitions with exact and case-sensitive matching.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsPYlE" prefix="r2059" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1389746864144665306"],"question":[0,"What Cache-Control header does Next.js set for static image imports?"],"answer":[0,"Next.js automatically hashes file contents and caches static image imports forever with a Cache-Control header of immutable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-cache-control-header-does-next-js-set-for-static-image-imports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cache-control-header-does-next-js-set-for-static-image-imports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cache-control-header-does-next-js-set-for-static-image-imports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Cache-Control header does Next.js set for static image imports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically hashes file contents and caches static image imports forever with a Cache-Control header of immutable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cxwVX" prefix="r2060" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1867058954929618753"],"question":[0,"What is the default value for the dangerouslyAllowSVG configuration?"],"answer":[0,"false - SVG optimization is disabled by default for security reasons."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dangerouslyallowsvg-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dangerouslyallowsvg-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dangerouslyallowsvg-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the dangerouslyAllowSVG configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - SVG optimization is disabled by default for security reasons.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22awET" prefix="r2061" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2383900521475102949"],"question":[0,"When both s-maxage and max-age are present in the Cache-Control header, which does Next.js prioritize?"],"answer":[0,"s-maxage is preferred over max-age when both are present in the Cache-Control header."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"when-both-s-maxage-and-max-age-are-present-in-the-cache-control-header-which-doe"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-both-s-maxage-and-max-age-are-present-in-the-cache-control-header-which-doe" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-both-s-maxage-and-max-age-are-present-in-the-cache-control-header-which-doe" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When both s-maxage and max-age are present in the Cache-Control header, which does Next.js prioritize?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>s-maxage is preferred over max-age when both are present in the Cache-Control header.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29cwqJ" prefix="r2062" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3199142987321571648"],"question":[0,"Which image processor does Next.js use by default in development?"],"answer":[0,"Squoosh - a fully node-based image optimization solution that is slower but doesn't require additional libraries."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sharp-missing-in-production"]]],"topic":[0,"nextjs"],"slug":[0,"which-image-processor-does-next-js-use-by-default-in-development"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-image-processor-does-next-js-use-by-default-in-development" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-image-processor-does-next-js-use-by-default-in-development" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which image processor does Next.js use by default in development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Squoosh - a fully node-based image optimization solution that is slower but doesn't require additional libraries.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sharp-missing-in-production" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NpK5M" prefix="r2063" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3300941486399929529"],"question":[0,"What is required when using output: 'export' for static exports with Next.js images?"],"answer":[0,"You must set images.unoptimized to true in next.config.js, as the Image Optimization API requires a server and cannot function in purely static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/export-image-api"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-when-using-output-export-for-static-exports-with-next-js-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-when-using-output-export-for-static-exports-with-next-js-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-when-using-output-export-for-static-exports-with-next-js-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required when using output: 'export' for static exports with Next.js images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must set images.unoptimized to true in next.config.js, as the Image Optimization API requires a server and cannot function in purely static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/export-image-api" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="R0cbk" prefix="r2064" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3309550745158774817"],"question":[0,"What is the default array for deviceSizes in Next.js image optimization?"],"answer":[0,"[640, 750, 828, 1080, 1200, 1920, 2048, 3840]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-array-for-devicesizes-in-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-array-for-devicesizes-in-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-array-for-devicesizes-in-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default array for deviceSizes in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[640, 750, 828, 1080, 1200, 1920, 2048, 3840]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24KFla" prefix="r2065" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4311358130234858069"],"question":[0,"What HTML element does Next.js add when you use the priority prop?"],"answer":[0,"Next.js adds a <link rel=\"preload\"> tag in the document head, instructing the browser to load the image as soon as possible."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-element-does-next-js-add-when-you-use-the-priority-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-element-does-next-js-add-when-you-use-the-priority-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-element-does-next-js-add-when-you-use-the-priority-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML element does Next.js add when you use the priority prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js adds a <link rel="preload"> tag in the document head, instructing the browser to load the image as soon as possible.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WxG2c" prefix="r2066" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5407820294137638726"],"question":[0,"What is the recommended configuration when enabling dangerouslyAllowSVG?"],"answer":[0,"Set contentDispositionType to 'attachment' and add contentSecurityPolicy: \"default-src 'self'; script-src 'none'; sandbox;\" to prevent malicious scripts embedded in SVG files from executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-configuration-when-enabling-dangerouslyallowsvg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-configuration-when-enabling-dangerouslyallowsvg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-configuration-when-enabling-dangerouslyallowsvg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended configuration when enabling dangerouslyAllowSVG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set contentDispositionType to 'attachment' and add contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;" to prevent malicious scripts embedded in SVG files from executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zk3xmk" prefix="r2067" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5463268902993122962"],"question":[0,"What CSS position value does the Image component use when the fill prop is set?"],"answer":[0,"position: absolute (by default), and the parent element must have position: relative, fixed, or absolute."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-css-position-value-does-the-image-component-use-when-the-fill-prop-is-set"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-css-position-value-does-the-image-component-use-when-the-fill-prop-is-set" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-css-position-value-does-the-image-component-use-when-the-fill-prop-is-set" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSS position value does the Image component use when the fill prop is set?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>position: absolute (by default), and the parent element must have position: relative, fixed, or absolute.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qlXL0" prefix="r2068" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5471680958468167862"],"question":[0,"Can the image cache directory location be configured in Next.js?"],"answer":[0,"No, the cache directory is hard-coded as <distDir>/cache/images and is not currently configurable through official Next.js configuration options."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/38066"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-image-cache-directory-location-be-configured-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-image-cache-directory-location-be-configured-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-image-cache-directory-location-be-configured-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the image cache directory location be configured in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the cache directory is hard-coded as <distDir>/cache/images and is not currently configurable through official Next.js configuration options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/38066" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BIQRY" prefix="r2069" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5676348997874095991"],"question":[0,"What is the default loading behavior for Next.js Image components?"],"answer":[0,"lazy - images are deferred until they reach a calculated distance from the viewport. This is native browser lazy loading."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-loading-behavior-for-next-js-image-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-loading-behavior-for-next-js-image-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-loading-behavior-for-next-js-image-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default loading behavior for Next.js Image components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>lazy - images are deferred until they reach a calculated distance from the viewport. This is native browser lazy loading.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bbvN9" prefix="r2070" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6296827191314260628"],"question":[0,"What is the default value for contentDispositionType in Next.js image configuration?"],"answer":[0,"'attachment' - which forces the browser to download the image when visiting directly, rather than rendering it inline."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-contentdispositiontype-in-next-js-image-configurat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-contentdispositiontype-in-next-js-image-configurat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-contentdispositiontype-in-next-js-image-configurat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for contentDispositionType in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'attachment' - which forces the browser to download the image when visiting directly, rather than rendering it inline.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15pC7n" prefix="r2071" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6348252093360965736"],"question":[0,"What are some built-in loader options available in Next.js image configuration?"],"answer":[0,"You can set loader to 'cloudinary', 'imgix', or 'akamai' for built-in support, or 'custom' with a loaderFile for custom implementations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-some-built-in-loader-options-available-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-some-built-in-loader-options-available-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-some-built-in-loader-options-available-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are some built-in loader options available in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can set loader to 'cloudinary', 'imgix', or 'akamai' for built-in support, or 'custom' with a loaderFile for custom implementations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hH0M8" prefix="r2072" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7297039352708349836"],"question":[0,"Does Next.js provide a built-in mechanism to invalidate the image cache?"],"answer":[0,"No, there is no built-in cache invalidation mechanism. You must either keep minimumCacheTTL low, manually change the src prop, or delete cached files from <distDir>/cache/images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-provide-a-built-in-mechanism-to-invalidate-the-image-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-provide-a-built-in-mechanism-to-invalidate-the-image-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-provide-a-built-in-mechanism-to-invalidate-the-image-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js provide a built-in mechanism to invalidate the image cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, there is no built-in cache invalidation mechanism. You must either keep minimumCacheTTL low, manually change the src prop, or delete cached files from <distDir>/cache/images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1R0U9A" prefix="r2073" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7390944080552546687"],"question":[0,"What are the valid values for the fetchPriority prop?"],"answer":[0,"'high', 'low', and 'auto' (default is 'auto')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-fetchpriority-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-fetchpriority-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-fetchpriority-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the fetchPriority prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'high', 'low', and 'auto' (default is 'auto').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVqaCH" prefix="r2074" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7409942287877390235"],"question":[0,"How does Next.js detect which image format to serve to the browser?"],"answer":[0,"Next.js automatically detects the browser's supported image formats via the request's Accept header to determine the optimal output format."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-detect-which-image-format-to-serve-to-the-browser"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-detect-which-image-format-to-serve-to-the-browser" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-detect-which-image-format-to-serve-to-the-browser" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js detect which image format to serve to the browser?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically detects the browser's supported image formats via the request's Accept header to determine the optimal output format.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zv6SWC" prefix="r2075" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7595809213458408711"],"question":[0,"What should you do when self-hosting Next.js with a CDN/Proxy in front?"],"answer":[0,"You must configure the Proxy to forward the Accept header, as Next.js uses it to determine the best image format for each browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-do-when-self-hosting-next-js-with-a-cdn-proxy-in-front"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-do-when-self-hosting-next-js-with-a-cdn-proxy-in-front" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-do-when-self-hosting-next-js-with-a-cdn-proxy-in-front" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you do when self-hosting Next.js with a CDN/Proxy in front?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must configure the Proxy to forward the Accept header, as Next.js uses it to determine the best image format for each browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BlJ4q" prefix="r2076" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8904800415406686052"],"question":[0,"What size blurDataURL image is recommended for best performance?"],"answer":[0,"A very small image (10px or less) is recommended, as large blurDataURL values may hurt performance."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-size-blurdataurl-image-is-recommended-for-best-performance"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-size-blurdataurl-image-is-recommended-for-best-performance" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-size-blurdataurl-image-is-recommended-for-best-performance" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What size blurDataURL image is recommended for best performance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A very small image (10px or less) is recommended, as large blurDataURL values may hurt performance.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19eIQ3" prefix="r2077" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9584388913799525581"],"question":[0,"What is the default value for the placeholder prop?"],"answer":[0,"'empty' - no placeholder is shown by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-placeholder-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-placeholder-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-placeholder-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the placeholder prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'empty' - no placeholder is shown by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z195j6R" prefix="r2078" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9592609354812348663"],"question":[0,"How should you configure your CDN cache key when caching Next.js optimized images?"],"answer":[0,"You must add the Accept header to the cache key to ensure the CDN caches images in all formats (WebP, AVIF, etc.), not just the first format it receives."],"confidence":[0,0.95],"sources":[1,[[0,"https://imgproxy.net/blog/image-optimization-for-nextjs-with-imgproxy/"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-configure-your-cdn-cache-key-when-caching-next-js-optimized-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-configure-your-cdn-cache-key-when-caching-next-js-optimized-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-configure-your-cdn-cache-key-when-caching-next-js-optimized-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you configure your CDN cache key when caching Next.js optimized images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must add the Accept header to the cache key to ensure the CDN caches images in all formats (WebP, AVIF, etc.), not just the first format it receives.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://imgproxy.net/blog/image-optimization-for-nextjs-with-imgproxy/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>imgproxy.net</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jAVoe" prefix="r2079" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10258119705967869726"],"question":[0,"Can you use the loader prop and unoptimized prop together on a Next.js Image component?"],"answer":[0,"No, they cannot be used together. The unoptimized prop serves images as-is with no loader transformation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-loader-prop-and-unoptimized-prop-together-on-a-next-js-image-com"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-loader-prop-and-unoptimized-prop-together-on-a-next-js-image-com" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-loader-prop-and-unoptimized-prop-together-on-a-next-js-image-com" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the loader prop and unoptimized prop together on a Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, they cannot be used together. The unoptimized prop serves images as-is with no loader transformation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1C2cIQ" prefix="r2080" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10262926048359473679"],"question":[0,"What is the default quality value for Next.js image optimization?"],"answer":[0,"75 (on a scale of 1-100)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-value-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-value-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-value-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality value for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>75 (on a scale of 1-100)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Fp15F" prefix="r2081" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11267852852001577884"],"question":[0,"What performance issue can occur with Squoosh in limited resource environments?"],"answer":[0,"Squoosh can cause very high memory usage during image optimizations and might crash the entire Next.js container in a limited resource environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/41417"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-issue-can-occur-with-squoosh-in-limited-resource-environments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-issue-can-occur-with-squoosh-in-limited-resource-environments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-issue-can-occur-with-squoosh-in-limited-resource-environments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance issue can occur with Squoosh in limited resource environments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Squoosh can cause very high memory usage during image optimizations and might crash the entire Next.js container in a limited resource environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/41417" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mdJcb" prefix="r2082" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11387604043501226901"],"question":[0,"What are the possible values for the x-nextjs-cache response header?"],"answer":[0,"MISS (not in cache, occurs on first visit), STALE (in cache but exceeded revalidate time, will be updated in background), and HIT (in cache and has not exceeded revalidate time)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-the-x-nextjs-cache-response-header"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-the-x-nextjs-cache-response-header" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-the-x-nextjs-cache-response-header" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for the x-nextjs-cache response header?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>MISS (not in cache, occurs on first visit), STALE (in cache but exceeded revalidate time, will be updated in background), and HIT (in cache and has not exceeded revalidate time).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dJLYs" prefix="r2083" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11714964301952338137"],"question":[0,"What happens if you omit the sizes prop on a responsive image?"],"answer":[0,"The browser assumes the image will be as wide as the viewport (100vw), which can cause unnecessarily large images to be downloaded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-omit-the-sizes-prop-on-a-responsive-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-omit-the-sizes-prop-on-a-responsive-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-omit-the-sizes-prop-on-a-responsive-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you omit the sizes prop on a responsive image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The browser assumes the image will be as wide as the viewport (100vw), which can cause unnecessarily large images to be downloaded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11F1oB" prefix="r2084" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12327187795873453610"],"question":[0,"What are the valid values for the decoding prop and what is the default?"],"answer":[0,"'async' (default - asynchronously decode), 'sync' (synchronously decode), or 'auto' (browser chooses)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-decoding-prop-and-what-is-the-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-decoding-prop-and-what-is-the-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-decoding-prop-and-what-is-the-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the decoding prop and what is the default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'async' (default - asynchronously decode), 'sync' (synchronously decode), or 'auto' (browser chooses).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZReIe8" prefix="r2085" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12425389702055082364"],"question":[0,"What is the default value of minimumCacheTTL for Next.js image optimization?"],"answer":[0,"14400 seconds (4 hours)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-minimumcachettl-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-minimumcachettl-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-minimumcachettl-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of minimumCacheTTL for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>14400 seconds (4 hours)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1BXc3F" prefix="r2086" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12705748526532483763"],"question":[0,"What happens to lazy loading when you set the priority prop to true?"],"answer":[0,"Lazy loading is automatically disabled for images using priority."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-lazy-loading-when-you-set-the-priority-prop-to-true"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-lazy-loading-when-you-set-the-priority-prop-to-true" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-lazy-loading-when-you-set-the-priority-prop-to-true" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to lazy loading when you set the priority prop to true?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Lazy loading is automatically disabled for images using priority.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuE0ld" prefix="r2087" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12765966640520621875"],"question":[0,"What is the default image format configuration in Next.js?"],"answer":[0,"['image/webp'] - WebP is the default format if you don't specify your own."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-format-configuration-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-format-configuration-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-format-configuration-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image format configuration in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>['image/webp'] - WebP is the default format if you don't specify your own.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2uMkmm" prefix="r2088" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13336458746590778774"],"question":[0,"How does Next.js determine the cache expiration (Max Age) for optimized images?"],"answer":[0,"The expiration is defined by either the minimumCacheTTL configuration or the upstream image Cache-Control header, whichever is larger."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-determine-the-cache-expiration-max-age-for-optimized-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-determine-the-cache-expiration-max-age-for-optimized-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-determine-the-cache-expiration-max-age-for-optimized-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js determine the cache expiration (Max Age) for optimized images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The expiration is defined by either the minimumCacheTTL configuration or the upstream image Cache-Control header, whichever is larger.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ajnrI" prefix="r2089" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14052524362430092471"],"question":[0,"What changed with the priority property in Next.js 16?"],"answer":[0,"The priority property has been deprecated in favor of the preload property. In most cases, you should use loading=\"eager\" or fetchPriority=\"high\" instead of preload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-changed-with-the-priority-property-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-changed-with-the-priority-property-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-changed-with-the-priority-property-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What changed with the priority property in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The priority property has been deprecated in favor of the preload property. In most cases, you should use loading="eager" or fetchPriority="high" instead of preload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wXAP1" prefix="r2090" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14253003030397646123"],"question":[0,"What are the required properties in a remotePatterns configuration object?"],"answer":[0,"protocol, hostname, port, pathname, and search. When omitting any of these, the wildcard ** is implied, which is not recommended for security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-properties-in-a-remotepatterns-configuration-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-properties-in-a-remotepatterns-configuration-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-properties-in-a-remotepatterns-configuration-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required properties in a remotePatterns configuration object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>protocol, hostname, port, pathname, and search. When omitting any of these, the wildcard ** is implied, which is not recommended for security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z259U9Y" prefix="r2091" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14386157583310458001"],"question":[0,"What are the three parameters that a custom loader function receives in Next.js?"],"answer":[0,"src (the image source), width (requested image width), and quality (image quality, defaults to 75)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-parameters-that-a-custom-loader-function-receives-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-parameters-that-a-custom-loader-function-receives-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-parameters-that-a-custom-loader-function-receives-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three parameters that a custom loader function receives in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>src (the image source), width (requested image width), and quality (image quality, defaults to 75).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EmKkp" prefix="r2092" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14603097862076665384"],"question":[0,"How does the sizes prop affect srcset generation in Next.js?"],"answer":[0,"Without sizes, Next.js generates a limited srcset (e.g. 1x, 2x) for fixed-size images. With sizes, it generates a full srcset (e.g. 640w, 750w, etc.) optimized for responsive layouts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-sizes-prop-affect-srcset-generation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-sizes-prop-affect-srcset-generation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-sizes-prop-affect-srcset-generation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the sizes prop affect srcset generation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Without sizes, Next.js generates a limited srcset (e.g. 1x, 2x) for fixed-size images. With sizes, it generates a full srcset (e.g. 640w, 750w, etc.) optimized for responsive layouts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Iov02" prefix="r2093" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14879865719626320999"],"question":[0,"What happens if you request an image quality value that isn't in the configured qualities array?"],"answer":[0,"You will receive an HTTP 400 (Bad Request) response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-qualities"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-request-an-image-quality-value-that-isn-t-in-the-configured-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-request-an-image-quality-value-that-isn-t-in-the-configured-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-request-an-image-quality-value-that-isn-t-in-the-configured-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you request an image quality value that isn't in the configured qualities array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You will receive an HTTP 400 (Bad Request) response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-qualities" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="upgrading-upgrade-methods-tooling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Upgrading > Upgrade Methods & Tooling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1lWPAD" prefix="r2094" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"384280551559391182"],"question":[0,"What is the command to run the cra-to-next codemod for migrating Create React App?"],"answer":[0,"npx @next/codemod cra-to-next"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-cra-to-next-codemod-for-migrating-create-react-ap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-cra-to-next-codemod-for-migrating-create-react-ap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-cra-to-next-codemod-for-migrating-create-react-ap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the cra-to-next codemod for migrating Create React App?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod cra-to-next</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hnYbo" prefix="r2095" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"500472640718546298"],"question":[0,"What does the app-dir-runtime-config-experimental-edge codemod do in Next.js 15?"],"answer":[0,"Transforms Route Segment Config runtime value experimental-edge to edge"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-app-dir-runtime-config-experimental-edge-codemod-do-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-app-dir-runtime-config-experimental-edge-codemod-do-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-app-dir-runtime-config-experimental-edge-codemod-do-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the app-dir-runtime-config-experimental-edge codemod do in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Transforms Route Segment Config runtime value experimental-edge to edge</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sumGR" prefix="r2096" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"578006162489818363"],"question":[0,"What three dynamic APIs from next/headers does the next-async-request-api codemod transform?"],"answer":[0,"cookies(), headers(), and draftMode()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-dynamic-apis-from-next-headers-does-the-next-async-request-api-codemo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-dynamic-apis-from-next-headers-does-the-next-async-request-api-codemo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-dynamic-apis-from-next-headers-does-the-next-async-request-api-codemo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three dynamic APIs from next/headers does the next-async-request-api codemod transform?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies(), headers(), and draftMode()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="HdrQS" prefix="r2097" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"822951534360770477"],"question":[0,"What is the minimum TypeScript version required for async Server Components in Next.js App Router?"],"answer":[0,"5.1.3"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-typescript-version-required-for-async-server-components-in-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-typescript-version-required-for-async-server-components-in-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-typescript-version-required-for-async-server-components-in-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum TypeScript version required for async Server Components in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5.1.3</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UUYzm" prefix="r2098" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"962905678840651493"],"question":[0,"What flag displays all available options for the next upgrade command?"],"answer":[0,"-h or --help"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-displays-all-available-options-for-the-next-upgrade-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-displays-all-available-options-for-the-next-upgrade-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-displays-all-available-options-for-the-next-upgrade-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag displays all available options for the next upgrade command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>-h or --help</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Xk0o0" prefix="r2099" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2425990433882110729"],"question":[0,"What is the command to run the new-link codemod for Next.js 13?"],"answer":[0,"npx @next/codemod@latest new-link ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-new-link-codemod-for-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-new-link-codemod-for-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-new-link-codemod-for-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the new-link codemod for Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@latest new-link .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vWcr5" prefix="r2100" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2579033968261875734"],"question":[0,"What does the next-og-import codemod do in Next.js 14?"],"answer":[0,"Moves ImageResponse imports from next/server to next/og"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-next-og-import-codemod-do-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-next-og-import-codemod-do-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-next-og-import-codemod-do-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the next-og-import codemod do in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Moves ImageResponse imports from next/server to next/og</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2u1g1H" prefix="r2101" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2759784028090786433"],"question":[0,"Where can all the test cases for Next.js codemod transformations be found?"],"answer":[0,"In the __testfixtures__ directory"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-all-the-test-cases-for-next-js-codemod-transformations-be-found"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-all-the-test-cases-for-next-js-codemod-transformations-be-found" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-all-the-test-cases-for-next-js-codemod-transformations-be-found" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can all the test cases for Next.js codemod transformations be found?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the <strong>testfixtures</strong> directory</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZV7e0S" prefix="r2102" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2838221185381055377"],"question":[0,"What is the command to run the built-in-next-font codemod for Next.js 13.2?"],"answer":[0,"npx @next/codemod@latest built-in-next-font ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-built-in-next-font-codemod-for-next-js-13-2"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-built-in-next-font-codemod-for-next-js-13-2" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-built-in-next-font-codemod-for-next-js-13-2" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the built-in-next-font codemod for Next.js 13.2?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@latest built-in-next-font .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OfJWT" prefix="r2103" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3348171407407204185"],"question":[0,"What is the command to install the Next.js canary release?"],"answer":[0,"npm install next@canary"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-starting/upgrading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-install-the-next-js-canary-release"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-install-the-next-js-canary-release" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-install-the-next-js-canary-release" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to install the Next.js canary release?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm install next@canary</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-starting/upgrading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DekPj" prefix="r2104" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3495293995760316086"],"question":[0,"What is the minimum Node.js version required for Next.js 14?"],"answer":[0,"18.17"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-14"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>18.17</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gmIwy" prefix="r2105" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3967544950061590663"],"question":[0,"What is the default revision type when using the @next/codemod upgrade command for stable versions?"],"answer":[0,"minor"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-revision-type-when-using-the-next-codemod-upgrade-command-fo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-revision-type-when-using-the-next-codemod-upgrade-command-fo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-revision-type-when-using-the-next-codemod-upgrade-command-fo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default revision type when using the @next/codemod upgrade command for stable versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>minor</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PeIeG" prefix="r2106" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5482145380070655227"],"question":[0,"What does the next-image-to-legacy-image codemod do in Next.js 13?"],"answer":[0,"Renames image imports for Next.js 13 compatibility"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-next-image-to-legacy-image-codemod-do-in-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-next-image-to-legacy-image-codemod-do-in-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-next-image-to-legacy-image-codemod-do-in-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the next-image-to-legacy-image codemod do in Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Renames image imports for Next.js 13 compatibility</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16dz1o" prefix="r2107" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6467373609726352821"],"question":[0,"What does Next.js recommend regarding serving production traffic from canary versions?"],"answer":[0,"They do not recommend serving production traffic from canary versions"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/upgrading"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-js-recommend-regarding-serving-production-traffic-from-canary-ver"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-js-recommend-regarding-serving-production-traffic-from-canary-ver" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-js-recommend-regarding-serving-production-traffic-from-canary-ver" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Next.js recommend regarding serving production traffic from canary versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>They do not recommend serving production traffic from canary versions</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/upgrading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OxFr7" prefix="r2108" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6952042907797091461"],"question":[0,"What is the command to run the name-default-component codemod for Next.js 9?"],"answer":[0,"npx @next/codemod name-default-component"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-name-default-component-codemod-for-next-js-9"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-name-default-component-codemod-for-next-js-9" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-name-default-component-codemod-for-next-js-9" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the name-default-component codemod for Next.js 9?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod name-default-component</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yqm9Q" prefix="r2109" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7135773893200734598"],"question":[0,"What environment variable prefix needs to be changed when migrating from Create React App to Next.js?"],"answer":[0,"Change REACT_APP_ prefix to NEXT_PUBLIC_"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/migrating/from-create-react-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-prefix-needs-to-be-changed-when-migrating-from-create-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-prefix-needs-to-be-changed-when-migrating-from-create-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-prefix-needs-to-be-changed-when-migrating-from-create-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable prefix needs to be changed when migrating from Create React App to Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Change REACT_APP_ prefix to NEXT_PUBLIC_</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/migrating/from-create-react-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z185ppJ" prefix="r2110" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7440517436910775237"],"question":[0,"What is the command syntax for the @next/codemod upgrade command?"],"answer":[0,"npx @next/codemod upgrade [revision]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-syntax-for-the-next-codemod-upgrade-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-syntax-for-the-next-codemod-upgrade-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-syntax-for-the-next-codemod-upgrade-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command syntax for the @next/codemod upgrade command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod upgrade [revision]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CHnTy" prefix="r2111" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7938413958163816884"],"question":[0,"What comment prefix does the Next.js codemod add when it cannot automatically migrate code?"],"answer":[0,"@next-codemod-error"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-comment-prefix-does-the-next-js-codemod-add-when-it-cannot-automatically-mi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-comment-prefix-does-the-next-js-codemod-add-when-it-cannot-automatically-mi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-comment-prefix-does-the-next-js-codemod-add-when-it-cannot-automatically-mi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What comment prefix does the Next.js codemod add when it cannot automatically migrate code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@next-codemod-error</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14gSxt" prefix="r2112" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8241017417420065356"],"question":[0,"What typecast prefix does the Next.js codemod add for TypeScript files when automatic migration isn't possible?"],"answer":[0,"UnsafeUnwrapped"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-typecast-prefix-does-the-next-js-codemod-add-for-typescript-files-when-auto"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typecast-prefix-does-the-next-js-codemod-add-for-typescript-files-when-auto" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typecast-prefix-does-the-next-js-codemod-add-for-typescript-files-when-auto" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What typecast prefix does the Next.js codemod add for TypeScript files when automatic migration isn't possible?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>UnsafeUnwrapped</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CaaHo" prefix="r2113" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8818157360190066207"],"question":[0,"What is the minimum Node.js version required for Next.js 15?"],"answer":[0,"18.18.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>18.18.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ykE4N" prefix="r2114" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9324801768801840599"],"question":[0,"What does the middleware-to-proxy codemod do in Next.js 16?"],"answer":[0,"Migrates deprecated middleware convention to proxy approach"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-middleware-to-proxy-codemod-do-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-middleware-to-proxy-codemod-do-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-middleware-to-proxy-codemod-do-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the middleware-to-proxy codemod do in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Migrates deprecated middleware convention to proxy approach</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3YEFt" prefix="r2115" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9849185253439310067"],"question":[0,"What does the remove-unstable-prefix codemod do in Next.js 16?"],"answer":[0,"Eliminates unstable_ prefix from stabilized APIs"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-remove-unstable-prefix-codemod-do-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-remove-unstable-prefix-codemod-do-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-remove-unstable-prefix-codemod-do-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the remove-unstable-prefix codemod do in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Eliminates unstable_ prefix from stabilized APIs</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CKPxS" prefix="r2116" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10950187321396742313"],"question":[0,"How frequently does Next.js publish new versions to the canary channel?"],"answer":[0,"Daily"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/upgrading"]]],"topic":[0,"nextjs"],"slug":[0,"how-frequently-does-next-js-publish-new-versions-to-the-canary-channel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-frequently-does-next-js-publish-new-versions-to-the-canary-channel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-frequently-does-next-js-publish-new-versions-to-the-canary-channel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How frequently does Next.js publish new versions to the canary channel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Daily</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/upgrading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CuWYa" prefix="r2117" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11026818325689866688"],"question":[0,"What is the command to run the next-async-request-api codemod for Next.js 15?"],"answer":[0,"npx @next/codemod@latest next-async-request-api ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-next-async-request-api-codemod-for-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-next-async-request-api-codemod-for-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-next-async-request-api-codemod-for-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the next-async-request-api codemod for Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@latest next-async-request-api .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mfkP5" prefix="r2118" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11089427259076762557"],"question":[0,"What is the minimum Node.js version required for Next.js 16?"],"answer":[0,"20.9"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>20.9</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IVtdK" prefix="r2119" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11292796619367121767"],"question":[0,"What command should be used to upgrade Next.js 15 and earlier versions?"],"answer":[0,"npx @next/codemod@canary upgrade latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-should-be-used-to-upgrade-next-js-15-and-earlier-versions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-should-be-used-to-upgrade-next-js-15-and-earlier-versions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-should-be-used-to-upgrade-next-js-15-and-earlier-versions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command should be used to upgrade Next.js 15 and earlier versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@canary upgrade latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1L1Xoq" prefix="r2120" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11333902534629749337"],"question":[0,"What is the basic syntax for running a specific Next.js codemod transformation?"],"answer":[0,"npx @next/codemod <transform> <path>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-syntax-for-running-a-specific-next-js-codemod-transformation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-syntax-for-running-a-specific-next-js-codemod-transformation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-syntax-for-running-a-specific-next-js-codemod-transformation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic syntax for running a specific Next.js codemod transformation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod <transform> <path></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWooD6" prefix="r2121" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11822715521933855216"],"question":[0,"What does the url-to-withrouter codemod do in Next.js 6?"],"answer":[0,"Replaces deprecated url property with withRouter HOC"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-url-to-withrouter-codemod-do-in-next-js-6"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-url-to-withrouter-codemod-do-in-next-js-6" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-url-to-withrouter-codemod-do-in-next-js-6" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the url-to-withrouter codemod do in Next.js 6?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Replaces deprecated url property with withRouter HOC</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zw1gzu" prefix="r2122" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11978241151750249854"],"question":[0,"What happens during Next.js build if @next-codemod-error comments are not addressed?"],"answer":[0,"Next.js will error in both dev and build to enforce that you address the issues"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-during-next-js-build-if-next-codemod-error-comments-are-not-address"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-during-next-js-build-if-next-codemod-error-comments-are-not-address" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-during-next-js-build-if-next-codemod-error-comments-are-not-address" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens during Next.js build if @next-codemod-error comments are not addressed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will error in both dev and build to enforce that you address the issues</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IwQKj" prefix="r2123" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12222869911611217282"],"question":[0,"What is the command to run the remove-experimental-ppr codemod for Next.js 16?"],"answer":[0,"npx @next/codemod@latest remove-experimental-ppr ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-remove-experimental-ppr-codemod-for-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-remove-experimental-ppr-codemod-for-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-remove-experimental-ppr-codemod-for-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the remove-experimental-ppr codemod for Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@latest remove-experimental-ppr .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2a2Gdv" prefix="r2124" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12251502822669395209"],"question":[0,"What does the metadata-to-viewport-export codemod do in Next.js 14?"],"answer":[0,"Extracts viewport metadata into separate export"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-metadata-to-viewport-export-codemod-do-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-metadata-to-viewport-export-codemod-do-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-metadata-to-viewport-export-codemod-do-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the metadata-to-viewport-export codemod do in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Extracts viewport metadata into separate export</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Kh1Ml" prefix="r2125" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12476681707308778375"],"question":[0,"What are the two options for resolving @next-codemod-error comments?"],"answer":[0,"1) Make the necessary changes and remove the comment, or 2) Replace @next-codemod-error with @next-codemod-ignore to bypass the build error"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-options-for-resolving-next-codemod-error-comments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-options-for-resolving-next-codemod-error-comments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-options-for-resolving-next-codemod-error-comments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two options for resolving @next-codemod-error comments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Make the necessary changes and remove the comment, or 2) Replace @next-codemod-error with @next-codemod-ignore to bypass the build error</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gK7WK" prefix="r2126" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13107947070993796977"],"question":[0,"What two methods does the next-async-request-api codemod use to transform synchronous dynamic APIs?"],"answer":[0,"It either wraps them with await (for Server Components) or React.use() (for Client Components)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-methods-does-the-next-async-request-api-codemod-use-to-transform-synchr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-methods-does-the-next-async-request-api-codemod-use-to-transform-synchr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-methods-does-the-next-async-request-api-codemod-use-to-transform-synchr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two methods does the next-async-request-api codemod use to transform synchronous dynamic APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It either wraps them with await (for Server Components) or React.use() (for Client Components)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17a6Ct" prefix="r2127" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13358350236350835563"],"question":[0,"What TypeScript package versions should be upgraded when upgrading Next.js with TypeScript?"],"answer":[0,"@types/react and @types/react-dom to their latest versions"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-package-versions-should-be-upgraded-when-upgrading-next-js-with-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-package-versions-should-be-upgraded-when-upgrading-next-js-with-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-package-versions-should-be-upgraded-when-upgrading-next-js-with-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript package versions should be upgraded when upgrading Next.js with TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@types/react and @types/react-dom to their latest versions</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9eMeI" prefix="r2128" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13720428745260638779"],"question":[0,"What is the minimum Node.js version required for Next.js 13?"],"answer":[0,"16.14.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/upgrading/version-13"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>16.14.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/upgrading/version-13" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ab4U8" prefix="r2129" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13757576828851793255"],"question":[0,"What is the command to run the next-lint-to-eslint-cli codemod for Next.js 16?"],"answer":[0,"npx @next/codemod@canary next-lint-to-eslint-cli ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/advanced-features/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-run-the-next-lint-to-eslint-cli-codemod-for-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-run-the-next-lint-to-eslint-cli-codemod-for-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-run-the-next-lint-to-eslint-cli-codemod-for-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to run the next-lint-to-eslint-cli codemod for Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@canary next-lint-to-eslint-cli .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/advanced-features/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NdO15" prefix="r2130" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13887841060793875914"],"question":[0,"What is the default behavior of the --revision flag in next upgrade command when not specified?"],"answer":[0,"Defaults to the release channel you have currently installed"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-behavior-of-the-revision-flag-in-next-upgrade-command-when-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-behavior-of-the-revision-flag-in-next-upgrade-command-when-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-behavior-of-the-revision-flag-in-next-upgrade-command-when-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default behavior of the --revision flag in next upgrade command when not specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Defaults to the release channel you have currently installed</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LBTsU" prefix="r2131" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14166077864844573266"],"question":[0,"What packages does the Next.js upgrade command automatically update?"],"answer":[0,"Next.js, React, and React DOM"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-packages-does-the-next-js-upgrade-command-automatically-update"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-packages-does-the-next-js-upgrade-command-automatically-update" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-packages-does-the-next-js-upgrade-command-automatically-update" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What packages does the Next.js upgrade command automatically update?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js, React, and React DOM</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NTDjI" prefix="r2132" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14366758181203974876"],"question":[0,"What are the three available flags for the @next/codemod command?"],"answer":[0,"--dry (performs a dry-run without editing code), --print (displays changed output for comparison), and --verbose (shows detailed output during the upgrade process)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-available-flags-for-the-next-codemod-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-available-flags-for-the-next-codemod-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-available-flags-for-the-next-codemod-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three available flags for the @next/codemod command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--dry (performs a dry-run without editing code), --print (displays changed output for comparison), and --verbose (shows detailed output during the upgrade process)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="configuration-performance-optimization" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Configuration > Performance & Optimization</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="1Nga2B" prefix="r2133" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"467633060446040178"],"question":[0,"What compression algorithm does Next.js use by default?"],"answer":[0,"Next.js uses gzip compression by default when using next start or a custom server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/compress"]]],"topic":[0,"nextjs"],"slug":[0,"what-compression-algorithm-does-next-js-use-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-compression-algorithm-does-next-js-use-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-compression-algorithm-does-next-js-use-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What compression algorithm does Next.js use by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses gzip compression by default when using next start or a custom server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/compress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bwPvs" prefix="r2134" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1336068404508017173"],"question":[0,"What is the default value for reactStrictMode in Next.js App Router (13.5.1+)?"],"answer":[0,"reactStrictMode is true by default with App Router since Next.js 13.5.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/reactStrictMode"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-reactstrictmode-in-next-js-app-router-13-5-1"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-reactstrictmode-in-next-js-app-router-13-5-1" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-reactstrictmode-in-next-js-app-router-13-5-1" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for reactStrictMode in Next.js App Router (13.5.1+)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>reactStrictMode is true by default with App Router since Next.js 13.5.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/reactStrictMode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZxxSDC" prefix="r2135" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1555256438006029789"],"question":[0,"Is HTTP Keep-Alive enabled by default in Next.js?"],"answer":[0,"Yes, Next.js will automatically use HTTP Keep-Alive by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/httpAgentOptions"]]],"topic":[0,"nextjs"],"slug":[0,"is-http-keep-alive-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-http-keep-alive-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-http-keep-alive-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is HTTP Keep-Alive enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js will automatically use HTTP Keep-Alive by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/httpAgentOptions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1BLlkG" prefix="r2136" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1629591463286092137"],"question":[0,"How many times will the Next.js default image optimization loader follow HTTP redirects when fetching remote images?"],"answer":[0,"The default image optimization loader will follow HTTP redirects up to 3 times."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/images"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-will-the-next-js-default-image-optimization-loader-follow-http-re"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-will-the-next-js-default-image-optimization-loader-follow-http-re" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-will-the-next-js-default-image-optimization-loader-follow-http-re" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times will the Next.js default image optimization loader follow HTTP redirects when fetching remote images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default image optimization loader will follow HTTP redirects up to 3 times.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RGAyx" prefix="r2137" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2262445076177290312"],"question":[0,"How much faster is SWC minification compared to Terser in Next.js?"],"answer":[0,"SWC minification is 7x faster than Terser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-faster-is-swc-minification-compared-to-terser-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-faster-is-swc-minification-compared-to-terser-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-faster-is-swc-minification-compared-to-terser-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much faster is SWC minification compared to Terser in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC minification is 7x faster than Terser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gGscU" prefix="r2138" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2595066059626872728"],"question":[0,"What is the default minimumCacheTTL value for Next.js image optimization in Next.js 16?"],"answer":[0,"The default minimumCacheTTL is 14400 seconds (4 hours) in Next.js 16. This changed from the previous default of 60 seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-minimumcachettl-value-for-next-js-image-optimization-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-minimumcachettl-value-for-next-js-image-optimization-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-minimumcachettl-value-for-next-js-image-optimization-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default minimumCacheTTL value for Next.js image optimization in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default minimumCacheTTL is 14400 seconds (4 hours) in Next.js 16. This changed from the previous default of 60 seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7p2gD" prefix="r2139" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2657237643482783386"],"question":[0,"What is the default build output directory in Next.js?"],"answer":[0,"The default build output directory is '.next'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-build-output-directory-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-build-output-directory-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-build-output-directory-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default build output directory in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default build output directory is '.next'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1uNEJx" prefix="r2140" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3518390896218247632"],"question":[0,"What is the default contentDispositionType for Next.js image optimization?"],"answer":[0,"The default value is 'attachment', which forces the browser to download the image when visiting directly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/invalid-images-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-contentdispositiontype-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-contentdispositiontype-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-contentdispositiontype-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default contentDispositionType for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'attachment', which forces the browser to download the image when visiting directly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/invalid-images-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kit0f" prefix="r2141" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3744204796882884990"],"question":[0,"What is the default value for trailingSlash in Next.js?"],"answer":[0,"The default value is false, which means URLs with trailing slashes are redirected to URLs without trailing slashes (e.g., /about/ redirects to /about)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-trailingslash-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-trailingslash-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-trailingslash-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for trailingSlash in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false, which means URLs with trailing slashes are redirected to URLs without trailing slashes (e.g., /about/ redirects to /about).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uKds3" prefix="r2142" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3777666183398912599"],"question":[0,"What is the stable replacement for experimental.incrementalCacheHandlerPath in Next.js 14+?"],"answer":[0,"The configuration has been moved to the top-level cacheHandler property. Use cacheHandler instead of experimental.incrementalCacheHandlerPath."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/incrementalCacheHandlerPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-stable-replacement-for-experimental-incrementalcachehandlerpath-in-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-stable-replacement-for-experimental-incrementalcachehandlerpath-in-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-stable-replacement-for-experimental-incrementalcachehandlerpath-in-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the stable replacement for experimental.incrementalCacheHandlerPath in Next.js 14+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The configuration has been moved to the top-level cacheHandler property. Use cacheHandler instead of experimental.incrementalCacheHandlerPath.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/incrementalCacheHandlerPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hRPFF" prefix="r2143" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3803342389641981690"],"question":[0,"What is the default memoryLimit for experimental.turbotrace in Next.js?"],"answer":[0,"The default memoryLimit is 6000 MB (6 GB)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/api-reference/next-config-js/output"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-memorylimit-for-experimental-turbotrace-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-memorylimit-for-experimental-turbotrace-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-memorylimit-for-experimental-turbotrace-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default memoryLimit for experimental.turbotrace in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default memoryLimit is 6000 MB (6 GB).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/api-reference/next-config-js/output" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bRSpn" prefix="r2144" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3806153750537833756"],"question":[0,"How much longer does AVIF encoding take compared to WebP in Next.js image optimization?"],"answer":[0,"AVIF generally takes 50% longer to encode compared to WebP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-longer-does-avif-encoding-take-compared-to-webp-in-next-js-image-optimi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-longer-does-avif-encoding-take-compared-to-webp-in-next-js-image-optimi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-longer-does-avif-encoding-take-compared-to-webp-in-next-js-image-optimi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much longer does AVIF encoding take compared to WebP in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AVIF generally takes 50% longer to encode compared to WebP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KR8lD" prefix="r2145" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4569186898645899633"],"question":[0,"Are the public and .next/static folders automatically copied in Next.js standalone mode?"],"answer":[0,"No, the minimal server in standalone mode does not copy the public or .next/static folders by default. These folders should ideally be handled by a CDN, though they can be copied manually to standalone/public and standalone/.next/static."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/output"]]],"topic":[0,"nextjs"],"slug":[0,"are-the-public-and-next-static-folders-automatically-copied-in-next-js-standalon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-the-public-and-next-static-folders-automatically-copied-in-next-js-standalon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-the-public-and-next-static-folders-automatically-copied-in-next-js-standalon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are the public and .next/static folders automatically copied in Next.js standalone mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the minimal server in standalone mode does not copy the public or .next/static folders by default. These folders should ideally be handled by a CDN, though they can be copied manually to standalone/public and standalone/.next/static.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/output" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAzTfK" prefix="r2146" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5114060255055747454"],"question":[0,"Is productionBrowserSourceMaps enabled by default in Next.js?"],"answer":[0,"No, source maps are disabled by default in production builds. You must set productionBrowserSourceMaps: true to enable them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/productionBrowserSourceMaps"]]],"topic":[0,"nextjs"],"slug":[0,"is-productionbrowsersourcemaps-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-productionbrowsersourcemaps-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-productionbrowsersourcemaps-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is productionBrowserSourceMaps enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, source maps are disabled by default in production builds. You must set productionBrowserSourceMaps: true to enable them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/productionBrowserSourceMaps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tJSu" prefix="r2147" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5155515155656533137"],"question":[0,"What is the stable replacement for experimental.serverComponentsExternalPackages in Next.js 15?"],"answer":[0,"The stable replacement is serverExternalPackages. The experimental.serverComponentsExternalPackages option was renamed to serverExternalPackages in Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-stable-replacement-for-experimental-servercomponentsexternalpackages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-stable-replacement-for-experimental-servercomponentsexternalpackages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-stable-replacement-for-experimental-servercomponentsexternalpackages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the stable replacement for experimental.serverComponentsExternalPackages in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The stable replacement is serverExternalPackages. The experimental.serverComponentsExternalPackages option was renamed to serverExternalPackages in Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2t1OkD" prefix="r2148" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5186618705811477424"],"question":[0,"Does Next.js generate ETags for pages by default?"],"answer":[0,"Yes, Next.js will generate etags for every page by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-generate-etags-for-pages-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-generate-etags-for-pages-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-generate-etags-for-pages-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js generate ETags for pages by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js will generate etags for every page by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1d7DQe" prefix="r2149" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5293978122539528775"],"question":[0,"What is the default quality setting for Next.js Image optimization?"],"answer":[0,"The default quality setting is 75."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-setting-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-setting-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-setting-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality setting for Next.js Image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default quality setting is 75.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHio3N" prefix="r2150" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5529231132290440332"],"question":[0,"Is the removeConsole compiler option enabled by default in Next.js?"],"answer":[0,"No, removeConsole is not enabled by default. You must explicitly configure it in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-removeconsole-compiler-option-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-removeconsole-compiler-option-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-removeconsole-compiler-option-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the removeConsole compiler option enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, removeConsole is not enabled by default. You must explicitly configure it in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ShsO7" prefix="r2151" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6079403344673616515"],"question":[0,"How many packages are optimized by default with optimizePackageImports in Next.js?"],"answer":[0,"27 packages/patterns are optimized by default, including lucide-react, date-fns, lodash-es, ramda, antd, react-bootstrap, ahooks, @ant-design/icons, @headlessui/react, @headlessui-float/react, @heroicons/react/20/solid, @heroicons/react/24/solid, @heroicons/react/24/outline, @visx/visx, @tremor/react, rxjs, @mui/material, @mui/icons-material, recharts, react-use, @material-ui/core, @material-ui/icons, @tabler/icons-react, mui-core, react-icons/*, effect, and @effect/*."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-packages-are-optimized-by-default-with-optimizepackageimports-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-packages-are-optimized-by-default-with-optimizepackageimports-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-packages-are-optimized-by-default-with-optimizepackageimports-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many packages are optimized by default with optimizePackageImports in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>27 packages/patterns are optimized by default, including lucide-react, date-fns, lodash-es, ramda, antd, react-bootstrap, ahooks, @ant-design/icons, @headlessui/react, @headlessui-float/react, @heroicons/react/20/solid, @heroicons/react/24/solid, @heroicons/react/24/outline, @visx/visx, @tremor/react, rxjs, @mui/material, @mui/icons-material, recharts, react-use, @material-ui/core, @material-ui/icons, @tabler/icons-react, mui-core, react-icons/<em>, effect, and @effect/</em>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkmoyC" prefix="r2152" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6105220475892367979"],"question":[0,"What is the default loader path for Next.js image optimization?"],"answer":[0,"The default path is '/_next/image'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-loader-path-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-loader-path-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-loader-path-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default loader path for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default path is '/_next/image'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11xt2p" prefix="r2153" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7088761181929775884"],"question":[0,"What is the default value for basePath in Next.js?"],"answer":[0,"The default value is an empty string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/basePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-basepath-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-basepath-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-basepath-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for basePath in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is an empty string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/basePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lGOR0" prefix="r2154" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7425772369854350647"],"question":[0,"What are the default deviceSizes values in Next.js image optimization configuration?"],"answer":[0,"[640, 750, 828, 1080, 1200, 1920, 2048, 3840]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-devicesizes-values-in-next-js-image-optimization-configurat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-devicesizes-values-in-next-js-image-optimization-configurat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-devicesizes-values-in-next-js-image-optimization-configurat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default deviceSizes values in Next.js image optimization configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[640, 750, 828, 1080, 1200, 1920, 2048, 3840]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bpUcr" prefix="r2155" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8236022379721912191"],"question":[0,"Are build workers enabled by default in Next.js?"],"answer":[0,"Yes, build workers are enabled by default unless you have a custom webpack config."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/parallel-build-without-worker"]]],"topic":[0,"nextjs"],"slug":[0,"are-build-workers-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-build-workers-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-build-workers-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are build workers enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, build workers are enabled by default unless you have a custom webpack config.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/parallel-build-without-worker" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tarVm" prefix="r2156" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8897263636256954757"],"question":[0,"Does outputFileTracing include fully static pages when using standalone mode in Next.js?"],"answer":[0,"No, fully static pages are not affected by outputFileTracing. The standalone mode traces server-rendered routes only."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/output"]]],"topic":[0,"nextjs"],"slug":[0,"does-outputfiletracing-include-fully-static-pages-when-using-standalone-mode-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-outputfiletracing-include-fully-static-pages-when-using-standalone-mode-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-outputfiletracing-include-fully-static-pages-when-using-standalone-mode-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does outputFileTracing include fully static pages when using standalone mode in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, fully static pages are not affected by outputFileTracing. The standalone mode traces server-rendered routes only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/output" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25U2uf" prefix="r2157" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8939544132175348640"],"question":[0,"In Next.js 16, is the qualities field required for image optimization configuration?"],"answer":[0,"Yes, starting with Next.js 16, the qualities field is required because unrestricted access could allow malicious actors to optimize more qualities than intended."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/images"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-16-is-the-qualities-field-required-for-image-optimization-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-16-is-the-qualities-field-required-for-image-optimization-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-16-is-the-qualities-field-required-for-image-optimization-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 16, is the qualities field required for image optimization configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, starting with Next.js 16, the qualities field is required because unrestricted access could allow malicious actors to optimize more qualities than intended.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NqLoM" prefix="r2158" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9000209199260090894"],"question":[0,"Since which Next.js version has SWC been used for minification by default?"],"answer":[0,"Next.js has used SWC for minification by default since version 13."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/swc-minify-enabled"]]],"topic":[0,"nextjs"],"slug":[0,"since-which-next-js-version-has-swc-been-used-for-minification-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="since-which-next-js-version-has-swc-been-used-for-minification-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#since-which-next-js-version-has-swc-been-used-for-minification-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Since which Next.js version has SWC been used for minification by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js has used SWC for minification by default since version 13.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/swc-minify-enabled" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOiMzW" prefix="r2159" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9011195830952392177"],"question":[0,"What is the default value for poweredByHeader in Next.js?"],"answer":[0,"The default value is true, meaning Next.js will add the X-Powered-By header by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-poweredbyheader-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-poweredbyheader-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-poweredbyheader-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for poweredByHeader in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is true, meaning Next.js will add the X-Powered-By header by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cLr83" prefix="r2160" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9612647123036417618"],"question":[0,"How many HTML files does @next/bundle-analyzer output and what are they for?"],"answer":[0,"Three HTML files are outputted to <distDir>/analyze/: client.html (for the browser bundle), edge.html (for the edge server bundle), and nodejs.html (for the Node.js server bundle)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/pages/building-your-application/optimizing/bundle-analyzer"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-html-files-does-next-bundle-analyzer-output-and-what-are-they-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-html-files-does-next-bundle-analyzer-output-and-what-are-they-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-html-files-does-next-bundle-analyzer-output-and-what-are-they-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many HTML files does @next/bundle-analyzer output and what are they for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Three HTML files are outputted to <distDir>/analyze/: client.html (for the browser bundle), edge.html (for the edge server bundle), and nodejs.html (for the Node.js server bundle).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/pages/building-your-application/optimizing/bundle-analyzer" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xrIU9" prefix="r2161" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10559229762035454397"],"question":[0,"Since which Next.js version has the SWC compiler been enabled by default?"],"answer":[0,"The SWC compiler has been enabled by default since Next.js version 12."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"since-which-next-js-version-has-the-swc-compiler-been-enabled-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="since-which-next-js-version-has-the-swc-compiler-been-enabled-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#since-which-next-js-version-has-the-swc-compiler-been-enabled-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Since which Next.js version has the SWC compiler been enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The SWC compiler has been enabled by default since Next.js version 12.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wuxAO" prefix="r2162" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10649668614453019623"],"question":[0,"What are the default imageSizes values in Next.js image optimization configuration?"],"answer":[0,"[32, 48, 64, 96, 128, 256, 384]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-imagesizes-values-in-next-js-image-optimization-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-imagesizes-values-in-next-js-image-optimization-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-imagesizes-values-in-next-js-image-optimization-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default imageSizes values in Next.js image optimization configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[32, 48, 64, 96, 128, 256, 384]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18oOGk" prefix="r2163" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10886558293094515235"],"question":[0,"What is the default value for dangerouslyAllowSVG in Next.js image configuration?"],"answer":[0,"The default value is false."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/invalid-images-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-dangerouslyallowsvg-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-dangerouslyallowsvg-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-dangerouslyallowsvg-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for dangerouslyAllowSVG in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/invalid-images-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2myKgx" prefix="r2164" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14173713194516073900"],"question":[0,"What environment variable is conventionally used to enable @next/bundle-analyzer?"],"answer":[0,"The ANALYZE environment variable is conventionally used, typically configured as enabled: process.env.ANALYZE === 'true'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/pages/building-your-application/optimizing/bundle-analyzer"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-is-conventionally-used-to-enable-next-bundle-analyzer"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-is-conventionally-used-to-enable-next-bundle-analyzer" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-is-conventionally-used-to-enable-next-bundle-analyzer" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable is conventionally used to enable @next/bundle-analyzer?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The ANALYZE environment variable is conventionally used, typically configured as enabled: process.env.ANALYZE === 'true'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/pages/building-your-application/optimizing/bundle-analyzer" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2w35Mf" prefix="r2165" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14293299525012074754"],"question":[0,"Is the reactRemoveProperties compiler option enabled by default in Next.js?"],"answer":[0,"No, reactRemoveProperties is not enabled by default. It requires explicit configuration in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-reactremoveproperties-compiler-option-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-reactremoveproperties-compiler-option-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-reactremoveproperties-compiler-option-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the reactRemoveProperties compiler option enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, reactRemoveProperties is not enabled by default. It requires explicit configuration in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RXKj3" prefix="r2166" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14317961628895894900"],"question":[0,"Does the Next.js default image optimization loader forward request headers when fetching the src image?"],"answer":[0,"No, for security reasons, the Image Optimization API using the default loader will not forward headers when fetching the src image."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-next-js-default-image-optimization-loader-forward-request-headers-when-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-next-js-default-image-optimization-loader-forward-request-headers-when-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-next-js-default-image-optimization-loader-forward-request-headers-when-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Next.js default image optimization loader forward request headers when fetching the src image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, for security reasons, the Image Optimization API using the default loader will not forward headers when fetching the src image.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1AtEno" prefix="r2167" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14517071106447106271"],"question":[0,"What is the default runtime for Next.js route segments?"],"answer":[0,"The default runtime is 'nodejs'. If the segment runtime is not set, the default nodejs runtime will be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-next-js-route-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-next-js-route-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-next-js-route-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for Next.js route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default runtime is 'nodejs'. If the segment runtime is not set, the default nodejs runtime will be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZliRBw" prefix="r2168" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14632650886966384232"],"question":[0,"Is the experimental.appDir configuration still needed in Next.js 13.4+?"],"answer":[0,"No, the appDir experimental option is no longer needed as of Next.js 13.4, as the App Router is now stable. You can simply create an app/ directory without any configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/experimental-app-dir-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-experimental-appdir-configuration-still-needed-in-next-js-13-4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-experimental-appdir-configuration-still-needed-in-next-js-13-4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-experimental-appdir-configuration-still-needed-in-next-js-13-4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the experimental.appDir configuration still needed in Next.js 13.4+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the appDir experimental option is no longer needed as of Next.js 13.4, as the App Router is now stable. You can simply create an app/ directory without any configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/experimental-app-dir-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27NXCY" prefix="r2169" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14868634309756775997"],"question":[0,"What is the default formats array for Next.js image optimization?"],"answer":[0,"The default format is ['image/webp']."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-formats-array-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-formats-array-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-formats-array-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default formats array for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default format is ['image/webp'].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vKFjA" prefix="r2170" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15031628231555376420"],"question":[0,"How much smaller does AVIF compress compared to WebP in Next.js image optimization?"],"answer":[0,"AVIF compresses 20% smaller compared to WebP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-smaller-does-avif-compress-compared-to-webp-in-next-js-image-optimizati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-smaller-does-avif-compress-compared-to-webp-in-next-js-image-optimizati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-smaller-does-avif-compress-compared-to-webp-in-next-js-image-optimizati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much smaller does AVIF compress compared to WebP in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AVIF compresses 20% smaller compared to WebP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cdzjv" prefix="r2171" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15047541130557915089"],"question":[0,"What is the default pagesBufferLength value for onDemandEntries in Next.js?"],"answer":[0,"The default pagesBufferLength is 2."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-pagesbufferlength-value-for-ondemandentries-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-pagesbufferlength-value-for-ondemandentries-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-pagesbufferlength-value-for-ondemandentries-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default pagesBufferLength value for onDemandEntries in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default pagesBufferLength is 2.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="caching-and-revalidating-cache-interactions" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Caching and Revalidating > Cache Interactions</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 39 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2vkjSE" prefix="r2172" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"724666231087553095"],"question":[0,"What happens when you set dynamic='error' at the route segment level?"],"answer":[0,"dynamic='error' forces static rendering and is equivalent to getStaticProps. It sets all fetches to cache: 'force-cache', enabling Data Cache and Full Route Cache while preventing dynamic APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-set-dynamic-error-at-the-route-segment-level"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-set-dynamic-error-at-the-route-segment-level" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-set-dynamic-error-at-the-route-segment-level" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you set dynamic='error' at the route segment level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>dynamic='error' forces static rendering and is equivalent to getStaticProps. It sets all fetches to cache: 'force-cache', enabling Data Cache and Full Route Cache while preventing dynamic APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25M5p0" prefix="r2173" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1030847291865846385"],"question":[0,"What is the semantic equivalent of next.revalidate: false in a fetch request?"],"answer":[0,"next.revalidate: false caches indefinitely and is semantically equivalent to revalidate: Infinity."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-semantic-equivalent-of-next-revalidate-false-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-semantic-equivalent-of-next-revalidate-false-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-semantic-equivalent-of-next-revalidate-false-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the semantic equivalent of next.revalidate: false in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next.revalidate: false caches indefinitely and is semantically equivalent to revalidate: Infinity.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OtoV2" prefix="r2174" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1080855066441509039"],"question":[0,"What happens when you combine 'only-cache' with 'only-no-store' fetchCache options in a single route?"],"answer":[0,"Combining 'only-cache' with 'only-no-store' or 'force-cache' with 'force-no-store' is forbidden within a single route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-combine-only-cache-with-only-no-store-fetchcache-options-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-combine-only-cache-with-only-no-store-fetchcache-options-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-combine-only-cache-with-only-no-store-fetchcache-options-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you combine 'only-cache' with 'only-no-store' fetchCache options in a single route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Combining 'only-cache' with 'only-no-store' or 'force-cache' with 'force-no-store' is forbidden within a single route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tMFrJ" prefix="r2175" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1568343761740394765"],"question":[0,"What happens to the Full Route Cache if any fetch request in a route uses cache: 'no-store'?"],"answer":[0,"If a route has a fetch request that is not cached (using cache: 'no-store'), this will opt the route out of the Full Route Cache. Other fetch requests that explicitly enable caching will still be cached in the Data Cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-full-route-cache-if-any-fetch-request-in-a-route-uses-cache-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-full-route-cache-if-any-fetch-request-in-a-route-uses-cache-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-full-route-cache-if-any-fetch-request-in-a-route-uses-cache-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the Full Route Cache if any fetch request in a route uses cache: 'no-store'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a route has a fetch request that is not cached (using cache: 'no-store'), this will opt the route out of the Full Route Cache. Other fetch requests that explicitly enable caching will still be cached in the Data Cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="x06PB" prefix="r2176" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2337398699401697445"],"question":[0,"What happens when you use conflicting options like { revalidate: 3600, cache: 'no-store' } in a fetch request?"],"answer":[0,"Conflicting options like { revalidate: 3600, cache: 'no-store' } are disallowed and ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-use-conflicting-options-like-revalidate-3600-cache-no-stor"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-use-conflicting-options-like-revalidate-3600-cache-no-stor" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-use-conflicting-options-like-revalidate-3600-cache-no-stor" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you use conflicting options like { revalidate: 3600, cache: 'no-store' } in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Conflicting options like { revalidate: 3600, cache: 'no-store' } are disallowed and ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZYanwt" prefix="r2177" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3369006106866369400"],"question":[0,"What happens to the Full Route Cache when you revalidate or opt out of the Data Cache?"],"answer":[0,"Revalidating or opting out of the Data Cache will invalidate the Full Route Cache, as the render output depends on data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-full-route-cache-when-you-revalidate-or-opt-out-of-the-data-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-full-route-cache-when-you-revalidate-or-opt-out-of-the-data-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-full-route-cache-when-you-revalidate-or-opt-out-of-the-data-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the Full Route Cache when you revalidate or opt out of the Data Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Revalidating or opting out of the Data Cache will invalidate the Full Route Cache, as the render output depends on data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z219NDk" prefix="r2178" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3427847006183580590"],"question":[0,"What is the recommended value for the profile parameter in revalidateTag?"],"answer":[0,"The recommended value is 'max', which provides stale-while-revalidate semantics (serving stale content while fetching fresh content in the background)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-value-for-the-profile-parameter-in-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-value-for-the-profile-parameter-in-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-value-for-the-profile-parameter-in-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended value for the profile parameter in revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended value is 'max', which provides stale-while-revalidate semantics (serving stale content while fetching fresh content in the background).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PmTva" prefix="r2179" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3462153460970373858"],"question":[0,"What does dynamic='force-static' do to cookies(), headers(), and useSearchParams()?"],"answer":[0,"dynamic='force-static' forces static rendering while making cookies(), headers(), and useSearchParams() return empty values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-force-static-do-to-cookies-headers-and-usesearchparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-force-static-do-to-cookies-headers-and-usesearchparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-force-static-do-to-cookies-headers-and-usesearchparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic='force-static' do to cookies(), headers(), and useSearchParams()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>dynamic='force-static' forces static rendering while making cookies(), headers(), and useSearchParams() return empty values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sg7DW" prefix="r2180" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3599925086414791799"],"question":[0,"What is the maximum character length for the tag parameter in revalidateTag?"],"answer":[0,"The tag parameter in revalidateTag has a maximum of 256 characters and is case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-tag-parameter-in-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-tag-parameter-in-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-tag-parameter-in-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the tag parameter in revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The tag parameter in revalidateTag has a maximum of 256 characters and is case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iBgB0" prefix="r2181" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3724929318905195255"],"question":[0,"What happens when you call revalidateTag without the profile parameter?"],"answer":[0,"Without the profile parameter (deprecated), the tag entry is expired immediately, and the next request to that resource will be a blocking revalidate/cache miss."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-call-revalidatetag-without-the-profile-parameter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-call-revalidatetag-without-the-profile-parameter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-call-revalidatetag-without-the-profile-parameter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you call revalidateTag without the profile parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Without the profile parameter (deprecated), the tag entry is expired immediately, and the next request to that resource will be a blocking revalidate/cache miss.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cwqOW" prefix="r2182" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4288345373004949684"],"question":[0,"What is the fetch behavior when revalidate is set to 0 at the route segment level?"],"answer":[0,"revalidate=0 means the route is always dynamically rendered even without Dynamic APIs, and changes the default fetch behavior to 'no-store' unless explicitly set otherwise."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-fetch-behavior-when-revalidate-is-set-to-0-at-the-route-segment-leve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-fetch-behavior-when-revalidate-is-set-to-0-at-the-route-segment-leve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-fetch-behavior-when-revalidate-is-set-to-0-at-the-route-segment-leve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the fetch behavior when revalidate is set to 0 at the route segment level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidate=0 means the route is always dynamically rendered even without Dynamic APIs, and changes the default fetch behavior to 'no-store' unless explicitly set otherwise.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gSBOm" prefix="r2183" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4484556194353086346"],"question":[0,"What does cache: 'force-cache' do in a fetch request?"],"answer":[0,"Next.js looks for a matching request in its Data Cache. If there is a match and it is fresh, it will be returned from the cache. If there is no match or a stale match, Next.js will fetch the resource from the remote server and update the cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-cache-force-cache-do-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-cache-force-cache-do-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-cache-force-cache-do-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does cache: 'force-cache' do in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js looks for a matching request in its Data Cache. If there is a match and it is fresh, it will be returned from the cache. If there is no match or a stale match, Next.js will fetch the resource from the remote server and update the cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sxkIB" prefix="r2184" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5350479452075869084"],"question":[0,"When is the type parameter required in revalidatePath?"],"answer":[0,"The type parameter is required when the path contains dynamic segments (e.g., '/product/[slug]'). If path is a specific URL (e.g., '/product/1'), the type parameter should be omitted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-type-parameter-required-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-type-parameter-required-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-type-parameter-required-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the type parameter required in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The type parameter is required when the path contains dynamic segments (e.g., '/product/[slug]'). If path is a specific URL (e.g., '/product/1'), the type parameter should be omitted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JcVrf" prefix="r2185" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5913215477248442288"],"question":[0,"What is the maximum character length for the path parameter in revalidatePath?"],"answer":[0,"The path parameter in revalidatePath has a maximum of 1024 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The path parameter in revalidatePath has a maximum of 1024 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29RuV9" prefix="r2186" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6006329903139346219"],"question":[0,"What is the difference between router.refresh() and revalidatePath() in terms of cache invalidation?"],"answer":[0,"router.refresh() clears only the Router Cache and re-renders the current route on the server without affecting the Data Cache or Full Route Cache. revalidatePath() purges both the Data Cache and Full Route Cache, triggering fresh data fetching and server-side re-rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-router-refresh-and-revalidatepath-in-terms-of-cac"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-router-refresh-and-revalidatepath-in-terms-of-cac" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-router-refresh-and-revalidatepath-in-terms-of-cac" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between router.refresh() and revalidatePath() in terms of cache invalidation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.refresh() clears only the Router Cache and re-renders the current route on the server without affecting the Data Cache or Full Route Cache. revalidatePath() purges both the Data Cache and Full Route Cache, triggering fresh data fetching and server-side re-rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kbM1H" prefix="r2187" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6096679751833507151"],"question":[0,"What is the default value for the fetchCache route segment config option?"],"answer":[0,"The default value is 'auto', which caches fetches before Dynamic APIs and skips caching after."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-fetchcache-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-fetchcache-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-fetchcache-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the fetchCache route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto', which caches fetches before Dynamic APIs and skips caching after.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZYyMLh" prefix="r2188" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6343629599234865155"],"question":[0,"What happens when two fetch requests with the same URL in the same route have different revalidate values?"],"answer":[0,"If two fetch requests with the same URL in the same route have different revalidate values, the lower value will be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-two-fetch-requests-with-the-same-url-in-the-same-route-have-di"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-two-fetch-requests-with-the-same-url-in-the-same-route-have-di" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-two-fetch-requests-with-the-same-url-in-the-same-route-have-di" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when two fetch requests with the same URL in the same route have different revalidate values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If two fetch requests with the same URL in the same route have different revalidate values, the lower value will be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1B6BEF" prefix="r2189" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6973008387155103825"],"question":[0,"What is the default value for the dynamic route segment config option?"],"answer":[0,"The default value is 'auto', which caches as much as possible without preventing any components from opting into dynamic behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the dynamic route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto', which caches as much as possible without preventing any components from opting into dynamic behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1SbFgY" prefix="r2190" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8105788272007793300"],"question":[0,"What is the default value for the staleTimes.static configuration option?"],"answer":[0,"The default is 5 minutes (300 seconds) for statically generated pages or when prefetch={true} is set."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-staletimes-static-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-staletimes-static-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-staletimes-static-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the staleTimes.static configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is 5 minutes (300 seconds) for statically generated pages or when prefetch={true} is set.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11CHmy" prefix="r2191" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8207972888040408640"],"question":[0,"What does revalidateTag return?"],"answer":[0,"revalidateTag does not return a value (returns void)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatetag-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatetag-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatetag-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidateTag return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidateTag does not return a value (returns void).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kQvr7" prefix="r2192" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8783384099019527783"],"question":[0,"What is the behavior difference of revalidatePath when called in Server Functions vs Route Handlers?"],"answer":[0,"In Server Functions, revalidatePath updates the UI immediately (if viewing the affected path). In Route Handlers, it marks the path for revalidation that happens on the next visit to the specified path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-behavior-difference-of-revalidatepath-when-called-in-server-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-behavior-difference-of-revalidatepath-when-called-in-server-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-behavior-difference-of-revalidatepath-when-called-in-server-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the behavior difference of revalidatePath when called in Server Functions vs Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Server Functions, revalidatePath updates the UI immediately (if viewing the affected path). In Route Handlers, it marks the path for revalidation that happens on the next visit to the specified path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ji0c4" prefix="r2193" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8829101941790949670"],"question":[0,"What is the default cache behavior for fetch requests in Next.js?"],"answer":[0,"fetch responses are not cached by default, but Next.js will pre-render routes containing fetch requests and cache the HTML output."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/caching-and-revalidating"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-behavior-for-fetch-requests-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-behavior-for-fetch-requests-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-behavior-for-fetch-requests-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default cache behavior for fetch requests in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fetch responses are not cached by default, but Next.js will pre-render routes containing fetch requests and cache the HTML output.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/caching-and-revalidating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jex63" prefix="r2194" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8964965265625932505"],"question":[0,"What caches are affected when you call revalidatePath or revalidateTag in a Route Handler?"],"answer":[0,"Revalidating the Data Cache in a Route Handler will not immediately invalidate the Router Cache since the handler isn't tied to a specific route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-caches-are-affected-when-you-call-revalidatepath-or-revalidatetag-in-a-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-caches-are-affected-when-you-call-revalidatepath-or-revalidatetag-in-a-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-caches-are-affected-when-you-call-revalidatepath-or-revalidatetag-in-a-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What caches are affected when you call revalidatePath or revalidateTag in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Revalidating the Data Cache in a Route Handler will not immediately invalidate the Router Cache since the handler isn't tied to a specific route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnUkCo" prefix="r2195" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9445220258539576314"],"question":[0,"What is the default value for the staleTimes.dynamic configuration option in Next.js 15.0.0+?"],"answer":[0,"The default is 0 seconds (no caching) in v15.0.0+. The previous default in v14.2.0 was 30 seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-staletimes-dynamic-configuration-option-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-staletimes-dynamic-configuration-option-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-staletimes-dynamic-configuration-option-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the staleTimes.dynamic configuration option in Next.js 15.0.0+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is 0 seconds (no caching) in v15.0.0+. The previous default in v14.2.0 was 30 seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LfnRa" prefix="r2196" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9459213797683424317"],"question":[0,"What happens to the Data Cache when you invalidate or opt out of the Full Route Cache?"],"answer":[0,"Invalidating or opting out of the Full Route Cache does not affect the Data Cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-data-cache-when-you-invalidate-or-opt-out-of-the-full-route-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-data-cache-when-you-invalidate-or-opt-out-of-the-full-route-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-data-cache-when-you-invalidate-or-opt-out-of-the-full-route-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the Data Cache when you invalidate or opt out of the Full Route Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Invalidating or opting out of the Full Route Cache does not affect the Data Cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YxInv" prefix="r2197" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9658771783619686264"],"question":[0,"Can router.refresh() return fresh data if fetch requests are cached?"],"answer":[0,"No, router.refresh() could reproduce the same result if fetch requests are cached, as it respects existing cache headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"can-router-refresh-return-fresh-data-if-fetch-requests-are-cached"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-router-refresh-return-fresh-data-if-fetch-requests-are-cached" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-router-refresh-return-fresh-data-if-fetch-requests-are-cached" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can router.refresh() return fresh data if fetch requests are cached?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, router.refresh() could reproduce the same result if fetch requests are cached, as it respects existing cache headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24j5Sz" prefix="r2198" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9880747484379419419"],"question":[0,"What does cache: 'no-store' do in a fetch request?"],"answer":[0,"Next.js fetches the resource from the remote server on every request, even if Dynamic APIs are not detected on the route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-cache-no-store-do-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-cache-no-store-do-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-cache-no-store-do-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does cache: 'no-store' do in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js fetches the resource from the remote server on every request, even if Dynamic APIs are not detected on the route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBWcHO" prefix="r2199" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9919897006034282555"],"question":[0,"What caches does revalidate=0 skip?"],"answer":[0,"revalidate=0 skips both the Full Route Cache and Data Cache, causing components to render and data to fetch on every incoming server request. The Router Cache (client-side) still applies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-caches-does-revalidate-0-skip"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-caches-does-revalidate-0-skip" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-caches-does-revalidate-0-skip" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What caches does revalidate=0 skip?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidate=0 skips both the Full Route Cache and Data Cache, causing components to render and data to fetch on every incoming server request. The Router Cache (client-side) still applies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21ce2N" prefix="r2200" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10016077080500887070"],"question":[0,"What client-side and browser state does router.refresh() preserve?"],"answer":[0,"router.refresh() preserves unaffected client-side React state (e.g., useState) and browser state (e.g., scroll position)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-client-side-and-browser-state-does-router-refresh-preserve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-client-side-and-browser-state-does-router-refresh-preserve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-client-side-and-browser-state-does-router-refresh-preserve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What client-side and browser state does router.refresh() preserve?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.refresh() preserves unaffected client-side React state (e.g., useState) and browser state (e.g., scroll position).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1w3vbR" prefix="r2201" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11486212889167902814"],"question":[0,"How do you configure immediate cache expiration in revalidateTag for webhook scenarios?"],"answer":[0,"Use { expire: 0 } as the profile parameter to enable immediate expiration for webhook scenarios requiring instant data refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-immediate-cache-expiration-in-revalidatetag-for-webhook-sce"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-immediate-cache-expiration-in-revalidatetag-for-webhook-sce" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-immediate-cache-expiration-in-revalidatetag-for-webhook-sce" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure immediate cache expiration in revalidateTag for webhook scenarios?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use { expire: 0 } as the profile parameter to enable immediate expiration for webhook scenarios requiring instant data refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1crFND" prefix="r2202" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11977333026156346119"],"question":[0,"What is the default value for the revalidate route segment config option?"],"answer":[0,"The default value is false, which caches indefinitely via heuristic caching. Individual fetches can override with cache: 'no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the revalidate route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false, which caches indefinitely via heuristic caching. Individual fetches can override with cache: 'no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HR90S" prefix="r2203" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12091242565358627766"],"question":[0,"What caches does dynamic='force-dynamic' skip?"],"answer":[0,"Using dynamic='force-dynamic' or revalidate=0 route segment config options will skip the Full Route Cache and the Data Cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-caches-does-dynamic-force-dynamic-skip"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-caches-does-dynamic-force-dynamic-skip" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-caches-does-dynamic-force-dynamic-skip" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What caches does dynamic='force-dynamic' skip?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using dynamic='force-dynamic' or revalidate=0 route segment config options will skip the Full Route Cache and the Data Cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JAKAn" prefix="r2204" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12118420063111631718"],"question":[0,"What determines the revalidation frequency of an entire route when using layouts and pages?"],"answer":[0,"The lowest revalidate across each layout and page of a single route will determine the revalidation frequency of the entire route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-determines-the-revalidation-frequency-of-an-entire-route-when-using-layouts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-determines-the-revalidation-frequency-of-an-entire-route-when-using-layouts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-determines-the-revalidation-frequency-of-an-entire-route-when-using-layouts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What determines the revalidation frequency of an entire route when using layouts and pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate across each layout and page of a single route will determine the revalidation frequency of the entire route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ab5BT" prefix="r2205" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12254448137612904174"],"question":[0,"Does Request Memoization apply to fetch requests in Route Handlers?"],"answer":[0,"No, Request Memoization doesn't apply to fetch requests in Route Handlers as they are not a part of the React component tree. It only applies to fetch requests in generateMetadata, generateStaticParams, Layouts, Pages, and other Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-request-memoization-apply-to-fetch-requests-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-request-memoization-apply-to-fetch-requests-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-request-memoization-apply-to-fetch-requests-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Request Memoization apply to fetch requests in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Request Memoization doesn't apply to fetch requests in Route Handlers as they are not a part of the React component tree. It only applies to fetch requests in generateMetadata, generateStaticParams, Layouts, Pages, and other Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2c5M76" prefix="r2206" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12431360464414319072"],"question":[0,"What is the equivalent fetch behavior when using dynamic='force-dynamic'?"],"answer":[0,"dynamic='force-dynamic' is equivalent to setting every fetch() request in a layout or page to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-equivalent-fetch-behavior-when-using-dynamic-force-dynamic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-equivalent-fetch-behavior-when-using-dynamic-force-dynamic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-equivalent-fetch-behavior-when-using-dynamic-force-dynamic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the equivalent fetch behavior when using dynamic='force-dynamic'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>dynamic='force-dynamic' is equivalent to setting every fetch() request in a layout or page to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GOY0L" prefix="r2207" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13260929531466508683"],"question":[0,"What is the Router Cache automatic invalidation period for both static and dynamic pages with full prefetching?"],"answer":[0,"5 minutes for both static and dynamic pages when using full prefetching (prefetch={true} or router.prefetch)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-router-cache-automatic-invalidation-period-for-both-static-and-dynam"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-router-cache-automatic-invalidation-period-for-both-static-and-dynam" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-router-cache-automatic-invalidation-period-for-both-static-and-dynam" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Router Cache automatic invalidation period for both static and dynamic pages with full prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes for both static and dynamic pages when using full prefetching (prefetch={true} or router.prefetch).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="z5iWt" prefix="r2208" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13338347596440057769"],"question":[0,"What is the lifetime of Request Memoization?"],"answer":[0,"Request memoization persists only the lifetime of a server request until the React component tree has finished rendering and is not shared across different requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-lifetime-of-request-memoization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-lifetime-of-request-memoization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-lifetime-of-request-memoization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the lifetime of Request Memoization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization persists only the lifetime of a server request until the React component tree has finished rendering and is not shared across different requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jHd91" prefix="r2209" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13728599074131705767"],"question":[0,"What happens when you call revalidatePath with type='layout'?"],"answer":[0,"When type='layout', revalidatePath invalidates the layout file at that segment, all nested layouts beneath it, and all pages beneath them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-call-revalidatepath-with-type-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-call-revalidatepath-with-type-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-call-revalidatepath-with-type-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you call revalidatePath with type='layout'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When type='layout', revalidatePath invalidates the layout file at that segment, all nested layouts beneath it, and all pages beneath them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8dMwU" prefix="r2210" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14808356591703517396"],"question":[0,"Does revalidatePath invalidate nested routes when using dynamic segments?"],"answer":[0,"No, revalidatePath('/blog/[slug]') won't invalidate nested routes like '/blog/[slug]/[author]'. The scope is limited to the specific path pattern provided."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"does-revalidatepath-invalidate-nested-routes-when-using-dynamic-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-revalidatepath-invalidate-nested-routes-when-using-dynamic-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-revalidatepath-invalidate-nested-routes-when-using-dynamic-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does revalidatePath invalidate nested routes when using dynamic segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, revalidatePath('/blog/[slug]') won't invalidate nested routes like '/blog/[slug]/[author]'. The scope is limited to the specific path pattern provided.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-performance-optimization" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Performance Optimization</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 38 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1HAKgB" prefix="r2211" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3001827060783429"],"question":[0,"Does Next.js Image component use native browser lazy loading?"],"answer":[0,"Yes, the next/image component uses browser native lazy loading, which may fallback to eager loading for older browsers before Safari 15.4."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-image-component-use-native-browser-lazy-loading"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-image-component-use-native-browser-lazy-loading" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-image-component-use-native-browser-lazy-loading" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js Image component use native browser lazy loading?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the next/image component uses browser native lazy loading, which may fallback to eager loading for older browsers before Safari 15.4.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dh2K0" prefix="r2212" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"812512434593710408"],"question":[0,"What does the width/height property represent in Next.js Image component?"],"answer":[0,"The width and height properties represent the intrinsic image size in pixels. They do not determine the rendered size of the image, which is controlled by CSS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-width-height-property-represent-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-width-height-property-represent-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-width-height-property-represent-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the width/height property represent in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The width and height properties represent the intrinsic image size in pixels. They do not determine the rendered size of the image, which is controlled by CSS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1giINd" prefix="r2213" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"999745281305226095"],"question":[0,"By how much can preloading images improve Largest Contentful Paint?"],"answer":[0,"Preloading images in the initial viewport has shown improvements to the Largest Contentful Paint by up to 50%."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/seo/web-performance/lcp"]]],"topic":[0,"nextjs"],"slug":[0,"by-how-much-can-preloading-images-improve-largest-contentful-paint"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="by-how-much-can-preloading-images-improve-largest-contentful-paint" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#by-how-much-can-preloading-images-improve-largest-contentful-paint" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">By how much can preloading images improve Largest Contentful Paint?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Preloading images in the initial viewport has shown improvements to the Largest Contentful Paint by up to 50%.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/seo/web-performance/lcp" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dqRUp" prefix="r2214" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1858684733720468614"],"question":[0,"How much smaller is AVIF compression compared to WebP in Next.js?"],"answer":[0,"AVIF compresses 20% smaller compared to WebP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-smaller-is-avif-compression-compared-to-webp-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-smaller-is-avif-compression-compared-to-webp-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-smaller-is-avif-compression-compared-to-webp-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much smaller is AVIF compression compared to WebP in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AVIF compresses 20% smaller compared to WebP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z63R0I" prefix="r2215" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2109467508700530659"],"question":[0,"What are the default deviceSizes values in Next.js image configuration?"],"answer":[0,"[640, 750, 828, 1080, 1200, 1920, 2048, 3840] pixels"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-devicesizes-values-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-devicesizes-values-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-devicesizes-values-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default deviceSizes values in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[640, 750, 828, 1080, 1200, 1920, 2048, 3840] pixels</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CIgR9" prefix="r2216" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2142882649376817509"],"question":[0,"Can Next.js invalidate the image optimization cache?"],"answer":[0,"No, there is no mechanism to invalidate the cache at this time, so it's best to keep minimumCacheTTL low. You may need to manually change the src prop or delete files in <distDir>/cache/images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-invalidate-the-image-optimization-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-invalidate-the-image-optimization-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-invalidate-the-image-optimization-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js invalidate the image optimization cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, there is no mechanism to invalidate the cache at this time, so it's best to keep minimumCacheTTL low. You may need to manually change the src prop or delete files in <distDir>/cache/images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cVLTe" prefix="r2217" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2779977195534758327"],"question":[0,"What is the alternative WASM package if sharp installation fails?"],"answer":[0,"You can install the wasm variant by running npm install --cpu=wasm32 sharp."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/install-sharp"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-alternative-wasm-package-if-sharp-installation-fails"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-alternative-wasm-package-if-sharp-installation-fails" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-alternative-wasm-package-if-sharp-installation-fails" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the alternative WASM package if sharp installation fails?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can install the wasm variant by running npm install --cpu=wasm32 sharp.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/install-sharp" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20KoXv" prefix="r2218" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3095297964254625952"],"question":[0,"What does the overrideSrc prop allow you to do?"],"answer":[0,"It allows you to override the automatically generated src attribute of the resulting <img> element, useful for maintaining the same src attribute for SEO purposes when upgrading from <img> to <Image>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-overridesrc-prop-allow-you-to-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-overridesrc-prop-allow-you-to-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-overridesrc-prop-allow-you-to-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the overrideSrc prop allow you to do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It allows you to override the automatically generated src attribute of the resulting <img> element, useful for maintaining the same src attribute for SEO purposes when upgrading from <img> to <Image>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fi2q" prefix="r2219" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3359569907462887541"],"question":[0,"What argument is passed to the onLoadingComplete callback?"],"answer":[0,"A reference to the underlying <img> element with properties like naturalWidth accessible (e.g., onLoadingComplete={(img) => console.log(img.naturalWidth)})."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-argument-is-passed-to-the-onloadingcomplete-callback"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-argument-is-passed-to-the-onloadingcomplete-callback" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-argument-is-passed-to-the-onloadingcomplete-callback" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What argument is passed to the onLoadingComplete callback?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A reference to the underlying <img> element with properties like naturalWidth accessible (e.g., onLoadingComplete={(img) => console.log(img.naturalWidth)}).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wORT3" prefix="r2220" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3546956613267897408"],"question":[0,"Which Cache-Control header value does Next.js prefer when both are present?"],"answer":[0,"If both s-maxage and max-age are found, then s-maxage is preferred."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"which-cache-control-header-value-does-next-js-prefer-when-both-are-present"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-cache-control-header-value-does-next-js-prefer-when-both-are-present" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-cache-control-header-value-does-next-js-prefer-when-both-are-present" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Cache-Control header value does Next.js prefer when both are present?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If both s-maxage and max-age are found, then s-maxage is preferred.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fbS6a" prefix="r2221" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3915418997922917720"],"question":[0,"What is the default placeholder value for Next.js Image component?"],"answer":[0,"\"empty\" is the default placeholder (no placeholder shown)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-placeholder-value-for-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-placeholder-value-for-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-placeholder-value-for-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default placeholder value for Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"empty" is the default placeholder (no placeholder shown).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WREpf" prefix="r2222" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4340037968608424367"],"question":[0,"What is the deprecated callback for tracking image load completion in Next.js 14?"],"answer":[0,"onLoadingComplete is deprecated in Next.js 14; developers should use onLoad instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-deprecated-callback-for-tracking-image-load-completion-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-deprecated-callback-for-tracking-image-load-completion-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-deprecated-callback-for-tracking-image-load-completion-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the deprecated callback for tracking image load completion in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onLoadingComplete is deprecated in Next.js 14; developers should use onLoad instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JFLaN" prefix="r2223" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4804438513475497044"],"question":[0,"What is the default qualities configuration in Next.js 16?"],"answer":[0,"[75] is the only allowed quality by default in Next.js 16. The qualities field is required because unrestricted access could allow malicious actors to optimize more qualities than intended."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-qualities"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-qualities-configuration-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-qualities-configuration-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-qualities-configuration-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default qualities configuration in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[75] is the only allowed quality by default in Next.js 16. The qualities field is required because unrestricted access could allow malicious actors to optimize more qualities than intended.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-qualities" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1oBkl1" prefix="r2224" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5245198132063890869"],"question":[0,"How much longer does AVIF encoding take compared to WebP in Next.js?"],"answer":[0,"AVIF generally takes 50% longer to encode than WebP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-longer-does-avif-encoding-take-compared-to-webp-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-longer-does-avif-encoding-take-compared-to-webp-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-longer-does-avif-encoding-take-compared-to-webp-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much longer does AVIF encoding take compared to WebP in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AVIF generally takes 50% longer to encode than WebP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cg67w" prefix="r2225" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5674048905674526064"],"question":[0,"What styling method is NOT recommended for Next.js Image component?"],"answer":[0,"styled-jsx should not be used. Instead, use className (with CSS Module or global stylesheet) or the style prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-styling-method-is-not-recommended-for-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-styling-method-is-not-recommended-for-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-styling-method-is-not-recommended-for-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What styling method is NOT recommended for Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>styled-jsx should not be used. Instead, use className (with CSS Module or global stylesheet) or the style prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OYJyn" prefix="r2226" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5724237123892723005"],"question":[0,"What configuration is required for static exports with Next.js Image optimization?"],"answer":[0,"Set output: 'export' in next.config.js and either set images: { unoptimized: true } or define a custom image loader."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-required-for-static-exports-with-next-js-image-optimizatio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-required-for-static-exports-with-next-js-image-optimizatio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-required-for-static-exports-with-next-js-image-optimizatio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is required for static exports with Next.js Image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set output: 'export' in next.config.js and either set images: { unoptimized: true } or define a custom image loader.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zb3Gcf" prefix="r2227" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5956426340571736892"],"question":[0,"What security risk exists when omitting protocol, port, pathname, or search in remotePatterns?"],"answer":[0,"Omitting these values implies the wildcard **, which is not recommended because it may allow malicious actors to optimize urls you did not intend."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-risk-exists-when-omitting-protocol-port-pathname-or-search-in-remo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-risk-exists-when-omitting-protocol-port-pathname-or-search-in-remo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-risk-exists-when-omitting-protocol-port-pathname-or-search-in-remo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security risk exists when omitting protocol, port, pathname, or search in remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Omitting these values implies the wildcard **, which is not recommended because it may allow malicious actors to optimize urls you did not intend.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="u3vl" prefix="r2228" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6337188106449617415"],"question":[0,"When was the overrideSrc prop added to Next.js Image component?"],"answer":[0,"Next.js 14.2 introduced the overrideSrc prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-14-2"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-overridesrc-prop-added-to-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-overridesrc-prop-added-to-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-overridesrc-prop-added-to-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the overrideSrc prop added to Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 14.2 introduced the overrideSrc prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-14-2" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DTrFo" prefix="r2229" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6654275634415208101"],"question":[0,"What is the default contentDispositionType for Next.js images?"],"answer":[0,"\"attachment\" is the default, which forces the browser to download the image when visiting directly for added security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-contentdispositiontype-for-next-js-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-contentdispositiontype-for-next-js-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-contentdispositiontype-for-next-js-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default contentDispositionType for Next.js images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"attachment" is the default, which forces the browser to download the image when visiting directly for added security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Pi3Y" prefix="r2230" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7823977633237923136"],"question":[0,"What image optimization library does Next.js recommend for production?"],"answer":[0,"sharp is strongly recommended for production environments (using next start), while squoosh is used as the default in development."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/install-sharp"]]],"topic":[0,"nextjs"],"slug":[0,"what-image-optimization-library-does-next-js-recommend-for-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-image-optimization-library-does-next-js-recommend-for-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-image-optimization-library-does-next-js-recommend-for-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What image optimization library does Next.js recommend for production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sharp is strongly recommended for production environments (using next start), while squoosh is used as the default in development.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/install-sharp" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJtqtY" prefix="r2231" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8101494097124073050"],"question":[0,"What is the default value of the preload prop in Next.js Image component?"],"answer":[0,"preload={false} by default; set to true only for above-the-fold hero images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-preload-prop-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-preload-prop-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-preload-prop-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the preload prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>preload={false} by default; set to true only for above-the-fold hero images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuOIEr" prefix="r2232" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8416443162536131803"],"question":[0,"What happens when a quality prop value doesn't match the configured qualities array?"],"answer":[0,"The quality will be coerced to the closest value in images.qualities. For example, given qualities: [25, 50, 75], a quality prop of 80 is coerced to 75."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-qualities"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-quality-prop-value-doesn-t-match-the-configured-qualities-ar"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-quality-prop-value-doesn-t-match-the-configured-qualities-ar" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-quality-prop-value-doesn-t-match-the-configured-qualities-ar" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a quality prop value doesn't match the configured qualities array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The quality will be coerced to the closest value in images.qualities. For example, given qualities: [25, 50, 75], a quality prop of 80 is coerced to 75.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-qualities" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mhAvw" prefix="r2233" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8658903730012564398"],"question":[0,"What CSS style should be set when using the style prop to customize width in Next.js Image?"],"answer":[0,"If using the style prop to set a custom width, be sure to also set height: 'auto' to preserve the image's aspect ratio."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-css-style-should-be-set-when-using-the-style-prop-to-customize-width-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-css-style-should-be-set-when-using-the-style-prop-to-customize-width-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-css-style-should-be-set-when-using-the-style-prop-to-customize-width-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSS style should be set when using the style prop to customize width in Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If using the style prop to set a custom width, be sure to also set height: 'auto' to preserve the image's aspect ratio.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rvgnj" prefix="r2234" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8732802902106609990"],"question":[0,"Does the legacy domains configuration support wildcard pattern matching?"],"answer":[0,"No, the domains configuration does not support wildcard pattern matching and it cannot restrict protocol, port, or pathname. Use remotePatterns instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-legacy-domains-configuration-support-wildcard-pattern-matching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-legacy-domains-configuration-support-wildcard-pattern-matching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-legacy-domains-configuration-support-wildcard-pattern-matching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the legacy domains configuration support wildcard pattern matching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the domains configuration does not support wildcard pattern matching and it cannot restrict protocol, port, or pathname. Use remotePatterns instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="P7GHr" prefix="r2235" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8776302257229424549"],"question":[0,"What are the three values accepted by the fetchPriority attribute?"],"answer":[0,"high, low, and auto (the standard HTML values for the fetchpriority attribute)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-values-accepted-by-the-fetchpriority-attribute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-values-accepted-by-the-fetchpriority-attribute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-values-accepted-by-the-fetchpriority-attribute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three values accepted by the fetchPriority attribute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>high, low, and auto (the standard HTML values for the fetchpriority attribute).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2aAnPp" prefix="r2236" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9441407654289723356"],"question":[0,"What is the default minimumCacheTTL for optimized images in Next.js?"],"answer":[0,"14400 seconds (4 hours)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-minimumcachettl-for-optimized-images-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-minimumcachettl-for-optimized-images-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-minimumcachettl-for-optimized-images-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default minimumCacheTTL for optimized images in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>14400 seconds (4 hours)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZodePE" prefix="r2237" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9551368928912321248"],"question":[0,"What are the default imageSizes values in Next.js image configuration?"],"answer":[0,"[32, 48, 64, 96, 128, 256, 384] pixels"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-imagesizes-values-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-imagesizes-values-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-imagesizes-values-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default imageSizes values in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[32, 48, 64, 96, 128, 256, 384] pixels</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jdsW5" prefix="r2238" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10442039851266268261"],"question":[0,"When was the getImageProps function made stable in Next.js?"],"answer":[0,"getImageProps became stable in Next.js 14.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-14-1"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-getimageprops-function-made-stable-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-getimageprops-function-made-stable-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-getimageprops-function-made-stable-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the getImageProps function made stable in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>getImageProps became stable in Next.js 14.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-14-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Aa9DP" prefix="r2239" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10882123732989215932"],"question":[0,"What performance limitation exists when using the placeholder prop with getImageProps?"],"answer":[0,"getImageProps cannot be used with the placeholder prop because the placeholder will never be removed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-limitation-exists-when-using-the-placeholder-prop-with-getimage"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-limitation-exists-when-using-the-placeholder-prop-with-getimage" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-limitation-exists-when-using-the-placeholder-prop-with-getimage" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance limitation exists when using the placeholder prop with getImageProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>getImageProps cannot be used with the placeholder prop because the placeholder will never be removed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2q7iXx" prefix="r2240" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11043157981805295707"],"question":[0,"What is the default sizes value when using the fill prop without specifying sizes?"],"answer":[0,"100vw (full screen width) is used as the default if sizes is not specified with fill."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-sizes-value-when-using-the-fill-prop-without-specifying-size"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-sizes-value-when-using-the-fill-prop-without-specifying-size" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-sizes-value-when-using-the-fill-prop-without-specifying-size" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default sizes value when using the fill prop without specifying sizes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>100vw (full screen width) is used as the default if sizes is not specified with fill.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wyofR" prefix="r2241" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11182213603391879196"],"question":[0,"What changed regarding sharp installation in Next.js 15?"],"answer":[0,"Next.js 15 removed squoosh in favor of sharp as an optional dependency. You no longer need to manually install sharp — Next.js will use sharp automatically when using next start or standalone output mode."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-changed-regarding-sharp-installation-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-changed-regarding-sharp-installation-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-changed-regarding-sharp-installation-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What changed regarding sharp installation in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15 removed squoosh in favor of sharp as an optional dependency. You no longer need to manually install sharp — Next.js will use sharp automatically when using next start or standalone output mode.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1C68OT" prefix="r2242" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11370293331115078859"],"question":[0,"Do static image imports require manual width and height props in Next.js?"],"answer":[0,"No, Next.js automatically determines the intrinsic width and height for statically imported images. Width and height must be set manually for remote images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"do-static-image-imports-require-manual-width-and-height-props-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-static-image-imports-require-manual-width-and-height-props-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-static-image-imports-require-manual-width-and-height-props-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do static image imports require manual width and height props in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Next.js automatically determines the intrinsic width and height for statically imported images. Width and height must be set manually for remote images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ajlcq" prefix="r2243" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11509779345329820484"],"question":[0,"What is the default quality value for optimized images in Next.js?"],"answer":[0,"The default quality is 75 (integer between 1-100)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-value-for-optimized-images-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-value-for-optimized-images-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-value-for-optimized-images-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality value for optimized images in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default quality is 75 (integer between 1-100).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dGKHI" prefix="r2244" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12075074953344770673"],"question":[0,"What srcset values are used for imageSizes configuration?"],"answer":[0,"imageSizes is only used for images which provide a sizes prop, indicating the image is less than the full width of the screen. The sizes in imageSizes should all be smaller than the smallest size in deviceSizes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-srcset-values-are-used-for-imagesizes-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-srcset-values-are-used-for-imagesizes-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-srcset-values-are-used-for-imagesizes-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What srcset values are used for imageSizes configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>imageSizes is only used for images which provide a sizes prop, indicating the image is less than the full width of the screen. The sizes in imageSizes should all be smaller than the smallest size in deviceSizes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBKs21" prefix="r2245" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12547185903325538228"],"question":[0,"When did Next.js deprecate the priority prop in favor of preload?"],"answer":[0,"Starting with Next.js 16, the priority property has been deprecated in favor of the preload property. In most cases, use loading=\"eager\" or fetchPriority=\"high\" instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-next-js-deprecate-the-priority-prop-in-favor-of-preload"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-next-js-deprecate-the-priority-prop-in-favor-of-preload" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-next-js-deprecate-the-priority-prop-in-favor-of-preload" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did Next.js deprecate the priority prop in favor of preload?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting with Next.js 16, the priority property has been deprecated in favor of the preload property. In most cases, use loading="eager" or fetchPriority="high" instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="afBqg" prefix="r2246" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13026080562561206278"],"question":[0,"What is the recommended contentSecurityPolicy value when using dangerouslyAllowSVG?"],"answer":[0,"\"default-src 'self'; script-src 'none'; sandbox;\" to prevent scripts embedded in the SVG from executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-contentsecuritypolicy-value-when-using-dangerouslyallows"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-contentsecuritypolicy-value-when-using-dangerouslyallows" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-contentsecuritypolicy-value-when-using-dangerouslyallows" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended contentSecurityPolicy value when using dangerouslyAllowSVG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"default-src 'self'; script-src 'none'; sandbox;" to prevent scripts embedded in the SVG from executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14EWCX" prefix="r2247" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13436700643081961019"],"question":[0,"What is the default loading behavior for Next.js Image component?"],"answer":[0,"The default is loading=\"lazy\", which defers loading the image until it reaches a calculated distance from the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-loading-behavior-for-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-loading-behavior-for-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-loading-behavior-for-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default loading behavior for Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is loading="lazy", which defers loading the image until it reaches a calculated distance from the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yDGzz" prefix="r2248" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14036352448143841956"],"question":[0,"What warning appears in next dev when an LCP image is missing the priority property?"],"answer":[0,"You'll see a console warning if the LCP element is an <Image> without the priority property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-warning-appears-in-next-dev-when-an-lcp-image-is-missing-the-priority-prope"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-warning-appears-in-next-dev-when-an-lcp-image-is-missing-the-priority-prope" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-warning-appears-in-next-dev-when-an-lcp-image-is-missing-the-priority-prope" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What warning appears in next dev when an LCP image is missing the priority property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You'll see a console warning if the LCP element is an <Image> without the priority property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="data-fetching-fetching-strategies" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Data Fetching > Fetching Strategies</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 38 questions </span> </div> <div class="space-y-4"> <astro-island uid="dbiL0" prefix="r2249" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"21689329079697574"],"question":[0,"What is the default value for the dynamic route segment config option in Next.js?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamic-route-segment-config-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamic-route-segment-config-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamic-route-segment-config-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the dynamic route segment config option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zjx3XT" prefix="r2250" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1303538705665742763"],"question":[0,"What does Promise.all do if one request fails in Next.js parallel data fetching?"],"answer":[0,"If one request fails when using Promise.all, the entire operation will fail."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-promise-all-do-if-one-request-fails-in-next-js-parallel-data-fetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-promise-all-do-if-one-request-fails-in-next-js-parallel-data-fetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-promise-all-do-if-one-request-fails-in-next-js-parallel-data-fetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Promise.all do if one request fails in Next.js parallel data fetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If one request fails when using Promise.all, the entire operation will fail.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1K5FXA" prefix="r2251" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1405704622680896654"],"question":[0,"What is the stale time for the 'default' cacheLife profile in Next.js?"],"answer":[0,"5 minutes"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheLife"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-stale-time-for-the-default-cachelife-profile-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-stale-time-for-the-default-cachelife-profile-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-stale-time-for-the-default-cachelife-profile-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the stale time for the 'default' cacheLife profile in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheLife" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Tqgqp" prefix="r2252" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1986638989183680817"],"question":[0,"What is the default server expire time for the 'use cache' directive in Next.js?"],"answer":[0,"Never expires by time"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-server-expire-time-for-the-use-cache-directive-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-server-expire-time-for-the-use-cache-directive-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-server-expire-time-for-the-use-cache-directive-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default server expire time for the 'use cache' directive in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Never expires by time</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CBfnw" prefix="r2253" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2115335834010531873"],"question":[0,"What does the loading.js file automatically wrap in Next.js?"],"answer":[0,"It automatically wraps the page.js file and any children below in a <Suspense> boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-loading-js-file-automatically-wrap-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-loading-js-file-automatically-wrap-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-loading-js-file-automatically-wrap-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the loading.js file automatically wrap in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It automatically wraps the page.js file and any children below in a <Suspense> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VepGl" prefix="r2254" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2414868892446428283"],"question":[0,"Can you combine React's cache() function with the server-only package for data fetching in Next.js?"],"answer":[0,"Yes, you can combine the cache function, the preload pattern, and the server-only package to create a data fetching utility that guarantees data fetching only happens on the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-combine-react-s-cache-function-with-the-server-only-package-for-data-fet"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-combine-react-s-cache-function-with-the-server-only-package-for-data-fet" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-combine-react-s-cache-function-with-the-server-only-package-for-data-fet" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you combine React's cache() function with the server-only package for data fetching in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can combine the cache function, the preload pattern, and the server-only package to create a data fetching utility that guarantees data fetching only happens on the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3x9T" prefix="r2255" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3303949536625083239"],"question":[0,"What is the revalidate time for the 'default' cacheLife profile in Next.js?"],"answer":[0,"15 minutes"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheLife"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-revalidate-time-for-the-default-cachelife-profile-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-revalidate-time-for-the-default-cachelife-profile-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-revalidate-time-for-the-default-cachelife-profile-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the revalidate time for the 'default' cacheLife profile in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>15 minutes</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheLife" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23Tks9" prefix="r2256" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3408514366486402189"],"question":[0,"Can you use conflicting cache options like { revalidate: 3600, cache: 'no-store' } in Next.js?"],"answer":[0,"No, conflicting options are not allowed. Both will be ignored, and in development mode a warning will be printed to the terminal."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-conflicting-cache-options-like-revalidate-3600-cache-no-store-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-conflicting-cache-options-like-revalidate-3600-cache-no-store-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-conflicting-cache-options-like-revalidate-3600-cache-no-store-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use conflicting cache options like { revalidate: 3600, cache: 'no-store' } in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, conflicting options are not allowed. Both will be ignored, and in development mode a warning will be printed to the terminal.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z108bIH" prefix="r2257" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3564238291466713188"],"question":[0,"What is the recommended alternative to Promise.all when you need to handle partial failures in Next.js?"],"answer":[0,"Promise.allSettled, which waits for all input promises to complete regardless of whether one rejects, allowing you to handle partial failures gracefully."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-alternative-to-promise-all-when-you-need-to-handle-parti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-alternative-to-promise-all-when-you-need-to-handle-parti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-alternative-to-promise-all-when-you-need-to-handle-parti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended alternative to Promise.all when you need to handle partial failures in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise.allSettled, which waits for all input promises to complete regardless of whether one rejects, allowing you to handle partial failures gracefully.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YiqWK" prefix="r2258" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3685250054426175994"],"question":[0,"Is ISR (Incremental Static Regeneration) supported with Next.js static exports?"],"answer":[0,"No, ISR is not supported when creating a Static Export."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"is-isr-incremental-static-regeneration-supported-with-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-isr-incremental-static-regeneration-supported-with-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-isr-incremental-static-regeneration-supported-with-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is ISR (Incremental Static Regeneration) supported with Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, ISR is not supported when creating a Static Export.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCdnii" prefix="r2259" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3807960679517177178"],"question":[0,"Are cache: 'no-store' and revalidate: 0 functionally equivalent in Next.js fetch requests?"],"answer":[0,"Yes, both options prevent caching and fetch fresh data on every request. They produce the same behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/50117"]]],"topic":[0,"nextjs"],"slug":[0,"are-cache-no-store-and-revalidate-0-functionally-equivalent-in-next-js-fetch-req"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-cache-no-store-and-revalidate-0-functionally-equivalent-in-next-js-fetch-req" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-cache-no-store-and-revalidate-0-functionally-equivalent-in-next-js-fetch-req" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are cache: 'no-store' and revalidate: 0 functionally equivalent in Next.js fetch requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, both options prevent caching and fetch fresh data on every request. They produce the same behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/50117" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1wpUoK" prefix="r2260" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3946828811635264530"],"question":[0,"What is the minimum enforced stale time for cacheLife profiles in Next.js?"],"answer":[0,"30 seconds. This minimum is enforced to ensure prefetched links remain functional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheLife"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-enforced-stale-time-for-cachelife-profiles-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-enforced-stale-time-for-cachelife-profiles-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-enforced-stale-time-for-cachelife-profiles-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum enforced stale time for cacheLife profiles in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds. This minimum is enforced to ensure prefetched links remain functional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheLife" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LHelF" prefix="r2261" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4804773123029689256"],"question":[0,"What profile parameter is recommended for revalidateTag() in Next.js for stale-while-revalidate semantics?"],"answer":[0,"profile='max' is recommended for stale-while-revalidate semantics."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/caching-and-revalidating"]]],"topic":[0,"nextjs"],"slug":[0,"what-profile-parameter-is-recommended-for-revalidatetag-in-next-js-for-stale-whi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-profile-parameter-is-recommended-for-revalidatetag-in-next-js-for-stale-whi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-profile-parameter-is-recommended-for-revalidatetag-in-next-js-for-stale-whi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What profile parameter is recommended for revalidateTag() in Next.js for stale-while-revalidate semantics?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>profile='max' is recommended for stale-while-revalidate semantics.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/caching-and-revalidating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iF3fa" prefix="r2262" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4983191865859077317"],"question":[0,"What does setting dynamic = 'force-dynamic' in route segment config do in Next.js?"],"answer":[0,"It forces dynamic rendering for each user at request time, equivalent to setting all fetches to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-dynamic-force-dynamic-in-route-segment-config-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-dynamic-force-dynamic-in-route-segment-config-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-dynamic-force-dynamic-in-route-segment-config-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting dynamic = 'force-dynamic' in route segment config do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces dynamic rendering for each user at request time, equivalent to setting all fetches to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25gn0e" prefix="r2263" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6776108341840791294"],"question":[0,"In Next.js 15, are pages cached by default in the Client-side Router Cache?"],"answer":[0,"No, pages are not cached by default as of Next.js 15. Layouts and loading states are cached and reused."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-are-pages-cached-by-default-in-the-client-side-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-are-pages-cached-by-default-in-the-client-side-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-are-pages-cached-by-default-in-the-client-side-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, are pages cached by default in the Client-side Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, pages are not cached by default as of Next.js 15. Layouts and loading states are cached and reused.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZlJq62" prefix="r2264" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7459445071682089974"],"question":[0,"What is the default caching behavior for fetch requests in Next.js App Router?"],"answer":[0,"fetch responses are not cached by default. However, Next.js will pre-render the route and cache the output for improved performance."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch requests in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fetch responses are not cached by default. However, Next.js will pre-render the route and cache the output for improved performance.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGlV8k" prefix="r2265" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7893585417921332003"],"question":[0,"When was the unstable_cache API introduced in Next.js?"],"answer":[0,"v14.0.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/unstable_cache"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-unstable-cache-api-introduced-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-unstable-cache-api-introduced-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-unstable-cache-api-introduced-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the unstable_cache API introduced in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v14.0.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/unstable_cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z82psj" prefix="r2266" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8467117918179537898"],"question":[0,"Can cached functions using 'use cache' directly access cookies(), headers(), or searchParams in Next.js?"],"answer":[0,"No, they cannot directly access these. They must be read outside cached scopes and passed as arguments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"can-cached-functions-using-use-cache-directly-access-cookies-headers-or-searchpa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-cached-functions-using-use-cache-directly-access-cookies-headers-or-searchpa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-cached-functions-using-use-cache-directly-access-cookies-headers-or-searchpa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can cached functions using 'use cache' directly access cookies(), headers(), or searchParams in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, they cannot directly access these. They must be read outside cached scopes and passed as arguments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zp58jM" prefix="r2267" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8541475984075170211"],"question":[0,"What runtime is required for ISR in Next.js?"],"answer":[0,"Node.js runtime (the default). ISR is only supported when using the Node.js runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-is-required-for-isr-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-is-required-for-isr-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-is-required-for-isr-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime is required for ISR in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js runtime (the default). ISR is only supported when using the Node.js runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eYApQ" prefix="r2268" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8751238965319306079"],"question":[0,"What is the default value for the fetchCache route segment config option in Next.js?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-fetchcache-route-segment-config-option-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-fetchcache-route-segment-config-option-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-fetchcache-route-segment-config-option-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the fetchCache route segment config option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVOgUi" prefix="r2269" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8809975361827077077"],"question":[0,"What is the maximum number of cache tags allowed per fetch request in Next.js?"],"answer":[0,"128 tags"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-cache-tags-allowed-per-fetch-request-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-cache-tags-allowed-per-fetch-request-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-cache-tags-allowed-per-fetch-request-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of cache tags allowed per fetch request in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>128 tags</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UQDGL" prefix="r2270" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8865231061040146499"],"question":[0,"Does Next.js request memoization apply to fetch requests in Route Handlers?"],"answer":[0,"No, memoization applies within the React Component tree (layouts, pages, server components) but not Route Handlers, as they are not part of the React component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-request-memoization-apply-to-fetch-requests-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-request-memoization-apply-to-fetch-requests-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-request-memoization-apply-to-fetch-requests-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js request memoization apply to fetch requests in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, memoization applies within the React Component tree (layouts, pages, server components) but not Route Handlers, as they are not part of the React component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnrCG5" prefix="r2271" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8987947586950177006"],"question":[0,"What is the default value for the revalidate route segment config option in Next.js?"],"answer":[0,"false, which caches indefinitely with individual fetches able to override."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-route-segment-config-option-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-route-segment-config-option-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-route-segment-config-option-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the revalidate route segment config option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false, which caches indefinitely with individual fetches able to override.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GxH9f" prefix="r2272" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9789545557185624353"],"question":[0,"Which HTTP methods does Next.js automatically memoize during request deduplication?"],"answer":[0,"Only the GET method in fetch requests. Other methods, such as POST and DELETE, are not memoized."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"which-http-methods-does-next-js-automatically-memoize-during-request-deduplicati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-http-methods-does-next-js-automatically-memoize-during-request-deduplicati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-http-methods-does-next-js-automatically-memoize-during-request-deduplicati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTTP methods does Next.js automatically memoize during request deduplication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the GET method in fetch requests. Other methods, such as POST and DELETE, are not memoized.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11b3ap" prefix="r2273" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9834007707935961530"],"question":[0,"Can updateTag() be used in Route Handlers in Next.js?"],"answer":[0,"No, updateTag() is exclusively for Server Actions and cannot be used in Route Handlers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/caching-and-revalidating"]]],"topic":[0,"nextjs"],"slug":[0,"can-updatetag-be-used-in-route-handlers-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-updatetag-be-used-in-route-handlers-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-updatetag-be-used-in-route-handlers-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can updateTag() be used in Route Handlers in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, updateTag() is exclusively for Server Actions and cannot be used in Route Handlers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/caching-and-revalidating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fhqwX" prefix="r2274" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10218141654038919300"],"question":[0,"What client-side data fetching library does Next.js officially recommend?"],"answer":[0,"SWR (and also mentions TanStack Query as an alternative). SWR is created by the Next.js team and handles caching, revalidation, focus tracking, refetching on intervals, and more."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/data-fetching/client-side"]]],"topic":[0,"nextjs"],"slug":[0,"what-client-side-data-fetching-library-does-next-js-officially-recommend"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-client-side-data-fetching-library-does-next-js-officially-recommend" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-client-side-data-fetching-library-does-next-js-officially-recommend" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What client-side data fetching library does Next.js officially recommend?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWR (and also mentions TanStack Query as an alternative). SWR is created by the Next.js team and handles caching, revalidation, focus tracking, refetching on intervals, and more.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/client-side" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Tnmka" prefix="r2275" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10269773383978069673"],"question":[0,"What does fetchCache = 'default-cache' do in Next.js route segment config?"],"answer":[0,"It allows any cache option to be passed to fetch, but if no option is provided then sets the cache option to 'force-cache'. This means even fetch requests after Dynamic APIs are considered static."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-default-cache-do-in-next-js-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-default-cache-do-in-next-js-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-default-cache-do-in-next-js-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does fetchCache = 'default-cache' do in Next.js route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It allows any cache option to be passed to fetch, but if no option is provided then sets the cache option to 'force-cache'. This means even fetch requests after Dynamic APIs are considered static.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWuuSU" prefix="r2276" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11374507704961307002"],"question":[0,"How long are statically rendered routes cached in the Next.js Router Cache?"],"answer":[0,"5 minutes"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-are-statically-rendered-routes-cached-in-the-next-js-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-are-statically-rendered-routes-cached-in-the-next-js-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-are-statically-rendered-routes-cached-in-the-next-js-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long are statically rendered routes cached in the Next.js Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="176s1N" prefix="r2277" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11513642765364681618"],"question":[0,"What are the exact values (stale/revalidate/expire) for the 'days' cacheLife profile in Next.js?"],"answer":[0,"stale: 5 minutes, revalidate: 1 day, expire: 1 week"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheLife"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-values-stale-revalidate-expire-for-the-days-cachelife-profile"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-values-stale-revalidate-expire-for-the-days-cachelife-profile" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-values-stale-revalidate-expire-for-the-days-cachelife-profile" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact values (stale/revalidate/expire) for the 'days' cacheLife profile in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>stale: 5 minutes, revalidate: 1 day, expire: 1 week</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheLife" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZXL30d" prefix="r2278" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11877198825442679287"],"question":[0,"What is the default server revalidate time for the 'use cache' directive in Next.js?"],"answer":[0,"15 minutes"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-server-revalidate-time-for-the-use-cache-directive-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-server-revalidate-time-for-the-use-cache-directive-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-server-revalidate-time-for-the-use-cache-directive-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default server revalidate time for the 'use cache' directive in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>15 minutes</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WF1WW" prefix="r2279" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12033970260899492009"],"question":[0,"Is loading.js supported with Next.js static exports?"],"answer":[0,"No, streaming and loading.js are not supported with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-loading-js-supported-with-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-loading-js-supported-with-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-loading-js-supported-with-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is loading.js supported with Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, streaming and loading.js are not supported with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZelVe0" prefix="r2280" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12303740356667465425"],"question":[0,"What happens when an await is used on a fetch request without a Suspense boundary in Next.js?"],"answer":[0,"Any fetch requests with await will block rendering and data fetching for the entire tree beneath it, unless wrapped in a <Suspense> boundary or loading.js is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-an-await-is-used-on-a-fetch-request-without-a-suspense-boundar"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-an-await-is-used-on-a-fetch-request-without-a-suspense-boundar" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-an-await-is-used-on-a-fetch-request-without-a-suspense-boundar" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when an await is used on a fetch request without a Suspense boundary in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any fetch requests with await will block rendering and data fetching for the entire tree beneath it, unless wrapped in a <Suspense> boundary or loading.js is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z176KaX" prefix="r2281" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13262904892970404417"],"question":[0,"What experimental flag is required to use the 'use cache' directive in Next.js?"],"answer":[0,"You must set cacheComponents: true in next.config.ts or next.config.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-flag-is-required-to-use-the-use-cache-directive-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-flag-is-required-to-use-the-use-cache-directive-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-flag-is-required-to-use-the-use-cache-directive-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental flag is required to use the 'use cache' directive in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must set cacheComponents: true in next.config.ts or next.config.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11dhcq" prefix="r2282" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13800941389607443312"],"question":[0,"How long is the Client-side Router Cache stored in Next.js?"],"answer":[0,"Session-based: it persists across navigation but clears on page refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-is-the-client-side-router-cache-stored-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-is-the-client-side-router-cache-stored-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-is-the-client-side-router-cache-stored-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long is the Client-side Router Cache stored in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Session-based: it persists across navigation but clears on page refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQtxVf" prefix="r2283" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14427686221143184545"],"question":[0,"What does setting revalidate = 0 in route segment config do in Next.js?"],"answer":[0,"It ensures dynamic rendering even without Dynamic APIs and changes the default fetch behavior to 'no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-revalidate-0-in-route-segment-config-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-revalidate-0-in-route-segment-config-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-revalidate-0-in-route-segment-config-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting revalidate = 0 in route segment config do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures dynamic rendering even without Dynamic APIs and changes the default fetch behavior to 'no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10ftrW" prefix="r2284" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14785956247933054043"],"question":[0,"What types cannot be serialized as arguments to cached functions in Next.js?"],"answer":[0,"Class instances and functions (except as pass-through) cannot be serialized."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-cannot-be-serialized-as-arguments-to-cached-functions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-cannot-be-serialized-as-arguments-to-cached-functions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-cannot-be-serialized-as-arguments-to-cached-functions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types cannot be serialized as arguments to cached functions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Class instances and functions (except as pass-through) cannot be serialized.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2qOtPQ" prefix="r2285" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14947488007376998842"],"question":[0,"What are the exact values (stale/revalidate/expire) for the 'seconds' cacheLife profile in Next.js?"],"answer":[0,"stale: 30 seconds, revalidate: 1 second, expire: 1 minute"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cacheLife"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-values-stale-revalidate-expire-for-the-seconds-cachelife-prof"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-values-stale-revalidate-expire-for-the-seconds-cachelife-prof" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-values-stale-revalidate-expire-for-the-seconds-cachelife-prof" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact values (stale/revalidate/expire) for the 'seconds' cacheLife profile in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>stale: 30 seconds, revalidate: 1 second, expire: 1 minute</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cacheLife" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2620CQ" prefix="r2286" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15003114776077931948"],"question":[0,"What happens when multiple fetch requests in a route have different revalidate values in Next.js?"],"answer":[0,"The lowest revalidate time will be used for the entire route, ensuring that child pages are revalidated as frequently as their parent layouts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-multiple-fetch-requests-in-a-route-have-different-revalidate-v"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-multiple-fetch-requests-in-a-route-have-different-revalidate-v" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-multiple-fetch-requests-in-a-route-have-different-revalidate-v" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when multiple fetch requests in a route have different revalidate values in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate time will be used for the entire route, ensuring that child pages are revalidated as frequently as their parent layouts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="installation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Installation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 38 questions </span> </div> <div class="space-y-4"> <astro-island uid="1K2czE" prefix="r2287" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"107641279153587103"],"question":[0,"What is the minimum TypeScript version required for Next.js?"],"answer":[0,"TypeScript version 5.1.0 or higher is required. For async Server Components, TypeScript 5.1.3 or higher is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-typescript-version-required-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-typescript-version-required-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-typescript-version-required-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum TypeScript version required for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TypeScript version 5.1.0 or higher is required. For async Server Components, TypeScript 5.1.3 or higher is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFiLmY" prefix="r2288" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"568784477823023332"],"question":[0,"Is Turbopack enabled by default when using create-next-app with the --yes flag?"],"answer":[0,"Yes, Turbopack is enabled as the default bundler when using the --yes flag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"is-turbopack-enabled-by-default-when-using-create-next-app-with-the-yes-flag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-turbopack-enabled-by-default-when-using-create-next-app-with-the-yes-flag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-turbopack-enabled-by-default-when-using-create-next-app-with-the-yes-flag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Turbopack enabled by default when using create-next-app with the --yes flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Turbopack is enabled as the default bundler when using the --yes flag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sDaq" prefix="r2289" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"959123155238897595"],"question":[0,"What is the npm script command to start the Next.js development server?"],"answer":[0,"next dev"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-npm-script-command-to-start-the-next-js-development-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-npm-script-command-to-start-the-next-js-development-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-npm-script-command-to-start-the-next-js-development-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the npm script command to start the Next.js development server?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next dev</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zm6b0j" prefix="r2290" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1408837430361917499"],"question":[0,"What three packages are required for manual Next.js installation?"],"answer":[0,"next@latest, react@latest, and react-dom@latest are required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-packages-are-required-for-manual-next-js-installation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-packages-are-required-for-manual-next-js-installation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-packages-are-required-for-manual-next-js-installation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three packages are required for manual Next.js installation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next@latest, react@latest, and react-dom@latest are required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IPPBX" prefix="r2291" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1777689417786347616"],"question":[0,"What is the npm script command to build a Next.js app for production?"],"answer":[0,"next build"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-npm-script-command-to-build-a-next-js-app-for-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-npm-script-command-to-build-a-next-js-app-for-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-npm-script-command-to-build-a-next-js-app-for-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the npm script command to build a Next.js app for production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next build</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Blltf" prefix="r2292" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1780688800782412258"],"question":[0,"What flag do you use with create-next-app to reset stored preferences?"],"answer":[0,"--reset-preferences"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-reset-stored-preferences"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-reset-stored-preferences" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-reset-stored-preferences" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to reset stored preferences?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--reset-preferences</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22MKS9" prefix="r2293" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2557654492882563977"],"question":[0,"What command do you use to create a new Next.js app with yarn?"],"answer":[0,"yarn create next-app@latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-do-you-use-to-create-a-new-next-js-app-with-yarn"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-do-you-use-to-create-a-new-next-js-app-with-yarn" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-do-you-use-to-create-a-new-next-js-app-with-yarn" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command do you use to create a new Next.js app with yarn?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>yarn create next-app@latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25xErM" prefix="r2294" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2688005313137974800"],"question":[0,"What command do you use to create a new Next.js app with bun?"],"answer":[0,"bun create next-app@latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-do-you-use-to-create-a-new-next-js-app-with-bun"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-do-you-use-to-create-a-new-next-js-app-with-bun" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-do-you-use-to-create-a-new-next-js-app-with-bun" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command do you use to create a new Next.js app with bun?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>bun create next-app@latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z154FmJ" prefix="r2295" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3352447553176129677"],"question":[0,"What flag do you use with create-next-app to disable Git initialization?"],"answer":[0,"--disable-git"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-disable-git-initialization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-disable-git-initialization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-disable-git-initialization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to disable Git initialization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--disable-git</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eqr9x" prefix="r2296" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3496386318752309752"],"question":[0,"Is TypeScript enabled by default when using create-next-app with the --yes flag?"],"answer":[0,"Yes, TypeScript is enabled by default when using the --yes flag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"is-typescript-enabled-by-default-when-using-create-next-app-with-the-yes-flag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-typescript-enabled-by-default-when-using-create-next-app-with-the-yes-flag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-typescript-enabled-by-default-when-using-create-next-app-with-the-yes-flag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is TypeScript enabled by default when using create-next-app with the --yes flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, TypeScript is enabled by default when using the --yes flag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2v3cPf" prefix="r2297" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3742514474255959071"],"question":[0,"What next.config option allows production builds despite TypeScript errors?"],"answer":[0,"typescript.ignoreBuildErrors: true allows production builds despite TypeScript errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-config-option-allows-production-builds-despite-typescript-errors"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-config-option-allows-production-builds-despite-typescript-errors" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-config-option-allows-production-builds-despite-typescript-errors" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What next.config option allows production builds despite TypeScript errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>typescript.ignoreBuildErrors: true allows production builds despite TypeScript errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdJneR" prefix="r2298" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3776744237107227023"],"question":[0,"What flag do you use with create-next-app to use bun as the package manager?"],"answer":[0,"--use-bun"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-use-bun-as-the-package-manager"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-use-bun-as-the-package-manager" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-use-bun-as-the-package-manager" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to use bun as the package manager?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--use-bun</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DKwL8" prefix="r2299" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3872674697713253737"],"question":[0,"What is the current version of create-next-app as of the documentation?"],"answer":[0,"16.0.9 (as of October 28, 2025)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-current-version-of-create-next-app-as-of-the-documentation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-current-version-of-create-next-app-as-of-the-documentation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-current-version-of-create-next-app-as-of-the-documentation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the current version of create-next-app as of the documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>16.0.9 (as of October 28, 2025)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="iyzEU" prefix="r2300" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3894462791460045863"],"question":[0,"Is ESLint enabled by default when using create-next-app with the --yes flag?"],"answer":[0,"Yes, ESLint is enabled by default when using the --yes flag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"is-eslint-enabled-by-default-when-using-create-next-app-with-the-yes-flag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-eslint-enabled-by-default-when-using-create-next-app-with-the-yes-flag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-eslint-enabled-by-default-when-using-create-next-app-with-the-yes-flag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is ESLint enabled by default when using create-next-app with the --yes flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, ESLint is enabled by default when using the --yes flag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20FS0U" prefix="r2301" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4095612149151772901"],"question":[0,"When is the next-env.d.ts file regenerated?"],"answer":[0,"It is regenerated during next dev, next build, or next typegen commands."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-next-env-d-ts-file-regenerated"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-next-env-d-ts-file-regenerated" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-next-env-d-ts-file-regenerated" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the next-env.d.ts file regenerated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is regenerated during next dev, next build, or next typegen commands.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QDRRM" prefix="r2302" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4598260151069045171"],"question":[0,"What flag do you use with create-next-app to force using Webpack instead of Turbopack?"],"answer":[0,"--webpack"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-force-using-webpack-instead-of-turb"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-force-using-webpack-instead-of-turb" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-force-using-webpack-instead-of-turb" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to force using Webpack instead of Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--webpack</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hJR2c" prefix="r2303" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4705928382509834557"],"question":[0,"What flag do you use with create-next-app to bootstrap from an example?"],"answer":[0,"-e or --example followed by the example name or URL"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-bootstrap-from-an-example"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-bootstrap-from-an-example" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-bootstrap-from-an-example" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to bootstrap from an example?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>-e or --example followed by the example name or URL</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZcsV7x" prefix="r2304" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4965951071782192180"],"question":[0,"What flag do you use with create-next-app to use all default settings without prompts?"],"answer":[0,"--yes"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-use-all-default-settings-without-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-use-all-default-settings-without-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-use-all-default-settings-without-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to use all default settings without prompts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--yes</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24zohR" prefix="r2305" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5524815062984222957"],"question":[0,"What is the mandatory root layout file required in a Next.js app directory?"],"answer":[0,"app/layout.tsx is required and must contain <html> and <body> tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-mandatory-root-layout-file-required-in-a-next-js-app-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-mandatory-root-layout-file-required-in-a-next-js-app-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-mandatory-root-layout-file-required-in-a-next-js-app-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the mandatory root layout file required in a Next.js app directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>app/layout.tsx is required and must contain <html> and <body> tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2e2QP8" prefix="r2306" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7416310852300627841"],"question":[0,"What is the minimum Edge version supported by Next.js?"],"answer":[0,"Edge 111 or higher is supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-edge-version-supported-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-edge-version-supported-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-edge-version-supported-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Edge version supported by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge 111 or higher is supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="F842O" prefix="r2307" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7712224484480257497"],"question":[0,"What flag do you use with create-next-app to create a JavaScript project instead of TypeScript?"],"answer":[0,"--js or --javascript"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-create-a-javascript-project-instead"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-create-a-javascript-project-instead" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-create-a-javascript-project-instead" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to create a JavaScript project instead of TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--js or --javascript</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kU1nk" prefix="r2308" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7880408965600726776"],"question":[0,"Does create-next-app automatically initialize Git?"],"answer":[0,"Yes, Git is automatically initialized when you create a new Next.js project with create-next-app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"does-create-next-app-automatically-initialize-git"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-create-next-app-automatically-initialize-git" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-create-next-app-automatically-initialize-git" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does create-next-app automatically initialize Git?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Git is automatically initialized when you create a new Next.js project with create-next-app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2xr6o" prefix="r2309" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8098352622221830331"],"question":[0,"What Node.js version is required for native TypeScript resolver with ESM support in next.config.ts?"],"answer":[0,"Node.js v22.10.0 or higher is required for native TypeScript resolver with ESM support."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-node-js-version-is-required-for-native-typescript-resolver-with-esm-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-node-js-version-is-required-for-native-typescript-resolver-with-esm-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-node-js-version-is-required-for-native-typescript-resolver-with-esm-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Node.js version is required for native TypeScript resolver with ESM support in next.config.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js v22.10.0 or higher is required for native TypeScript resolver with ESM support.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18FyMH" prefix="r2310" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8376465950663155730"],"question":[0,"What is the minimum @types/react version required for async Server Components?"],"answer":[0,"@types/react 18.2.8 or higher is required for async Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-types-react-version-required-for-async-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-types-react-version-required-for-async-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-types-react-version-required-for-async-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum @types/react version required for async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@types/react 18.2.8 or higher is required for async Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2agwDY" prefix="r2311" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8434476735840991747"],"question":[0,"What flag do you use with create-next-app to create a minimal/empty project?"],"answer":[0,"--empty"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-create-a-minimal-empty-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-create-a-minimal-empty-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-create-a-minimal-empty-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to create a minimal/empty project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--empty</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DOzI0" prefix="r2312" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8629196179882279844"],"question":[0,"What flag do you use with create-next-app to skip linter setup?"],"answer":[0,"--no-linter"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-skip-linter-setup"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-skip-linter-setup" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-skip-linter-setup" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to skip linter setup?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--no-linter</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zab02J" prefix="r2313" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9022982575577121821"],"question":[0,"What flag allows you to customize the import alias in create-next-app?"],"answer":[0,"--import-alias <alias> allows you to set a custom import alias (default is @/*)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-allows-you-to-customize-the-import-alias-in-create-next-app"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-allows-you-to-customize-the-import-alias-in-create-next-app" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-allows-you-to-customize-the-import-alias-in-create-next-app" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag allows you to customize the import alias in create-next-app?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--import-alias <alias> allows you to set a custom import alias (default is @/*).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1erL0v" prefix="r2314" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9759241370179488221"],"question":[0,"What flag do you use with create-next-app to skip dependency installation?"],"answer":[0,"--skip-install"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-skip-dependency-installation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-skip-dependency-installation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-skip-dependency-installation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to skip dependency installation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--skip-install</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZvwWC3" prefix="r2315" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11038818212188866482"],"question":[0,"What flag do you use with create-next-app to enable the React Compiler?"],"answer":[0,"--react-compiler"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-enable-the-react-compiler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-enable-the-react-compiler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-enable-the-react-compiler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to enable the React Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--react-compiler</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17yf8k" prefix="r2316" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11702426685674483171"],"question":[0,"What flag do you use with create-next-app to use pnpm as the package manager?"],"answer":[0,"--use-pnpm"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-use-pnpm-as-the-package-manager"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-use-pnpm-as-the-package-manager" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-use-pnpm-as-the-package-manager" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to use pnpm as the package manager?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--use-pnpm</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1m6XSJ" prefix="r2317" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11702580933690156234"],"question":[0,"What is the minimum Safari version supported by Next.js?"],"answer":[0,"Safari 16.4 or higher is supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-safari-version-supported-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-safari-version-supported-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-safari-version-supported-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Safari version supported by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Safari 16.4 or higher is supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11i8R4" prefix="r2318" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11759083480213964914"],"question":[0,"What tsconfig.json option enables static typing for route links in Next.js?"],"answer":[0,"typedRoutes: true in next.config.ts enables static typing for route links and navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-tsconfig-json-option-enables-static-typing-for-route-links-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-tsconfig-json-option-enables-static-typing-for-route-links-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-tsconfig-json-option-enables-static-typing-for-route-links-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What tsconfig.json option enables static typing for route links in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>typedRoutes: true in next.config.ts enables static typing for route links and navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ugtIO" prefix="r2319" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12733584838790214716"],"question":[0,"What flag do you use with create-next-app to use npm as the package manager?"],"answer":[0,"--use-npm"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/create-next-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-do-you-use-with-create-next-app-to-use-npm-as-the-package-manager"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-do-you-use-with-create-next-app-to-use-npm-as-the-package-manager" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-do-you-use-with-create-next-app-to-use-npm-as-the-package-manager" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag do you use with create-next-app to use npm as the package manager?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--use-npm</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29Tg7a" prefix="r2320" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12926957737159443389"],"question":[0,"What is the minimum Firefox version supported by Next.js?"],"answer":[0,"Firefox 111 or higher is supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-firefox-version-supported-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-firefox-version-supported-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-firefox-version-supported-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Firefox version supported by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Firefox 111 or higher is supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wlSGy" prefix="r2321" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13713481667838588859"],"question":[0,"What command do you use to create a new Next.js app with npm?"],"answer":[0,"npx create-next-app@latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-do-you-use-to-create-a-new-next-js-app-with-npm"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-do-you-use-to-create-a-new-next-js-app-with-npm" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-do-you-use-to-create-a-new-next-js-app-with-npm" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command do you use to create a new Next.js app with npm?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx create-next-app@latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkJvmo" prefix="r2322" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14577726110641212476"],"question":[0,"What command do you use to create a new Next.js app with pnpm?"],"answer":[0,"pnpm create next-app@latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-do-you-use-to-create-a-new-next-js-app-with-pnpm"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-do-you-use-to-create-a-new-next-js-app-with-pnpm" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-do-you-use-to-create-a-new-next-js-app-with-pnpm" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command do you use to create a new Next.js app with pnpm?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>pnpm create next-app@latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1e6IML" prefix="r2323" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14604430696244782902"],"question":[0,"What is the npm script command to start the Next.js production server?"],"answer":[0,"next start"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-npm-script-command-to-start-the-next-js-production-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-npm-script-command-to-start-the-next-js-production-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-npm-script-command-to-start-the-next-js-production-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the npm script command to start the Next.js production server?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next start</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dJtzP" prefix="r2324" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14713417757773427362"],"question":[0,"What is the minimum Node.js version required for Next.js?"],"answer":[0,"Node.js version 20.9 or higher is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js version 20.9 or higher is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="authentication-session-management-strategies" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Authentication > Session Management Strategies</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 38 questions </span> </div> <div class="space-y-4"> <astro-island uid="SiSVR" prefix="r2325" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"130994702854206768"],"question":[0,"What does the unauthorized() function do in Next.js?"],"answer":[0,"It throws an error that renders a Next.js 401 error page for handling authentication failures. Execution stops at the point of invocation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/unauthorized"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-unauthorized-function-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-unauthorized-function-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-unauthorized-function-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the unauthorized() function do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It throws an error that renders a Next.js 401 error page for handling authentication failures. Execution stops at the point of invocation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/unauthorized" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2t1Vuf" prefix="r2326" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"212593988856028249"],"question":[0,"Where should a Next.js proxy file be located?"],"answer":[0,"The proxy.ts or proxy.js file should be at the project root or in the src directory, at the same level as pages or app. If using custom pageExtensions, match that pattern (e.g., proxy.page.ts)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-a-next-js-proxy-file-be-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-a-next-js-proxy-file-be-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-a-next-js-proxy-file-be-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should a Next.js proxy file be located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The proxy.ts or proxy.js file should be at the project root or in the src directory, at the same level as pages or app. If using custom pageExtensions, match that pattern (e.g., proxy.page.ts).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zu9bMl" prefix="r2327" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1046745280193600309"],"question":[0,"Can HTTP set cookies after streaming starts in Next.js?"],"answer":[0,"No, HTTP does not allow setting cookies after streaming starts. This is a protocol constraint documented in the Next.js cookies API."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-http-set-cookies-after-streaming-starts-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-http-set-cookies-after-streaming-starts-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-http-set-cookies-after-streaming-starts-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can HTTP set cookies after streaming starts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, HTTP does not allow setting cookies after streaming starts. This is a protocol constraint documented in the Next.js cookies API.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOEq94" prefix="r2328" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2147982974317809026"],"question":[0,"What are the trade-offs between stateless and database sessions in Next.js?"],"answer":[0,"Stateless (cookie-based) sessions are simpler and suit smaller applications with lower server load but may offer less security if not implemented correctly. Database sessions provide better security and scalability for larger, data-sensitive applications but are more complex and use more server resources."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-trade-offs-between-stateless-and-database-sessions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-trade-offs-between-stateless-and-database-sessions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-trade-offs-between-stateless-and-database-sessions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the trade-offs between stateless and database sessions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Stateless (cookie-based) sessions are simpler and suit smaller applications with lower server load but may offer less security if not implemented correctly. Database sessions provide better security and scalability for larger, data-sensitive applications but are more complex and use more server resources.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ilwv2" prefix="r2329" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2356793854508290029"],"question":[0,"What happens after setting or deleting a cookie in a Next.js Server Action?"],"answer":[0,"Next.js re-renders the current page and its layouts on the server so the UI reflects the new cookie value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-after-setting-or-deleting-a-cookie-in-a-next-js-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-after-setting-or-deleting-a-cookie-in-a-next-js-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-after-setting-or-deleting-a-cookie-in-a-next-js-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens after setting or deleting a cookie in a Next.js Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js re-renders the current page and its layouts on the server so the UI reflects the new cookie value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mqh4d" prefix="r2330" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2478458055846482007"],"question":[0,"What is the purpose of the updateSession() function in Next.js?"],"answer":[0,"updateSession() extends the session's expiration time, useful for keeping the user logged in after they access the application again. It retrieves the current session, verifies it, and sets a new expiration time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-updatesession-function-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-updatesession-function-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-updatesession-function-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the updateSession() function in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateSession() extends the session's expiration time, useful for keeping the user logged in after they access the application again. It retrieves the current session, verifies it, and sets a new expiration time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPkjoF" prefix="r2331" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2622789853436427599"],"question":[0,"What JWT algorithm does Next.js documentation recommend for session encryption with jose?"],"answer":[0,"The documentation recommends using the HS256 algorithm, implemented as .setProtectedHeader({ alg: 'HS256' }) with SignJWT and algorithms: ['HS256'] with jwtVerify."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-jwt-algorithm-does-next-js-documentation-recommend-for-session-encryption-w"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-jwt-algorithm-does-next-js-documentation-recommend-for-session-encryption-w" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-jwt-algorithm-does-next-js-documentation-recommend-for-session-encryption-w" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What JWT algorithm does Next.js documentation recommend for session encryption with jose?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The documentation recommends using the HS256 algorithm, implemented as .setProtectedHeader({ alg: 'HS256' }) with SignJWT and algorithms: ['HS256'] with jwtVerify.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1T1Yyo" prefix="r2332" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3361227267807782609"],"question":[0,"What are the two main session storage strategies supported in Next.js?"],"answer":[0,"Next.js supports two main strategies: (1) Stateless sessions - session data is stored in browser cookies, with the cookie sent on each request for server-side verification; (2) Database sessions - session data resides in a database, with only an encrypted session ID stored in the browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-session-storage-strategies-supported-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-session-storage-strategies-supported-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-session-storage-strategies-supported-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main session storage strategies supported in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports two main strategies: (1) Stateless sessions - session data is stored in browser cookies, with the cookie sent on each request for server-side verification; (2) Database sessions - session data resides in a database, with only an encrypted session ID stored in the browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24u08l" prefix="r2333" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4311006723065377869"],"question":[0,"What experimental config is required to use forbidden() and unauthorized() functions?"],"answer":[0,"Set experimental.authInterrupts: true in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/forbidden"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-config-is-required-to-use-forbidden-and-unauthorized-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-config-is-required-to-use-forbidden-and-unauthorized-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-config-is-required-to-use-forbidden-and-unauthorized-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental config is required to use forbidden() and unauthorized() functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set experimental.authInterrupts: true in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/forbidden" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OD3AP" prefix="r2334" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4348344761724661148"],"question":[0,"What environment variable name does Next.js use for the session encryption secret key?"],"answer":[0,"The documentation uses SESSION_SECRET as the environment variable name, accessed via process.env.SESSION_SECRET."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-name-does-next-js-use-for-the-session-encryption-secre"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-name-does-next-js-use-for-the-session-encryption-secre" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-name-does-next-js-use-for-the-session-encryption-secre" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable name does Next.js use for the session encryption secret key?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The documentation uses SESSION_SECRET as the environment variable name, accessed via process.env.SESSION_SECRET.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25PDD4" prefix="r2335" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4799734572096279802"],"question":[0,"What cookie options are supported by Next.js cookies.set()?"],"answer":[0,"Supported options include: name, value, expires (Date), maxAge (number in seconds), domain, path (default '/'), secure (boolean), httpOnly (boolean), sameSite (boolean/'lax'/'strict'/'none'), priority ('low'/'medium'/'high'), and partitioned (boolean)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-options-are-supported-by-next-js-cookies-set"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-options-are-supported-by-next-js-cookies-set" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-options-are-supported-by-next-js-cookies-set" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie options are supported by Next.js cookies.set()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Supported options include: name, value, expires (Date), maxAge (number in seconds), domain, path (default '/'), secure (boolean), httpOnly (boolean), sameSite (boolean/'lax'/'strict'/'none'), priority ('low'/'medium'/'high'), and partitioned (boolean).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1z2FwN" prefix="r2336" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4813874353224719977"],"question":[0,"How should verifySession() be optimized in Next.js to avoid redundant checks?"],"answer":[0,"Wrap verifySession() with React's cache() API to memoize the return value during a React render pass, avoiding redundant verification within the same request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-verifysession-be-optimized-in-next-js-to-avoid-redundant-checks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-verifysession-be-optimized-in-next-js-to-avoid-redundant-checks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-verifysession-be-optimized-in-next-js-to-avoid-redundant-checks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should verifySession() be optimized in Next.js to avoid redundant checks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap verifySession() with React's cache() API to memoize the return value during a React render pass, avoiding redundant verification within the same request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bHkK9" prefix="r2337" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5034724059379094905"],"question":[0,"What is the matching logic for proxy matcher 'has' and 'missing' conditions?"],"answer":[0,"Both the source and all 'has' items must match AND all 'missing' items must not match for the configuration to be applied."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-matching-logic-for-proxy-matcher-has-and-missing-conditions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-matching-logic-for-proxy-matcher-has-and-missing-conditions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-matching-logic-for-proxy-matcher-has-and-missing-conditions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the matching logic for proxy matcher 'has' and 'missing' conditions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both the source and all 'has' items must match AND all 'missing' items must not match for the configuration to be applied.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qXOFE" prefix="r2338" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5055274023020397882"],"question":[0,"Why is jose recommended over other JWT libraries in Next.js?"],"answer":[0,"Jose is compatible with the Edge Runtime, allowing JWT operations to run in edge environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-jose-recommended-over-other-jwt-libraries-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-jose-recommended-over-other-jwt-libraries-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-jose-recommended-over-other-jwt-libraries-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is jose recommended over other JWT libraries in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Jose is compatible with the Edge Runtime, allowing JWT operations to run in edge environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="80B5V" prefix="r2339" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5491124595524281480"],"question":[0,"How can you immediately expire a cookie in Next.js?"],"answer":[0,"Set maxAge to 0, which will immediately expire the cookie."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-immediately-expire-a-cookie-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-immediately-expire-a-cookie-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-immediately-expire-a-cookie-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you immediately expire a cookie in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set maxAge to 0, which will immediately expire the cookie.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdqzL2" prefix="r2340" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7373043466891038442"],"question":[0,"What cookie methods are available on NextRequest in middleware/proxy?"],"answer":[0,"Request cookies provide: get(), getAll(), set(), delete(), has(), and clear() methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-methods-are-available-on-nextrequest-in-middleware-proxy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-methods-are-available-on-nextrequest-in-middleware-proxy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-methods-are-available-on-nextrequest-in-middleware-proxy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie methods are available on NextRequest in middleware/proxy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request cookies provide: get(), getAll(), set(), delete(), has(), and clear() methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KpJW2" prefix="r2341" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7837968504564564305"],"question":[0,"What is the maxAge value in seconds for a 7-day cookie expiration?"],"answer":[0,"604800 seconds (calculated as 7 × 24 × 60 × 60), which is the equivalent of 7 days."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maxage-value-in-seconds-for-a-7-day-cookie-expiration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maxage-value-in-seconds-for-a-7-day-cookie-expiration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maxage-value-in-seconds-for-a-7-day-cookie-expiration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maxAge value in seconds for a 7-day cookie expiration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>604800 seconds (calculated as 7 × 24 × 60 × 60), which is the equivalent of 7 days.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13qzx5" prefix="r2342" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8056187338401445481"],"question":[0,"Which session management libraries does Next.js officially recommend?"],"answer":[0,"Next.js recommends iron-session (a low-level, encrypted, and stateless session utility) or Jose (compatible with Edge Runtime) for stateless sessions. For complete authentication solutions, it lists Auth0, Better Auth, Clerk, Descope, Kinde, Logto, NextAuth.js, Ory, Stack Auth, Supabase, Stytch, and WorkOS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"which-session-management-libraries-does-next-js-officially-recommend"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-session-management-libraries-does-next-js-officially-recommend" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-session-management-libraries-does-next-js-officially-recommend" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which session management libraries does Next.js officially recommend?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends iron-session (a low-level, encrypted, and stateless session utility) or Jose (compatible with Edge Runtime) for stateless sessions. For complete authentication solutions, it lists Auth0, Better Auth, Clerk, Descope, Kinde, Logto, NextAuth.js, Ory, Stack Auth, Supabase, Stytch, and WorkOS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Y7G9n" prefix="r2343" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8105728119258288155"],"question":[0,"What config option allows Server Actions to be invoked from different origins?"],"answer":[0,"The serverActions.allowedOrigins configuration option specifies a list of safe origins for large applications using reverse proxies or multi-layered backend architectures."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-config-option-allows-server-actions-to-be-invoked-from-different-origins"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-config-option-allows-server-actions-to-be-invoked-from-different-origins" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-config-option-allows-server-actions-to-be-invoked-from-different-origins" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What config option allows Server Actions to be invoked from different origins?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The serverActions.allowedOrigins configuration option specifies a list of safe origins for large applications using reverse proxies or multi-layered backend architectures.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qUc7x" prefix="r2344" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8160404349451300591"],"question":[0,"How should the SESSION_SECRET be encoded for use with jose in Next.js?"],"answer":[0,"The secret should be encoded using TextEncoder: const encodedKey = new TextEncoder().encode(secretKey)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-the-session-secret-be-encoded-for-use-with-jose-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-the-session-secret-be-encoded-for-use-with-jose-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-the-session-secret-be-encoded-for-use-with-jose-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should the SESSION_SECRET be encoded for use with jose in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The secret should be encoded using TextEncoder: const encodedKey = new TextEncoder().encode(secretKey).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QAHC8" prefix="r2345" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8745206506413390600"],"question":[0,"What runtime does Next.js proxy default to?"],"answer":[0,"Proxy defaults to using the Node.js runtime and does not support the runtime config option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-does-next-js-proxy-default-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-does-next-js-proxy-default-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-does-next-js-proxy-default-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime does Next.js proxy default to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Proxy defaults to using the Node.js runtime and does not support the runtime config option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9AMrR" prefix="r2346" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8820027123651911305"],"question":[0,"What data should be included in a Next.js session payload?"],"answer":[0,"The payload should contain minimal, unique user data such as user ID and role for subsequent requests, but should NOT include personally identifiable information like phone numbers, email addresses, credit card information, or sensitive data like passwords."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-data-should-be-included-in-a-next-js-session-payload"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-data-should-be-included-in-a-next-js-session-payload" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-data-should-be-included-in-a-next-js-session-payload" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What data should be included in a Next.js session payload?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The payload should contain minimal, unique user data such as user ID and role for subsequent requests, but should NOT include personally identifiable information like phone numbers, email addresses, credit card information, or sensitive data like passwords.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zwm5ID" prefix="r2347" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8884340301359821250"],"question":[0,"What does the forbidden() function do in Next.js?"],"answer":[0,"It throws an error that renders a Next.js 403 error page, designed for managing authorization failures. Execution stops at the point of invocation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/forbidden"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-forbidden-function-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-forbidden-function-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-forbidden-function-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the forbidden() function do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It throws an error that renders a Next.js 403 error page, designed for managing authorization failures. Execution stops at the point of invocation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/forbidden" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2guiRm" prefix="r2348" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9903669165399160495"],"question":[0,"What example negative lookahead pattern excludes common static paths from proxy/middleware?"],"answer":[0,"'/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)' excludes API routes, static files, and metadata from middleware execution."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-example-negative-lookahead-pattern-excludes-common-static-paths-from-proxy-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-example-negative-lookahead-pattern-excludes-common-static-paths-from-proxy-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-example-negative-lookahead-pattern-excludes-common-static-paths-from-proxy-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What example negative lookahead pattern excludes common static paths from proxy/middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)' excludes API routes, static files, and metadata from middleware execution.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1h7Ufy" prefix="r2349" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10612023164362397997"],"question":[0,"What is the recommended pattern for centralizing session verification in Next.js?"],"answer":[0,"Create a Data Access Layer (DAL) with a verifySession() function that checks if the session is valid, then redirects or returns user information needed for further requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-pattern-for-centralizing-session-verification-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-pattern-for-centralizing-session-verification-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-pattern-for-centralizing-session-verification-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended pattern for centralizing session verification in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a Data Access Layer (DAL) with a verifySession() function that checks if the session is valid, then redirects or returns user information needed for further requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDCHzI" prefix="r2350" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11221802290623611551"],"question":[0,"What cookie methods are available on NextResponse in middleware/proxy?"],"answer":[0,"Response cookies provide: get(), getAll(), set(), and delete() methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-methods-are-available-on-nextresponse-in-middleware-proxy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-methods-are-available-on-nextresponse-in-middleware-proxy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-methods-are-available-on-nextresponse-in-middleware-proxy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie methods are available on NextResponse in middleware/proxy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Response cookies provide: get(), getAll(), set(), and delete() methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9XEaN" prefix="r2351" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11228893706306265808"],"question":[0,"What are all the available methods on the Next.js cookies API?"],"answer":[0,"The cookies API provides: get('name') returns object with name and value; getAll() returns array of all matching cookies; has('name') returns boolean; set(name, value, options) sets cookie; delete(name) deletes cookie; toString() returns string representation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-available-methods-on-the-next-js-cookies-api"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-available-methods-on-the-next-js-cookies-api" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-available-methods-on-the-next-js-cookies-api" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the available methods on the Next.js cookies API?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies API provides: get('name') returns object with name and value; getAll() returns array of all matching cookies; has('name') returns boolean; set(name, value, options) sets cookie; delete(name) deletes cookie; toString() returns string representation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YT6zx" prefix="r2352" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11289106907374609929"],"question":[0,"What are the three core requirements for a Data Access Layer (DAL) in Next.js?"],"answer":[0,"A DAL should: (1) operate exclusively on the server, (2) perform authorization checks, and (3) return safe, minimal Data Transfer Objects (DTOs)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-core-requirements-for-a-data-access-layer-dal-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-core-requirements-for-a-data-access-layer-dal-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-core-requirements-for-a-data-access-layer-dal-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three core requirements for a Data Access Layer (DAL) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A DAL should: (1) operate exclusively on the server, (2) perform authorization checks, and (3) return safe, minimal Data Transfer Objects (DTOs).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aKsgG" prefix="r2353" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11853087114718905411"],"question":[0,"What types are supported in proxy matcher 'has' and 'missing' conditionals?"],"answer":[0,"The type field must be either 'header', 'cookie', 'host', or 'query'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-are-supported-in-proxy-matcher-has-and-missing-conditionals"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-are-supported-in-proxy-matcher-has-and-missing-conditionals" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-are-supported-in-proxy-matcher-has-and-missing-conditionals" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types are supported in proxy matcher 'has' and 'missing' conditionals?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The type field must be either 'header', 'cookie', 'host', or 'query'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="h87mc" prefix="r2354" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11963458997561939032"],"question":[0,"Is the Next.js cookies() API synchronous or asynchronous?"],"answer":[0,"The cookies() API is asynchronous and requires await or React's use() function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-next-js-cookies-api-synchronous-or-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-next-js-cookies-api-synchronous-or-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-next-js-cookies-api-synchronous-or-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the Next.js cookies() API synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies() API is asynchronous and requires await or React's use() function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z239mb6" prefix="r2355" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12448816590310331904"],"question":[0,"What is the default JWT session expiration time shown in Next.js authentication examples?"],"answer":[0,"The examples use 7 days ('7d') as the expiration time, implemented with .setExpirationTime('7d') in SignJWT."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-jwt-session-expiration-time-shown-in-next-js-authentication-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-jwt-session-expiration-time-shown-in-next-js-authentication-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-jwt-session-expiration-time-shown-in-next-js-authentication-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default JWT session expiration time shown in Next.js authentication examples?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The examples use 7 days ('7d') as the expiration time, implemented with .setExpirationTime('7d') in SignJWT.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB8uz2" prefix="r2356" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12752863254608067064"],"question":[0,"What error can occur from setting large headers in Next.js proxy?"],"answer":[0,"Setting large headers can cause a '431 Request Header Fields Too Large' error depending on your backend web server configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-can-occur-from-setting-large-headers-in-next-js-proxy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-can-occur-from-setting-large-headers-in-next-js-proxy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-can-occur-from-setting-large-headers-in-next-js-proxy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error can occur from setting large headers in Next.js proxy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting large headers can cause a '431 Request Header Fields Too Large' error depending on your backend web server configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FSUfN" prefix="r2357" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12989722872241999236"],"question":[0,"What happens when you use the cookies() API in a Next.js route?"],"answer":[0,"Using cookies() is a Dynamic API that triggers dynamic rendering and opts the route out of the Full Route Cache, as its returned values cannot be known ahead of time and depend on runtime request information."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-use-the-cookies-api-in-a-next-js-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-use-the-cookies-api-in-a-next-js-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-use-the-cookies-api-in-a-next-js-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you use the cookies() API in a Next.js route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using cookies() is a Dynamic API that triggers dynamic rendering and opts the route out of the Full Route Cache, as its returned values cannot be known ahead of time and depend on runtime request information.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gHA8w" prefix="r2358" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13402815408908440158"],"question":[0,"What React hook does Next.js recommend for authentication form handling?"],"answer":[0,"useActionState (which replaced useFormState in React 19) for calling server actions, handling form errors, and displaying pending state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-hook-does-next-js-recommend-for-authentication-form-handling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-hook-does-next-js-recommend-for-authentication-form-handling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-hook-does-next-js-recommend-for-authentication-form-handling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React hook does Next.js recommend for authentication form handling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState (which replaced useFormState in React 19) for calling server actions, handling form errors, and displaying pending state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7uOGo" prefix="r2359" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13948636920112591677"],"question":[0,"In what Next.js version were forbidden() and unauthorized() introduced?"],"answer":[0,"Version 15.1.0, marked as experimental and not recommended for production use."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/forbidden"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-next-js-version-were-forbidden-and-unauthorized-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-next-js-version-were-forbidden-and-unauthorized-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-next-js-version-were-forbidden-and-unauthorized-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what Next.js version were forbidden() and unauthorized() introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.1.0, marked as experimental and not recommended for production use.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/forbidden" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZLYowk" prefix="r2360" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14244254447341760122"],"question":[0,"Where should environment variables like SESSION_SECRET be accessed in Next.js?"],"answer":[0,"Only within the Data Access Layer (DAL) to keep secrets from being exposed to other parts of the application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-environment-variables-like-session-secret-be-accessed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-environment-variables-like-session-secret-be-accessed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-environment-variables-like-session-secret-be-accessed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should environment variables like SESSION_SECRET be accessed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only within the Data Access Layer (DAL) to keep secrets from being exposed to other parts of the application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z26F6pd" prefix="r2361" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14721711257892879161"],"question":[0,"What are the recommended cookie security attributes for session cookies in Next.js?"],"answer":[0,"The recommended cookie attributes are: httpOnly: true (prevents client-side JavaScript access), secure: true (uses HTTPS), sameSite: 'lax' (controls cross-site requests), expires or maxAge (defines deletion timing), and path: '/' (specifies URL path)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-recommended-cookie-security-attributes-for-session-cookies-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-recommended-cookie-security-attributes-for-session-cookies-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-recommended-cookie-security-attributes-for-session-cookies-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the recommended cookie security attributes for session cookies in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended cookie attributes are: httpOnly: true (prevents client-side JavaScript access), secure: true (uses HTTPS), sameSite: 'lax' (controls cross-site requests), expires or maxAge (defines deletion timing), and path: '/' (specifies URL path).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1MPI0i" prefix="r2362" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15021841073283859113"],"question":[0,"What does Next.js recommend for extending user sessions beyond manual cookie updates?"],"answer":[0,"Check if your authentication library supports refresh tokens, which can be used to extend the user's session."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-js-recommend-for-extending-user-sessions-beyond-manual-cookie-upd"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-js-recommend-for-extending-user-sessions-beyond-manual-cookie-upd" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-js-recommend-for-extending-user-sessions-beyond-manual-cookie-upd" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Next.js recommend for extending user sessions beyond manual cookie updates?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Check if your authentication library supports refresh tokens, which can be used to extend the user's session.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="layouts-and-pages-page-and-layout-creation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Layouts and Pages > Page and Layout Creation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 38 questions </span> </div> <div class="space-y-4"> <astro-island uid="19dIvX" prefix="r2363" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"450771021529068307"],"question":[0,"How do index routes work in Next.js Pages Router?"],"answer":[0,"Files named index automatically route to the root of the directory. For example, pages/index.js → / and pages/blog/index.js → /blog."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-index-routes-work-in-next-js-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-index-routes-work-in-next-js-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-index-routes-work-in-next-js-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do index routes work in Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Files named index automatically route to the root of the directory. For example, pages/index.js → / and pages/blog/index.js → /blog.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1L0eQ5" prefix="r2364" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"702697760592304413"],"question":[0,"Do layouts re-render during navigation between routes?"],"answer":[0,"No, on navigation, layouts preserve state, remain interactive, and do not rerender."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"do-layouts-re-render-during-navigation-between-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-layouts-re-render-during-navigation-between-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-layouts-re-render-during-navigation-between-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do layouts re-render during navigation between routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, on navigation, layouts preserve state, remain interactive, and do not rerender.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fy86i" prefix="r2365" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1278662396119810010"],"question":[0,"Can layouts pass data directly to their children?"],"answer":[0,"No, layouts cannot pass data directly to children. This is a fundamental design restriction in Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"can-layouts-pass-data-directly-to-their-children"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-layouts-pass-data-directly-to-their-children" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-layouts-pass-data-directly-to-their-children" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can layouts pass data directly to their children?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, layouts cannot pass data directly to children. This is a fundamental design restriction in Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRR4I9" prefix="r2366" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1342702113592321714"],"question":[0,"Are layouts in Next.js App Router nested by default?"],"answer":[0,"Yes, by default, layouts in the folder hierarchy are also nested, which means they wrap child layouts via their children prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"are-layouts-in-next-js-app-router-nested-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-layouts-in-next-js-app-router-nested-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-layouts-in-next-js-app-router-nested-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are layouts in Next.js App Router nested by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, by default, layouts in the folder hierarchy are also nested, which means they wrap child layouts via their children prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16T8rr" prefix="r2367" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2104123657242182787"],"question":[0,"What is the type of the params prop in page.js files?"],"answer":[0,"The params prop is of type Promise<{ [key: string]: any }>. It must be awaited or accessed via React's use() hook."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-params-prop-in-page-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-params-prop-in-page-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-params-prop-in-page-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the params prop in page.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The params prop is of type Promise<{ [key: string]: any }>. It must be awaited or accessed via React's use() hook.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vQ9JS" prefix="r2368" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2293020394325478684"],"question":[0,"What happens when navigating between routes that use different root layouts?"],"answer":[0,"Navigating between routes that use different root layouts will trigger a full page reload. For example, navigating from /cart that uses app/(shop)/layout.js to /blog that uses app/(marketing)/layout.js causes a full page reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-navigating-between-routes-that-use-different-root-layouts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-navigating-between-routes-that-use-different-root-layouts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-navigating-between-routes-that-use-different-root-layouts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when navigating between routes that use different root layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Navigating between routes that use different root layouts will trigger a full page reload. For example, navigating from /cart that uses app/(shop)/layout.js to /blog that uses app/(marketing)/layout.js causes a full page reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KqA0D" prefix="r2369" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2333780519181671797"],"question":[0,"What is the type of the searchParams prop in page.js files?"],"answer":[0,"The searchParams prop is of type Promise<{ [key: string]: string | string[] | undefined }>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-of-the-searchparams-prop-in-page-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-of-the-searchparams-prop-in-page-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-of-the-searchparams-prop-in-page-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type of the searchParams prop in page.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The searchParams prop is of type Promise<{ [key: string]: string | string[] | undefined }>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZghVEB" prefix="r2370" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2895150941888168535"],"question":[0,"How do you create a dynamic route segment in Next.js App Router?"],"answer":[0,"A Dynamic Segment can be created by wrapping a folder's name in square brackets: [folderName]. For example, app/blog/[slug]/page.js where [slug] is the Dynamic Segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-dynamic-route-segment-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-dynamic-route-segment-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-dynamic-route-segment-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a dynamic route segment in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A Dynamic Segment can be created by wrapping a folder's name in square brackets: [folderName]. For example, app/blog/[slug]/page.js where [slug] is the Dynamic Segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1MDatU" prefix="r2371" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3250263620559570417"],"question":[0,"Is a page.js file required to make a route segment publicly accessible?"],"answer":[0,"Yes, a page.js file is required for the route to be accessible. Only the content inside the page file will be publicly accessible. Without a page.js file, the route segment will return a 404 error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-page-js-file-required-to-make-a-route-segment-publicly-accessible"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-page-js-file-required-to-make-a-route-segment-publicly-accessible" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-page-js-file-required-to-make-a-route-segment-publicly-accessible" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a page.js file required to make a route segment publicly accessible?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, a page.js file is required for the route to be accessible. Only the content inside the page file will be publicly accessible. Without a page.js file, the route segment will return a 404 error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pmPdu" prefix="r2372" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3266669440767384967"],"question":[0,"What is the difference between catch-all [...slug] and optional catch-all [[...slug]] segments?"],"answer":[0,"The difference is that with optional catch-all [[...slug]], the route without the parameter is also matched. For example, [[...slug]] matches both /shop and /shop/clothes, while [...slug] only matches /shop/clothes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-catch-all-slug-and-optional-catch-all-slug-segmen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-catch-all-slug-and-optional-catch-all-slug-segmen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-catch-all-slug-and-optional-catch-all-slug-segmen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between catch-all [...slug] and optional catch-all [[...slug]] segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The difference is that with optional catch-all [[...slug]], the route without the parameter is also matched. For example, [[...slug]] matches both /shop and /shop/clothes, while [...slug] only matches /shop/clothes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5FMAL" prefix="r2373" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4048800598607006486"],"question":[0,"What is the default prefetch behavior of the Link component in production?"],"answer":[0,"For the prefetch prop set to null or 'auto' (default): For static routes, the full route will be prefetched. For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-prefetch-behavior-of-the-link-component-in-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-prefetch-behavior-of-the-link-component-in-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-prefetch-behavior-of-the-link-component-in-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default prefetch behavior of the Link component in production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For the prefetch prop set to null or 'auto' (default): For static routes, the full route will be prefetched. For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="w8zmu" prefix="r2374" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4105984098599655868"],"question":[0,"What happens when useSearchParams is called in a statically rendered route?"],"answer":[0,"When a route is statically rendered, calling useSearchParams will cause the Client Component tree up to the closest Suspense boundary to be client-side rendered. This allows a part of the route to be statically rendered while the dynamic part that uses useSearchParams is client-side rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-usesearchparams-is-called-in-a-statically-rendered-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-usesearchparams-is-called-in-a-statically-rendered-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-usesearchparams-is-called-in-a-statically-rendered-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when useSearchParams is called in a statically rendered route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a route is statically rendered, calling useSearchParams will cause the Client Component tree up to the closest Suspense boundary to be client-side rendered. This allows a part of the route to be statically rendered while the dynamic part that uses useSearchParams is client-side rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JOBC5" prefix="r2375" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4667392219689912430"],"question":[0,"What is the syntax for catch-all segments in Next.js?"],"answer":[0,"Catch-all segments use the [...segmentName] syntax. For example, app/shop/[...slug]/page.js will match /shop/clothes, /shop/clothes/tops, /shop/clothes/tops/t-shirts, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-catch-all-segments-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-catch-all-segments-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-catch-all-segments-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for catch-all segments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Catch-all segments use the [...segmentName] syntax. For example, app/shop/[...slug]/page.js will match /shop/clothes, /shop/clothes/tops, /shop/clothes/tops/t-shirts, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YyFrj" prefix="r2376" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4911885531842295409"],"question":[0,"What happens if you create route groups with conflicting paths?"],"answer":[0,"Creating route groups with conflicting paths will cause an error. For example, (marketing)/about/page.js and (shop)/about/page.js would both resolve to /about and cause an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-create-route-groups-with-conflicting-paths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-create-route-groups-with-conflicting-paths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-create-route-groups-with-conflicting-paths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you create route groups with conflicting paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Creating route groups with conflicting paths will cause an error. For example, (marketing)/about/page.js and (shop)/about/page.js would both resolve to /about and cause an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2907N5" prefix="r2377" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4929036698596275038"],"question":[0,"What are the exact file extensions supported for layout files in Next.js App Router?"],"answer":[0,"Layout files support .js, .jsx, or .tsx extensions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-file-extensions-supported-for-layout-files-in-next-js-app-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-file-extensions-supported-for-layout-files-in-next-js-app-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-file-extensions-supported-for-layout-files-in-next-js-app-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact file extensions supported for layout files in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layout files support .js, .jsx, or .tsx extensions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qRriP" prefix="r2378" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6552878863812948099"],"question":[0,"Do templates re-render on navigation in Next.js?"],"answer":[0,"Yes, templates create a new instance for each of their children on navigation. Unlike layouts that persist across routes and maintain state, templates are given a unique key and reset their state on navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"do-templates-re-render-on-navigation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-templates-re-render-on-navigation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-templates-re-render-on-navigation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do templates re-render on navigation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, templates create a new instance for each of their children on navigation. Unlike layouts that persist across routes and maintain state, templates are given a unique key and reset their state on navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTlJb0" prefix="r2379" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6767626828601400492"],"question":[0,"In which Next.js version did params become asynchronous (a Promise)?"],"answer":[0,"As of v15.0.0-RC, the params prop transitioned from synchronous to asynchronous, requiring async/await or React's use() function for value access."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-params-become-asynchronous-a-promise"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-params-become-asynchronous-a-promise" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-params-become-asynchronous-a-promise" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did params become asynchronous (a Promise)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>As of v15.0.0-RC, the params prop transitioned from synchronous to asynchronous, requiring async/await or React's use() function for value access.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vcsXR" prefix="r2380" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7550199847503235860"],"question":[0,"Does using searchParams in a page component opt the route into dynamic rendering?"],"answer":[0,"Yes, using searchParams will opt the page into dynamic rendering at request time since search parameters are request-time values that cannot be known ahead of time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-searchparams-in-a-page-component-opt-the-route-into-dynamic-rendering"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-searchparams-in-a-page-component-opt-the-route-into-dynamic-rendering" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-searchparams-in-a-page-component-opt-the-route-into-dynamic-rendering" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using searchParams in a page component opt the route into dynamic rendering?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, using searchParams will opt the page into dynamic rendering at request time since search parameters are request-time values that cannot be known ahead of time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z241ia0" prefix="r2381" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8573226702153151533"],"question":[0,"Can you use getStaticProps or getServerSideProps in layout files?"],"answer":[0,"No, layouts cannot use getStaticProps or getServerSideProps. This is a fundamental limitation in the Pages Router. You must use client-side fetching with useEffect or libraries like SWR instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-getstaticprops-or-getserversideprops-in-layout-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-getstaticprops-or-getserversideprops-in-layout-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-getstaticprops-or-getserversideprops-in-layout-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use getStaticProps or getServerSideProps in layout files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, layouts cannot use getStaticProps or getServerSideProps. This is a fundamental limitation in the Pages Router. You must use client-side fetching with useEffect or libraries like SWR instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkRpWA" prefix="r2382" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9157364821460286100"],"question":[0,"Is a Suspense boundary required when using useSearchParams in production builds?"],"answer":[0,"Yes, during production builds, a static page that calls useSearchParams from a Client Component must be wrapped in a Suspense boundary, otherwise the build fails with the 'Missing Suspense boundary with useSearchParams' error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-suspense-boundary-required-when-using-usesearchparams-in-production-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-suspense-boundary-required-when-using-usesearchparams-in-production-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-suspense-boundary-required-when-using-usesearchparams-in-production-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a Suspense boundary required when using useSearchParams in production builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, during production builds, a static page that calls useSearchParams from a Client Component must be wrapped in a Suspense boundary, otherwise the build fails with the 'Missing Suspense boundary with useSearchParams' error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1a7GmO" prefix="r2383" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9356539461273628030"],"question":[0,"Are layouts Server Components or Client Components by default in Next.js App Router?"],"answer":[0,"By default, layouts and pages are Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"are-layouts-server-components-or-client-components-by-default-in-next-js-app-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-layouts-server-components-or-client-components-by-default-in-next-js-app-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-layouts-server-components-or-client-components-by-default-in-next-js-app-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are layouts Server Components or Client Components by default in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, layouts and pages are Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qKya3" prefix="r2384" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9638505400791550153"],"question":[0,"What happens when you use getInitialProps in _app.js?"],"answer":[0,"Using getInitialProps in _app.js will disable Automatic Static Optimization for pages without getStaticProps. This is not recommended as a pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/custom-app"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-use-getinitialprops-in-app-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-use-getinitialprops-in-app-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-use-getinitialprops-in-app-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you use getInitialProps in _app.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using getInitialProps in _app.js will disable Automatic Static Optimization for pages without getStaticProps. This is not recommended as a pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/custom-app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tcwpF" prefix="r2385" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9763147751467634294"],"question":[0,"What is the route groups convention in Next.js?"],"answer":[0,"A route group can be created by wrapping a folder's name in parentheses: (folderName). This indicates the folder is for organizational purposes and should not be included in the route's URL path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-route-groups-convention-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-route-groups-convention-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-route-groups-convention-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the route groups convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A route group can be created by wrapping a folder's name in parentheses: (folderName). This indicates the folder is for organizational purposes and should not be included in the route's URL path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5UeWh" prefix="r2386" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10285373017596727247"],"question":[0,"What command can you run to apply the codemod for async params in Next.js 15?"],"answer":[0,"You can run: npx @next/codemod@canary next-async-request-api ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-can-you-run-to-apply-the-codemod-for-async-params-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-can-you-run-to-apply-the-codemod-for-async-params-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-can-you-run-to-apply-the-codemod-for-async-params-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command can you run to apply the codemod for async params in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can run: npx @next/codemod@canary next-async-request-api .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LPrAf" prefix="r2387" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10547285515165668701"],"question":[0,"What is the syntax for optional catch-all segments in Next.js?"],"answer":[0,"Optional catch-all segments use double square brackets: [[...segmentName]]. For example, app/shop/[[...slug]]/page.js will match /shop in addition to /shop/clothes, /shop/clothes/tops, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-optional-catch-all-segments-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-optional-catch-all-segments-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-optional-catch-all-segments-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for optional catch-all segments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Optional catch-all segments use double square brackets: [[...segmentName]]. For example, app/shop/[[...slug]]/page.js will match /shop in addition to /shop/clothes, /shop/clothes/tops, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14Vs0X" prefix="r2388" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10801938372307107496"],"question":[0,"What are the two default meta tags that Next.js always adds?"],"answer":[0,"The two default meta tags are: (1) the meta charset tag which sets the character encoding for the website, and (2) the meta viewport tag which sets the viewport width and scale for the website to adjust for different devices."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-default-meta-tags-that-next-js-always-adds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-default-meta-tags-that-next-js-always-adds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-default-meta-tags-that-next-js-always-adds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two default meta tags that Next.js always adds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The two default meta tags are: (1) the meta charset tag which sets the character encoding for the website, and (2) the meta viewport tag which sets the viewport width and scale for the website to adjust for different devices.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1s3h7z" prefix="r2389" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11748335429033785600"],"question":[0,"Are route group folders included in the URL path?"],"answer":[0,"No, folders wrapped in parentheses like (folderName) are excluded from the URL path structure. For example, (marketing)/about/page.js resolves to /about, not /(marketing)/about."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"are-route-group-folders-included-in-the-url-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-route-group-folders-included-in-the-url-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-route-group-folders-included-in-the-url-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are route group folders included in the URL path?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, folders wrapped in parentheses like (folderName) are excluded from the URL path structure. For example, (marketing)/about/page.js resolves to /about, not /(marketing)/about.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jAT6j" prefix="r2390" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11786116158027869589"],"question":[0,"Is prefetching enabled in development mode for the Link component?"],"answer":[0,"No, prefetching is not enabled in development, only in production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"is-prefetching-enabled-in-development-mode-for-the-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-prefetching-enabled-in-development-mode-for-the-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-prefetching-enabled-in-development-mode-for-the-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is prefetching enabled in development mode for the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, prefetching is not enabled in development, only in production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yfYPE" prefix="r2391" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11788867584314241855"],"question":[0,"Is the root layout required in Next.js App Router applications?"],"answer":[0,"Yes, the root layout is mandatory and must be defined at the app directory level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-root-layout-required-in-next-js-app-router-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-root-layout-required-in-next-js-app-router-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-root-layout-required-in-next-js-app-router-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the root layout required in Next.js App Router applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the root layout is mandatory and must be defined at the app directory level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jhBB7" prefix="r2392" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12150219534595416277"],"question":[0,"Is the children prop an implicit slot in Next.js layouts?"],"answer":[0,"Yes, the children prop is an implicit slot that does not need to be mapped to a folder. This means app/page.js is equivalent to app/@children/page.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-children-prop-an-implicit-slot-in-next-js-layouts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-children-prop-an-implicit-slot-in-next-js-layouts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-children-prop-an-implicit-slot-in-next-js-layouts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the children prop an implicit slot in Next.js layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the children prop is an implicit slot that does not need to be mapped to a folder. This means app/page.js is equivalent to app/@children/page.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lElWi" prefix="r2393" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12337339451712344751"],"question":[0,"Should you manually add <head> tags in the root layout?"],"answer":[0,"No, you should not manually add <head> tags such as <title> and <meta> to root layouts. Instead, you should use the Metadata API which automatically handles advanced requirements such as streaming and de-duplicating <head> elements."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-manually-add-head-tags-in-the-root-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-manually-add-head-tags-in-the-root-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-manually-add-head-tags-in-the-root-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you manually add <head> tags in the root layout?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you should not manually add <head> tags such as <title> and <meta> to root layouts. Instead, you should use the Metadata API which automatically handles advanced requirements such as streaming and de-duplicating <head> elements.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UWnzr" prefix="r2394" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12370013013602911584"],"question":[0,"What are the globally available type helpers in Next.js 15.5+?"],"answer":[0,"Next.js 15.5 introduced globally available PageProps, LayoutProps, and RouteContext type helpers with full parameter typing and no imports required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-globally-available-type-helpers-in-next-js-15-5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-globally-available-type-helpers-in-next-js-15-5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-globally-available-type-helpers-in-next-js-15-5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the globally available type helpers in Next.js 15.5+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15.5 introduced globally available PageProps, LayoutProps, and RouteContext type helpers with full parameter typing and no imports required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tSqWh" prefix="r2395" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12971307833836433914"],"question":[0,"Can the metadata object and generateMetadata function be used in Client Components?"],"answer":[0,"No, the metadata object and generateMetadata function exports are only supported in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-metadata-object-and-generatemetadata-function-be-used-in-client-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-metadata-object-and-generatemetadata-function-be-used-in-client-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-metadata-object-and-generatemetadata-function-be-used-in-client-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the metadata object and generateMetadata function be used in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the metadata object and generateMetadata function exports are only supported in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1A1kXh" prefix="r2396" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13060543543491188148"],"question":[0,"When should you use a template instead of a layout?"],"answer":[0,"Templates are useful when you need to: resynchronize useEffect on navigation, reset the state of child Client Components on navigation, or implement features that rely on useEffect (e.g., logging page views) and useState (e.g., a per-page feedback form)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"when-should-you-use-a-template-instead-of-a-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-should-you-use-a-template-instead-of-a-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-should-you-use-a-template-instead-of-a-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When should you use a template instead of a layout?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Templates are useful when you need to: resynchronize useEffect on navigation, reset the state of child Client Components on navigation, or implement features that rely on useEffect (e.g., logging page views) and useState (e.g., a per-page feedback form).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hOmMt" prefix="r2397" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13282193959632388051"],"question":[0,"What export is required for both page and layout files in Next.js App Router?"],"answer":[0,"Both pages and layouts must default export a React component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"what-export-is-required-for-both-page-and-layout-files-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-export-is-required-for-both-page-and-layout-files-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-export-is-required-for-both-page-and-layout-files-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What export is required for both page and layout files in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both pages and layouts must default export a React component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1PCEVL" prefix="r2398" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13895197881866025203"],"question":[0,"When are PageProps and LayoutProps type helpers generated?"],"answer":[0,"These type helpers are generated automatically during next dev, next build, or via next typegen."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-pageprops-and-layoutprops-type-helpers-generated"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-pageprops-and-layoutprops-type-helpers-generated" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-pageprops-and-layoutprops-type-helpers-generated" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are PageProps and LayoutProps type helpers generated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>These type helpers are generated automatically during next dev, next build, or via next typegen.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RoGPP" prefix="r2399" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14242928438454636083"],"question":[0,"What are the supported file extensions for pages in the Pages Router?"],"answer":[0,"A page is a React Component exported from a .js, .jsx, .ts, or .tsx file in the pages directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-supported-file-extensions-for-pages-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-supported-file-extensions-for-pages-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-supported-file-extensions-for-pages-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the supported file extensions for pages in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A page is a React Component exported from a .js, .jsx, .ts, or .tsx file in the pages directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZttMYD" prefix="r2400" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14996677487536388705"],"question":[0,"What HTML tags must the root layout contain?"],"answer":[0,"The root layout must contain html and body tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-tags-must-the-root-layout-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-tags-must-the-root-layout-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-tags-must-the-root-layout-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML tags must the root layout contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The root layout must contain html and body tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="authentication-core-authentication-concepts" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Authentication > Core Authentication Concepts</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 37 questions </span> </div> <div class="space-y-4"> <astro-island uid="1Cj4DP" prefix="r2401" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"439151059321197667"],"question":[0,"What cookie API methods are available in Next.js?"],"answer":[0,"get('name') returns a single cookie, getAll() returns array of matching cookies, has('name') checks existence, set(name, value, options) stores a cookie, delete('name') removes a cookie, and toString() converts to string representation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-api-methods-are-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-api-methods-are-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-api-methods-are-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie API methods are available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>get('name') returns a single cookie, getAll() returns array of matching cookies, has('name') checks existence, set(name, value, options) stores a cookie, delete('name') removes a cookie, and toString() converts to string representation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z150U8v" prefix="r2402" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1088323034364007103"],"question":[0,"What data should a session payload contain according to Next.js recommendations?"],"answer":[0,"The minimum, unique user data that'll be used in subsequent requests, such as the user's ID, role, etc. It should not contain personally identifiable information like phone number, email address, credit card information, or sensitive data like passwords."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-data-should-a-session-payload-contain-according-to-next-js-recommendations"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-data-should-a-session-payload-contain-according-to-next-js-recommendations" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-data-should-a-session-payload-contain-according-to-next-js-recommendations" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What data should a session payload contain according to Next.js recommendations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The minimum, unique user data that'll be used in subsequent requests, such as the user's ID, role, etc. It should not contain personally identifiable information like phone number, email address, credit card information, or sensitive data like passwords.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGLKzb" prefix="r2403" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1471143888870206312"],"question":[0,"What is the official Next.js definition of Authentication?"],"answer":[0,"Authentication verifies if the user is who they say they are. It requires the user to prove their identity with something they have, such as a username and password."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-official-next-js-definition-of-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-official-next-js-definition-of-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-official-next-js-definition-of-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the official Next.js definition of Authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Authentication verifies if the user is who they say they are. It requires the user to prove their identity with something they have, such as a username and password.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="JBrr1" prefix="r2404" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2237281251851857529"],"question":[0,"What is the AUTH_SECRET environment variable used for in Next.js authentication?"],"answer":[0,"AUTH_SECRET is the only mandatory environment variable for Auth.js, used to encrypt tokens and email verification hashes. It should be a cryptographically secure random string of at least 32 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-auth-secret-environment-variable-used-for-in-next-js-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-auth-secret-environment-variable-used-for-in-next-js-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-auth-secret-environment-variable-used-for-in-next-js-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the AUTH_SECRET environment variable used for in Next.js authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AUTH_SECRET is the only mandatory environment variable for Auth.js, used to encrypt tokens and email verification hashes. It should be a cryptographically secure random string of at least 32 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1C2e3W" prefix="r2405" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2451417395670746316"],"question":[0,"How can you generate an AUTH_SECRET value for Next.js authentication?"],"answer":[0,"You can generate it using the Auth.js CLI with 'npx auth secret', or using 'openssl rand -base64 32', or via https://generate-secret.vercel.app/32"],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-generate-an-auth-secret-value-for-next-js-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-generate-an-auth-secret-value-for-next-js-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-generate-an-auth-secret-value-for-next-js-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you generate an AUTH_SECRET value for Next.js authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can generate it using the Auth.js CLI with 'npx auth secret', or using 'openssl rand -base64 32', or via <a href="https://generate-secret.vercel.app/32">https://generate-secret.vercel.app/32</a></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1e6Oca" prefix="r2406" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2582458093572681056"],"question":[0,"Which Next.js runtime should be used for authentication with Node.js-specific APIs?"],"answer":[0,"Use Node.js runtime by specifying 'export const runtime = \"nodejs\"' if your authentication requires Node.js-specific APIs. Edge Runtime does not support all Node.js APIs, particularly the native crypto module."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-next-js-runtime-should-be-used-for-authentication-with-node-js-specific-ap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-next-js-runtime-should-be-used-for-authentication-with-node-js-specific-ap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-next-js-runtime-should-be-used-for-authentication-with-node-js-specific-ap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Next.js runtime should be used for authentication with Node.js-specific APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use Node.js runtime by specifying 'export const runtime = "nodejs"' if your authentication requires Node.js-specific APIs. Edge Runtime does not support all Node.js APIs, particularly the native crypto module.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kC49k" prefix="r2407" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2885420548315844499"],"question":[0,"What bcrypt function does Next.js recommend for hashing passwords during user signup?"],"answer":[0,"Next.js recommends using 'await bcrypt.hash(password, 10)' with 10 salt rounds to hash passwords before storing them in the database."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-bcrypt-function-does-next-js-recommend-for-hashing-passwords-during-user-si"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-bcrypt-function-does-next-js-recommend-for-hashing-passwords-during-user-si" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-bcrypt-function-does-next-js-recommend-for-hashing-passwords-during-user-si" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What bcrypt function does Next.js recommend for hashing passwords during user signup?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using 'await bcrypt.hash(password, 10)' with 10 salt rounds to hash passwords before storing them in the database.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB6E4b" prefix="r2408" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3155312508816047427"],"question":[0,"Why does Next.js recommend using authentication libraries over custom implementations?"],"answer":[0,"For increased security and simplicity, Next.js strongly recommends using authentication libraries rather than custom implementations, noting that custom solutions can quickly become complex and citing increased security and simplicity as key benefits."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-does-next-js-recommend-using-authentication-libraries-over-custom-implementa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-does-next-js-recommend-using-authentication-libraries-over-custom-implementa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-does-next-js-recommend-using-authentication-libraries-over-custom-implementa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why does Next.js recommend using authentication libraries over custom implementations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For increased security and simplicity, Next.js strongly recommends using authentication libraries rather than custom implementations, noting that custom solutions can quickly become complex and citing increased security and simplicity as key benefits.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27EnRi" prefix="r2409" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3394625684033333166"],"question":[0,"What are the required cookie security attributes recommended by Next.js for authentication?"],"answer":[0,"HttpOnly (prevents client-side JavaScript access), Secure (requires HTTPS transmission), SameSite (controls cross-site request handling), Max-Age or Expires (specifies cookie deletion timing), and Path (defines the URL path scope)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-cookie-security-attributes-recommended-by-next-js-for-auth"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-cookie-security-attributes-recommended-by-next-js-for-auth" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-cookie-security-attributes-recommended-by-next-js-for-auth" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required cookie security attributes recommended by Next.js for authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>HttpOnly (prevents client-side JavaScript access), Secure (requires HTTPS transmission), SameSite (controls cross-site request handling), Max-Age or Expires (specifies cookie deletion timing), and Path (defines the URL path scope).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nBOVF" prefix="r2410" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3449164235751459127"],"question":[0,"What are the valid values for the sameSite cookie attribute in Next.js?"],"answer":[0,"The sameSite attribute accepts Boolean or String values: 'lax', 'strict', or 'none'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-samesite-cookie-attribute-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-samesite-cookie-attribute-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-samesite-cookie-attribute-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the sameSite cookie attribute in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The sameSite attribute accepts Boolean or String values: 'lax', 'strict', or 'none'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19TDEf" prefix="r2411" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4869968498876201222"],"question":[0,"What file convention replaced 'middleware' in Next.js v16?"],"answer":[0,"In Next.js v16.0.0, the middleware file convention was deprecated and renamed to 'proxy'. If using Next.js ≤15, use middleware.ts; for v16+, use proxy.ts (the code itself remains the same, only the filename changes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-convention-replaced-middleware-in-next-js-v16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-convention-replaced-middleware-in-next-js-v16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-convention-replaced-middleware-in-next-js-v16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file convention replaced 'middleware' in Next.js v16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js v16.0.0, the middleware file convention was deprecated and renamed to 'proxy'. If using Next.js ≤15, use middleware.ts; for v16+, use proxy.ts (the code itself remains the same, only the filename changes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15u2yd" prefix="r2412" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5190232009029894598"],"question":[0,"What is the official Next.js definition of Authorization?"],"answer":[0,"Authorization decides what routes and data the user can access."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-official-next-js-definition-of-authorization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-official-next-js-definition-of-authorization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-official-next-js-definition-of-authorization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the official Next.js definition of Authorization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Authorization decides what routes and data the user can access.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vbtUg" prefix="r2413" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5233746194348008790"],"question":[0,"Where can cookies be set and deleted in Next.js?"],"answer":[0,"Setting and deleting cookies must be performed in a Route Handler or Server Action where the response headers can be properly set. Cookies can be read in Server Components via HTTP request headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-cookies-be-set-and-deleted-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-cookies-be-set-and-deleted-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-cookies-be-set-and-deleted-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can cookies be set and deleted in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting and deleting cookies must be performed in a Route Handler or Server Action where the response headers can be properly set. Cookies can be read in Server Components via HTTP request headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="N4aYT" prefix="r2414" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5799103739373240245"],"question":[0,"Where should the main security checks be performed in a Next.js application?"],"answer":[0,"The main security checks should happen where your app accesses or changes data (the Data Access Layer). While middleware can be useful for initial validation, it should not be the sole line of defense - the bulk of security checks should be performed in the DAL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-main-security-checks-be-performed-in-a-next-js-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-main-security-checks-be-performed-in-a-next-js-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-main-security-checks-be-performed-in-a-next-js-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the main security checks be performed in a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The main security checks should happen where your app accesses or changes data (the Data Access Layer). While middleware can be useful for initial validation, it should not be the sole line of defense - the bulk of security checks should be performed in the DAL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zD2Dc" prefix="r2415" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6135087248568978914"],"question":[0,"What is the authorized callback in Next.js authentication?"],"answer":[0,"The authorized callback is invoked when a user needs authorization, using Middleware/Proxy. It verifies if the request is authorized to access a page. It returns true to allow access or false to redirect to login."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/reference/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-authorized-callback-in-next-js-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-authorized-callback-in-next-js-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-authorized-callback-in-next-js-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the authorized callback in Next.js authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The authorized callback is invoked when a user needs authorization, using Middleware/Proxy. It verifies if the request is authorized to access a page. It returns true to allow access or false to redirect to login.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/reference/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z4g81b" prefix="r2416" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6645548394737430436"],"question":[0,"Why do Server Actions provide a secure environment for authentication logic?"],"answer":[0,"Server Actions execute exclusively on the server, providing a secure environment for handling authentication logic where sensitive operations cannot be accessed or manipulated by the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-do-server-actions-provide-a-secure-environment-for-authentication-logic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-do-server-actions-provide-a-secure-environment-for-authentication-logic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-do-server-actions-provide-a-secure-environment-for-authentication-logic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why do Server Actions provide a secure environment for authentication logic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions execute exclusively on the server, providing a secure environment for handling authentication logic where sensitive operations cannot be accessed or manipulated by the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z12HQXA" prefix="r2417" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7387656553991322618"],"question":[0,"What React cache function pattern does Next.js recommend for authentication?"],"answer":[0,"Wrap verifySession with React's cache() function to avoid unnecessary duplicate requests to the database during a render pass: export const getUser = cache(async () => { const session = await verifySession(); ... })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-cache-function-pattern-does-next-js-recommend-for-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-cache-function-pattern-does-next-js-recommend-for-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-cache-function-pattern-does-next-js-recommend-for-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React cache function pattern does Next.js recommend for authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap verifySession with React's cache() function to avoid unnecessary duplicate requests to the database during a render pass: export const getUser = cache(async () => { const session = await verifySession(); ... })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1z0jdN" prefix="r2418" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8654347219301550005"],"question":[0,"What signIn function import is used in Next.js authentication with Auth.js?"],"answer":[0,"Import the signIn function from your auth.ts config file: import { signIn } from '@/auth';. In Server Actions, call it with: await signIn('credentials', formData);"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-signin-function-import-is-used-in-next-js-authentication-with-auth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-signin-function-import-is-used-in-next-js-authentication-with-auth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-signin-function-import-is-used-in-next-js-authentication-with-auth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What signIn function import is used in Next.js authentication with Auth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import the signIn function from your auth.ts config file: import { signIn } from '@/auth';. In Server Actions, call it with: await signIn('credentials', formData);</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fGHqg" prefix="r2419" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8740586378803802907"],"question":[0,"What is the basic matcher configuration syntax for Next.js proxy/middleware?"],"answer":[0,"matcher: '/about' for single path, or matcher: ['/about', '/contact'] for multiple paths. All paths must start with /. Supports modifiers: * (zero or more), ? (zero or one), + (one or more)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-matcher-configuration-syntax-for-next-js-proxy-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-matcher-configuration-syntax-for-next-js-proxy-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-matcher-configuration-syntax-for-next-js-proxy-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic matcher configuration syntax for Next.js proxy/middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>matcher: '/about' for single path, or matcher: ['/about', '/contact'] for multiple paths. All paths must start with /. Supports modifiers: * (zero or more), ? (zero or one), + (one or more).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2k3SGF" prefix="r2420" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8763667637643794918"],"question":[0,"Where should environment variable secrets like AUTH_SECRET be accessed according to Next.js best practices?"],"answer":[0,"Secret keys should be stored in environment variables, but only the Data Access Layer should access process.env. This prevents secrets from spreading throughout the application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-environment-variable-secrets-like-auth-secret-be-accessed-according"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-environment-variable-secrets-like-auth-secret-be-accessed-according" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-environment-variable-secrets-like-auth-secret-be-accessed-according" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should environment variable secrets like AUTH_SECRET be accessed according to Next.js best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Secret keys should be stored in environment variables, but only the Data Access Layer should access process.env. This prevents secrets from spreading throughout the application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2i4tDS" prefix="r2421" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9783053665575415588"],"question":[0,"What does the httpOnly cookie attribute do in Next.js?"],"answer":[0,"httpOnly restricts the cookie to HTTP requests, preventing client-side JavaScript access, which mitigates the risk of cross-site scripting (XSS) attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-httponly-cookie-attribute-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-httponly-cookie-attribute-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-httponly-cookie-attribute-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the httpOnly cookie attribute do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>httpOnly restricts the cookie to HTTP requests, preventing client-side JavaScript access, which mitigates the risk of cross-site scripting (XSS) attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZotML0" prefix="r2422" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10053399567311270688"],"question":[0,"What is the required export format for a Next.js proxy/middleware file?"],"answer":[0,"The file must export either a default export or a named 'proxy' function. Multiple proxy exports from the same file are not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-export-format-for-a-next-js-proxy-middleware-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-export-format-for-a-next-js-proxy-middleware-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-export-format-for-a-next-js-proxy-middleware-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required export format for a Next.js proxy/middleware file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The file must export either a default export or a named 'proxy' function. Multiple proxy exports from the same file are not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qt5vo" prefix="r2423" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10056928822674467728"],"question":[0,"How should CredentialsSignin errors be handled in Next.js Server Actions?"],"answer":[0,"Catch AuthError instances: try { await signIn('credentials', formData); } catch (error) { if (error instanceof AuthError) { switch (error.type) { case 'CredentialsSignin': return 'Invalid credentials.'; default: return 'Something went wrong.'; } } throw error; }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-credentialssignin-errors-be-handled-in-next-js-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-credentialssignin-errors-be-handled-in-next-js-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-credentialssignin-errors-be-handled-in-next-js-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should CredentialsSignin errors be handled in Next.js Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Catch AuthError instances: try { await signIn('credentials', formData); } catch (error) { if (error instanceof AuthError) { switch (error.type) { case 'CredentialsSignin': return 'Invalid credentials.'; default: return 'Something went wrong.'; } } throw error; }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dWdC" prefix="r2424" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10352216244368909221"],"question":[0,"What W3C principle does Next.js reference for Data Transfer Objects?"],"answer":[0,"Next.js references the W3C API minimization principle, which states that APIs should work with the minimum amount of data necessary and should only return data relevant for the specific query, not everything."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-w3c-principle-does-next-js-reference-for-data-transfer-objects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-w3c-principle-does-next-js-reference-for-data-transfer-objects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-w3c-principle-does-next-js-reference-for-data-transfer-objects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What W3C principle does Next.js reference for Data Transfer Objects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js references the W3C API minimization principle, which states that APIs should work with the minimum amount of data necessary and should only return data relevant for the specific query, not everything.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zw2409" prefix="r2425" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10699490271111426555"],"question":[0,"What pattern determines protected routes in Next.js authentication middleware?"],"answer":[0,"Use isLoggedIn = !!auth?.user to verify session exists, and isOnDashboard = nextUrl.pathname.startsWith('/dashboard') to identify protected paths. Return true in authorized callback to allow access; false redirects to login."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-pattern-determines-protected-routes-in-next-js-authentication-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-pattern-determines-protected-routes-in-next-js-authentication-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-pattern-determines-protected-routes-in-next-js-authentication-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What pattern determines protected routes in Next.js authentication middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use isLoggedIn = !!auth?.user to verify session exists, and isOnDashboard = nextUrl.pathname.startsWith('/dashboard') to identify protected paths. Return true in authorized callback to allow access; false redirects to login.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1O6eEW" prefix="r2426" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11352477256798936065"],"question":[0,"What are the 'has' and 'missing' options in Next.js matcher configuration?"],"answer":[0,"The 'has' option specifies conditions based on the presence of specific request elements (headers, query parameters, or cookies), while 'missing' focuses on conditions where certain request elements are absent. Both require a 'type' field (header, cookie, host, or query) and a 'key' field."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-has-and-missing-options-in-next-js-matcher-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-has-and-missing-options-in-next-js-matcher-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-has-and-missing-options-in-next-js-matcher-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the 'has' and 'missing' options in Next.js matcher configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'has' option specifies conditions based on the presence of specific request elements (headers, query parameters, or cookies), while 'missing' focuses on conditions where certain request elements are absent. Both require a 'type' field (header, cookie, host, or query) and a 'key' field.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jwt4C" prefix="r2427" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11780804637544924587"],"question":[0,"Where should cookies be set according to Next.js authentication best practices?"],"answer":[0,"Cookies should be set on the server to prevent client-side tampering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-cookies-be-set-according-to-next-js-authentication-best-practices"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-cookies-be-set-according-to-next-js-authentication-best-practices" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-cookies-be-set-according-to-next-js-authentication-best-practices" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should cookies be set according to Next.js authentication best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cookies should be set on the server to prevent client-side tampering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="swd7V" prefix="r2428" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11838425118274926109"],"question":[0,"What matcher pattern excludes Next.js internal files while protecting routes?"],"answer":[0,"matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)'] - matches all request paths except those starting with api, _next/static, _next/image, and files ending in .png"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-matcher-pattern-excludes-next-js-internal-files-while-protecting-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-matcher-pattern-excludes-next-js-internal-files-while-protecting-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-matcher-pattern-excludes-next-js-internal-files-while-protecting-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What matcher pattern excludes Next.js internal files while protecting routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>matcher: ['/((?!api|_next/static|_next/image|.<em>.png$).</em>)'] - matches all request paths except those starting with api, _next/static, _next/image, and files ending in .png</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJAB2h" prefix="r2429" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12218916263330422051"],"question":[0,"What does the useActionState hook provide for authentication forms in Next.js?"],"answer":[0,"useActionState exposes a pending boolean that can be used to show a loading indicator or disable the submit button while the action is being executed, and handles form errors and the form's pending state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-useactionstate-hook-provide-for-authentication-forms-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-useactionstate-hook-provide-for-authentication-forms-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-useactionstate-hook-provide-for-authentication-forms-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the useActionState hook provide for authentication forms in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState exposes a pending boolean that can be used to show a loading indicator or disable the submit button while the action is being executed, and handles form errors and the form's pending state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="236HFl" prefix="r2430" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12728560196309249895"],"question":[0,"Where should the proxy/middleware file be located in a Next.js project?"],"answer":[0,"The proxy.ts or proxy.js file should be in the project root or src directory, at the same level as pages or app directories."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-proxy-middleware-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-proxy-middleware-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-proxy-middleware-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the proxy/middleware file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The proxy.ts or proxy.js file should be in the project root or src directory, at the same level as pages or app directories.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzTQcW" prefix="r2431" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13190777608285967107"],"question":[0,"What schema validation library does Next.js officially recommend for form validation?"],"answer":[0,"Next.js recommends Zod for server-side form validation with Server Actions. Zod is featured exclusively in the official documentation, while Yup is mentioned as an alternative but not demonstrated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-schema-validation-library-does-next-js-officially-recommend-for-form-valida"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-schema-validation-library-does-next-js-officially-recommend-for-form-valida" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-schema-validation-library-does-next-js-officially-recommend-for-form-valida" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What schema validation library does Next.js officially recommend for form validation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends Zod for server-side form validation with Server Actions. Zod is featured exclusively in the official documentation, while Yup is mentioned as an alternative but not demonstrated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dlM6P" prefix="r2432" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14174141215740472615"],"question":[0,"What is the auth.config.ts file used for in Next.js authentication?"],"answer":[0,"auth.config.ts contains the NextAuth configuration object (authConfig) which includes settings like pages.signIn for custom login page, and the authorized callback for request authorization checks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-auth-config-ts-file-used-for-in-next-js-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-auth-config-ts-file-used-for-in-next-js-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-auth-config-ts-file-used-for-in-next-js-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the auth.config.ts file used for in Next.js authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>auth.config.ts contains the NextAuth configuration object (authConfig) which includes settings like pages.signIn for custom login page, and the authorized callback for request authorization checks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cOcb" prefix="r2433" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14225402959963344166"],"question":[0,"What is the official Next.js definition of Session Management?"],"answer":[0,"Session Management tracks the user's auth state across requests. It involves creating, storing, refreshing, and deleting sessions or tokens."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-official-next-js-definition-of-session-management"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-official-next-js-definition-of-session-management" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-official-next-js-definition-of-session-management" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the official Next.js definition of Session Management?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Session Management tracks the user's auth state across requests. It involves creating, storing, refreshing, and deleting sessions or tokens.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13jqf1" prefix="r2434" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14726354185253918849"],"question":[0,"When was Node.js runtime support for Next.js Middleware made stable?"],"answer":[0,"Node.js runtime support for Middleware became stable in Next.js v15.5.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-node-js-runtime-support-for-next-js-middleware-made-stable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-node-js-runtime-support-for-next-js-middleware-made-stable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-node-js-runtime-support-for-next-js-middleware-made-stable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was Node.js runtime support for Next.js Middleware made stable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js runtime support for Middleware became stable in Next.js v15.5.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11RRxg" prefix="r2435" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14813920811639051080"],"question":[0,"Why can't bcrypt be used directly in Next.js Proxy/Middleware?"],"answer":[0,"bcrypt requires a separate file because it relies on Node.js APIs not available in Next.js Proxy/Middleware (which by default runs on the Edge Runtime)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-can-t-bcrypt-be-used-directly-in-next-js-proxy-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-can-t-bcrypt-be-used-directly-in-next-js-proxy-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-can-t-bcrypt-be-used-directly-in-next-js-proxy-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why can't bcrypt be used directly in Next.js Proxy/Middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>bcrypt requires a separate file because it relies on Node.js APIs not available in Next.js Proxy/Middleware (which by default runs on the Edge Runtime).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NulIm" prefix="r2436" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14984424230108101406"],"question":[0,"What is the Data Access Layer (DAL) in Next.js authentication context?"],"answer":[0,"A DAL is an internal library that controls how and when data is fetched, and what gets passed to your render context. It should only run on the server, perform authorization checks, and return safe, minimal Data Transfer Objects (DTOs)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-data-access-layer-dal-in-next-js-authentication-context"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-data-access-layer-dal-in-next-js-authentication-context" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-data-access-layer-dal-in-next-js-authentication-context" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Data Access Layer (DAL) in Next.js authentication context?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A DAL is an internal library that controls how and when data is fetched, and what gets passed to your render context. It should only run on the server, perform authorization checks, and return safe, minimal Data Transfer Objects (DTOs).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB54kE" prefix="r2437" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15021297917461718994"],"question":[0,"What security considerations apply to Next.js Route Handlers?"],"answer":[0,"Route Handlers should be treated with the same security considerations as public-facing API endpoints. First verify an active session exists, then check if the logged-in user has the appropriate role (like 'admin') to access the Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-considerations-apply-to-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-considerations-apply-to-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-considerations-apply-to-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security considerations apply to Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers should be treated with the same security considerations as public-facing API endpoints. First verify an active session exists, then check if the logged-in user has the appropriate role (like 'admin') to access the Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="authentication-implementation-layers" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Authentication > Implementation Layers</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 37 questions </span> </div> <div class="space-y-4"> <astro-island uid="29e6uv" prefix="r2438" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1627387751811972991"],"question":[0,"Is cookies() a synchronous or asynchronous function in Next.js?"],"answer":[0,"cookies() is an async function that returns a promise. Usage requires `await` or React's `use()` hook."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"is-cookies-a-synchronous-or-asynchronous-function-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-cookies-a-synchronous-or-asynchronous-function-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-cookies-a-synchronous-or-asynchronous-function-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is cookies() a synchronous or asynchronous function in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies() is an async function that returns a promise. Usage requires <code>await</code> or React's <code>use()</code> hook.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gFgLD" prefix="r2439" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3082052521705542254"],"question":[0,"Where should Server Actions be called from according to Next.js security best practices?"],"answer":[0,"Server Actions always execute on the server and provide a secure environment for handling authentication logic. They should treat Server Actions with the same security considerations as public-facing API endpoints and verify if the user is allowed to perform a mutation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-server-actions-be-called-from-according-to-next-js-security-best-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-server-actions-be-called-from-according-to-next-js-security-best-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-server-actions-be-called-from-according-to-next-js-security-best-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should Server Actions be called from according to Next.js security best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions always execute on the server and provide a secure environment for handling authentication logic. They should treat Server Actions with the same security considerations as public-facing API endpoints and verify if the user is allowed to perform a mutation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="evuXB" prefix="r2440" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3577071830389931343"],"question":[0,"How are closed-over variables in Server Actions protected in Next.js?"],"answer":[0,"In Next.js 14+, closed-over variables in Server Actions are encrypted with the action ID before client transmission. A private key generated during build ensures each Server Action can only be invoked for a specific build. The .bind() method provides opt-out encryption for performance, but closed variables via this method remain unencrypted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-closed-over-variables-in-server-actions-protected-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-closed-over-variables-in-server-actions-protected-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-closed-over-variables-in-server-actions-protected-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are closed-over variables in Server Actions protected in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 14+, closed-over variables in Server Actions are encrypted with the action ID before client transmission. A private key generated during build ensures each Server Action can only be invoked for a specific build. The .bind() method provides opt-out encryption for performance, but closed variables via this method remain unencrypted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ossS6" prefix="r2441" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3779128808560485273"],"question":[0,"What package should be used to prevent server-only code from being imported in Client Components?"],"answer":[0,"Import the 'server-only' package at the start of modules containing server-only code: `import 'server-only'`. This causes a build error if the module is imported in a client environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-should-be-used-to-prevent-server-only-code-from-being-imported-in-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-should-be-used-to-prevent-server-only-code-from-being-imported-in-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-should-be-used-to-prevent-server-only-code-from-being-imported-in-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package should be used to prevent server-only code from being imported in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import the 'server-only' package at the start of modules containing server-only code: <code>import 'server-only'</code>. This causes a build error if the module is imported in a client environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2e9IsL" prefix="r2442" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4045693876938736008"],"question":[0,"What is a key limitation of stateless session approaches like iron-session?"],"answer":[0,"Sessions cannot be instantly invalidated (you cannot 'disconnect this customer') as there is typically no state stored about sessions on the server by default. However, in most applications, the first step upon receiving an authenticated request is to validate the user and their permissions in the database."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vvo/iron-session"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-key-limitation-of-stateless-session-approaches-like-iron-session"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-key-limitation-of-stateless-session-approaches-like-iron-session" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-key-limitation-of-stateless-session-approaches-like-iron-session" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a key limitation of stateless session approaches like iron-session?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Sessions cannot be instantly invalidated (you cannot 'disconnect this customer') as there is typically no state stored about sessions on the server by default. However, in most applications, the first step upon receiving an authenticated request is to validate the user and their permissions in the database.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vvo/iron-session" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FMXWO" prefix="r2443" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4339413734996057979"],"question":[0,"What are the three core concepts that Next.js authentication is built upon?"],"answer":[0,"Next.js authentication is built on three core concepts: 1) Authentication - verifies if the user is who they say they are, requiring proof of identity such as username and password, 2) Session Management - tracks the user's authenticated state across multiple requests, and 3) Authorization - decides what routes and data the user can access."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-core-concepts-that-next-js-authentication-is-built-upon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-core-concepts-that-next-js-authentication-is-built-upon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-core-concepts-that-next-js-authentication-is-built-upon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three core concepts that Next.js authentication is built upon?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js authentication is built on three core concepts: 1) Authentication - verifies if the user is who they say they are, requiring proof of identity such as username and password, 2) Session Management - tracks the user's authenticated state across multiple requests, and 3) Authorization - decides what routes and data the user can access.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tblgT" prefix="r2444" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4634849395341538821"],"question":[0,"What are the constraints for middleware matcher patterns in Next.js?"],"answer":[0,"Matcher patterns must start with '/'. They support: named parameters ('/about/:path' matches '/about/a' but not '/about/a/c'), parameter modifiers ('*' for zero or more, '?' for zero or one, '+' for one or more), regex patterns in parentheses ('/about/(.*)' equals '/about/:path*'), and are anchored to path start ('/about' matches '/about' and '/about/team' but not '/blog/about')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-constraints-for-middleware-matcher-patterns-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-constraints-for-middleware-matcher-patterns-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-constraints-for-middleware-matcher-patterns-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the constraints for middleware matcher patterns in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Matcher patterns must start with '/'. They support: named parameters ('/about/:path' matches '/about/a' but not '/about/a/c'), parameter modifiers ('<em>' for zero or more, '?' for zero or one, '+' for one or more), regex patterns in parentheses ('/about/(.</em>)' equals '/about/:path*'), and are anchored to path start ('/about' matches '/about' and '/about/team' but not '/blog/about').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1MD7vd" prefix="r2445" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4653647522512422682"],"question":[0,"What is the difference between returning a 401 and 403 status code in Next.js Route Handlers?"],"answer":[0,"A 401 (Unauthorized) status is returned when a user is not authenticated (no session exists), while a 403 (Forbidden) status is returned when a user is authenticated but does not have the right permissions (e.g., not an admin)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-returning-a-401-and-403-status-code-in-next-js-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-returning-a-401-and-403-status-code-in-next-js-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-returning-a-401-and-403-status-code-in-next-js-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between returning a 401 and 403 status code in Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A 401 (Unauthorized) status is returned when a user is not authenticated (no session exists), while a 403 (Forbidden) status is returned when a user is authenticated but does not have the right permissions (e.g., not an admin).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2bhzwo" prefix="r2446" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4839020652917617472"],"question":[0,"What are the three recommended layers for implementing authentication protection in Next.js?"],"answer":[0,"Next.js recommends protecting your application at three layers: 1) Data Access Layer - adding authentication checks directly in Data Access Layer functions, 2) Route level - checking authentication in page components, and 3) UI elements - hiding sensitive components when users aren't authenticated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-recommended-layers-for-implementing-authentication-protection"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-recommended-layers-for-implementing-authentication-protection" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-recommended-layers-for-implementing-authentication-protection" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three recommended layers for implementing authentication protection in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends protecting your application at three layers: 1) Data Access Layer - adding authentication checks directly in Data Access Layer functions, 2) Route level - checking authentication in page components, and 3) UI elements - hiding sensitive components when users aren't authenticated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ucjlm" prefix="r2447" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4886304893015386404"],"question":[0,"Can middleware be used as the sole authentication mechanism in Next.js?"],"answer":[0,"No. The documentation explicitly warns: 'Middleware should not be your only line of defense in protecting your data.' Middleware is recommended for optimistic checks but should not be relied upon as the sole security mechanism."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"can-middleware-be-used-as-the-sole-authentication-mechanism-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-middleware-be-used-as-the-sole-authentication-mechanism-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-middleware-be-used-as-the-sole-authentication-mechanism-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can middleware be used as the sole authentication mechanism in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The documentation explicitly warns: 'Middleware should not be your only line of defense in protecting your data.' Middleware is recommended for optimistic checks but should not be relied upon as the sole security mechanism.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24fxYK" prefix="r2448" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5257771841024495951"],"question":[0,"What is the exact import path for the cookies() API in Next.js?"],"answer":[0,"The cookies() API is imported from 'next/headers': `import { cookies } from 'next/headers'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-import-path-for-the-cookies-api-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-import-path-for-the-cookies-api-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-import-path-for-the-cookies-api-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact import path for the cookies() API in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies() API is imported from 'next/headers': <code>import { cookies } from 'next/headers'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZlbL2F" prefix="r2449" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5344148559627451851"],"question":[0,"What are the two types of authorization checks recommended in Next.js?"],"answer":[0,"Next.js recommends two types: 1) Optimistic Checks (via Middleware) - read only from cookies, avoid database queries, used for quick UI decisions and pre-filtering, should NOT be the sole security mechanism, and 2) Secure Checks (via Data Access Layer) - query the database to verify session validity, performed closest to data sources."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-types-of-authorization-checks-recommended-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-types-of-authorization-checks-recommended-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-types-of-authorization-checks-recommended-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two types of authorization checks recommended in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends two types: 1) Optimistic Checks (via Middleware) - read only from cookies, avoid database queries, used for quick UI decisions and pre-filtering, should NOT be the sole security mechanism, and 2) Secure Checks (via Data Access Layer) - query the database to verify session validity, performed closest to data sources.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NFDkQ" prefix="r2450" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5981629417571638901"],"question":[0,"What CSRF protection mechanisms do Next.js Server Actions use?"],"answer":[0,"Server Actions use POST-only requests and compare the Origin header against Host/X-Forwarded-Host. Mismatch rejection prevents invocation on different hosts. Same-Site cookies provide additional browser-level protection. However, HTML sanitization is crucial since CSRF tokens aren't implemented."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-csrf-protection-mechanisms-do-next-js-server-actions-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-csrf-protection-mechanisms-do-next-js-server-actions-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-csrf-protection-mechanisms-do-next-js-server-actions-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSRF protection mechanisms do Next.js Server Actions use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions use POST-only requests and compare the Origin header against Host/X-Forwarded-Host. Mismatch rejection prevents invocation on different hosts. Same-Site cookies provide additional browser-level protection. However, HTML sanitization is crucial since CSRF tokens aren't implemented.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2h6iD9" prefix="r2451" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6057471794091816237"],"question":[0,"What configuration enables React's experimental taint APIs in Next.js?"],"answer":[0,"Set `experimental: { taint: true }` in next.config.js to enable experimental_taintObjectReference and experimental_taintUniqueValue APIs. This also enables the React experimental channel for the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-enables-react-s-experimental-taint-apis-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-enables-react-s-experimental-taint-apis-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-enables-react-s-experimental-taint-apis-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration enables React's experimental taint APIs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>experimental: { taint: true }</code> in next.config.js to enable experimental_taintObjectReference and experimental_taintUniqueValue APIs. This also enables the React experimental channel for the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgE6dQ" prefix="r2452" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6968803162698673580"],"question":[0,"Where must the middleware file be placed in a Next.js project?"],"answer":[0,"The middleware.ts or middleware.js file must be located in the project root or inside the src directory at the same level as pages or app. If custom pageExtensions are configured (e.g., .page.ts), name the file accordingly as middleware.page.ts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-middleware-file-be-placed-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-middleware-file-be-placed-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-middleware-file-be-placed-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the middleware file be placed in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware.ts or middleware.js file must be located in the project root or inside the src directory at the same level as pages or app. If custom pageExtensions are configured (e.g., .page.ts), name the file accordingly as middleware.page.ts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CEzQP" prefix="r2453" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7024462883575548978"],"question":[0,"When did Node.js runtime support for middleware become stable in Next.js?"],"answer":[0,"Node.js runtime support for middleware became stable in Next.js 15.5. It was introduced experimentally in 15.2 and tested extensively on production applications before stabilization. You can enable it with: `export const config = { runtime: 'nodejs' };`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-node-js-runtime-support-for-middleware-become-stable-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-node-js-runtime-support-for-middleware-become-stable-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-node-js-runtime-support-for-middleware-become-stable-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did Node.js runtime support for middleware become stable in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js runtime support for middleware became stable in Next.js 15.5. It was introduced experimentally in 15.2 and tested extensively on production applications before stabilization. You can enable it with: <code>export const config = { runtime: 'nodejs' };</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZejrFd" prefix="r2454" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7686235501217167739"],"question":[0,"What authentication libraries does Next.js recommend for stateless session management?"],"answer":[0,"Next.js recommends using Jose (compatible with Edge Runtime) for JWT-based sessions, or iron-session for cookie-based stateless sessions. Jose is specifically recommended because jsonwebtoken cannot run on the Edge environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-authentication-libraries-does-next-js-recommend-for-stateless-session-manag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-authentication-libraries-does-next-js-recommend-for-stateless-session-manag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-authentication-libraries-does-next-js-recommend-for-stateless-session-manag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What authentication libraries does Next.js recommend for stateless session management?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using Jose (compatible with Edge Runtime) for JWT-based sessions, or iron-session for cookie-based stateless sessions. Jose is specifically recommended because jsonwebtoken cannot run on the Edge environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wOT9e" prefix="r2455" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7850240871025062278"],"question":[0,"What are the recommended password validation requirements in Next.js authentication examples?"],"answer":[0,"Next.js examples show minimum 8 characters for password length and minimum 2 characters for name length. The pattern includes at least one letter, one number, and one special character for passwords."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-recommended-password-validation-requirements-in-next-js-authenticat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-recommended-password-validation-requirements-in-next-js-authenticat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-recommended-password-validation-requirements-in-next-js-authenticat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the recommended password validation requirements in Next.js authentication examples?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js examples show minimum 8 characters for password length and minimum 2 characters for name length. The pattern includes at least one letter, one number, and one special character for passwords.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrDNEj" prefix="r2456" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8008920834696817027"],"question":[0,"What is the recommended default session expiration time in Next.js authentication examples?"],"answer":[0,"The Next.js documentation examples use '7d' (7 days) as the recommended default session expiration time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-default-session-expiration-time-in-next-js-authenticatio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-default-session-expiration-time-in-next-js-authenticatio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-default-session-expiration-time-in-next-js-authenticatio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended default session expiration time in Next.js authentication examples?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Next.js documentation examples use '7d' (7 days) as the recommended default session expiration time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wFOuP" prefix="r2457" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8634533788872966128"],"question":[0,"Should taint APIs be relied upon as the primary security mechanism in Next.js?"],"answer":[0,"No. The documentation warns: 'Do not rely on the taint API as your only mechanism to prevent exposing sensitive data to the client.' Tainting doesn't block every possible derived value (e.g., uppercasing a tainted string creates an untainted value). It should be an additional layer of protection on top of the Data Access Layer."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"should-taint-apis-be-relied-upon-as-the-primary-security-mechanism-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-taint-apis-be-relied-upon-as-the-primary-security-mechanism-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-taint-apis-be-relied-upon-as-the-primary-security-mechanism-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should taint APIs be relied upon as the primary security mechanism in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The documentation warns: 'Do not rely on the taint API as your only mechanism to prevent exposing sensitive data to the client.' Tainting doesn't block every possible derived value (e.g., uppercasing a tainted string creates an untainted value). It should be an additional layer of protection on top of the Data Access Layer.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24CyQu" prefix="r2458" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9973633813231958810"],"question":[0,"What is the purpose of Data Transfer Objects (DTOs) in Next.js authentication?"],"answer":[0,"DTOs return only necessary, safe fields from the Data Access Layer to prevent exposing sensitive data. They should implement authorization-aware logic with conditional field inclusion based on permission checks (e.g., only exposing phone numbers to admins or team members). DTOs ensure all data requests are secure and consistent."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-data-transfer-objects-dtos-in-next-js-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-data-transfer-objects-dtos-in-next-js-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-data-transfer-objects-dtos-in-next-js-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of Data Transfer Objects (DTOs) in Next.js authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>DTOs return only necessary, safe fields from the Data Access Layer to prevent exposing sensitive data. They should implement authorization-aware logic with conditional field inclusion based on permission checks (e.g., only exposing phone numbers to admins or team members). DTOs ensure all data requests are secure and consistent.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hjUAU" prefix="r2459" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10384511836205879211"],"question":[0,"Can React Context be used for sharing authentication data between Server and Client Components?"],"answer":[0,"React Context is not supported in Server Components, restricting data flow. Child Server Components render before context providers and lack session access. You should use the taintUniqueValue API to prevent sensitive session data from being exposed to the client when sharing data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"can-react-context-be-used-for-sharing-authentication-data-between-server-and-cli"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-react-context-be-used-for-sharing-authentication-data-between-server-and-cli" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-react-context-be-used-for-sharing-authentication-data-between-server-and-cli" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can React Context be used for sharing authentication data between Server and Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React Context is not supported in Server Components, restricting data flow. Child Server Components render before context providers and lack session access. You should use the taintUniqueValue API to prevent sensitive session data from being exposed to the client when sharing data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hSxei" prefix="r2460" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10495430905731711284"],"question":[0,"How many bcrypt hash rounds does Next.js recommend for password hashing?"],"answer":[0,"Next.js documentation recommends using 10 rounds when hashing passwords with bcrypt: `await bcrypt.hash(password, 10)`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-bcrypt-hash-rounds-does-next-js-recommend-for-password-hashing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-bcrypt-hash-rounds-does-next-js-recommend-for-password-hashing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-bcrypt-hash-rounds-does-next-js-recommend-for-password-hashing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many bcrypt hash rounds does Next.js recommend for password hashing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js documentation recommends using 10 rounds when hashing passwords with bcrypt: <code>await bcrypt.hash(password, 10)</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2qlgBr" prefix="r2461" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11028039605292780113"],"question":[0,"Where can the cookies() API be used to read and write cookies in Next.js?"],"answer":[0,"The cookies() API can read cookies in Server Components (read-only), Server Actions (read and write), and Route Handlers (read and write). HTTP does not allow setting cookies after streaming starts, so you must use .set() in a Server Action or Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-the-cookies-api-be-used-to-read-and-write-cookies-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-the-cookies-api-be-used-to-read-and-write-cookies-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-the-cookies-api-be-used-to-read-and-write-cookies-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can the cookies() API be used to read and write cookies in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies() API can read cookies in Server Components (read-only), Server Actions (read and write), and Route Handlers (read and write). HTTP does not allow setting cookies after streaming starts, so you must use .set() in a Server Action or Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oqOMs" prefix="r2462" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11031034370358514244"],"question":[0,"What Web Crypto APIs are available in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime provides access to `crypto`, `CryptoKey`, and `SubtleCrypto` for cryptographic operations, along with comprehensive network APIs (fetch, Request, Response, Headers), encoding APIs (atob, btoa, TextEncoder, TextDecoder), and Stream APIs (ReadableStream, WritableStream, TransformStream)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-web-crypto-apis-are-available-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-web-crypto-apis-are-available-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-web-crypto-apis-are-available-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Web Crypto APIs are available in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime provides access to <code>crypto</code>, <code>CryptoKey</code>, and <code>SubtleCrypto</code> for cryptographic operations, along with comprehensive network APIs (fetch, Request, Response, Headers), encoding APIs (atob, btoa, TextEncoder, TextDecoder), and Stream APIs (ReadableStream, WritableStream, TransformStream).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hFAGR" prefix="r2463" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12289428023721750845"],"question":[0,"What security consideration exists with the ?_rsc parameter in Next.js?"],"answer":[0,"Client navigations use `?_rsc=...` as a cache breaker parameter during prefetch operations to prevent accidental caching of React Server Component (RSC) payloads. Middleware runs on both user clicks and prefetches with this parameter. Attackers can potentially exploit this by sending requests with the RSC header without using a cache-buster."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-consideration-exists-with-the-rsc-parameter-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-consideration-exists-with-the-rsc-parameter-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-consideration-exists-with-the-rsc-parameter-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security consideration exists with the ?_rsc parameter in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Client navigations use <code>?_rsc=...</code> as a cache breaker parameter during prefetch operations to prevent accidental caching of React Server Component (RSC) payloads. Middleware runs on both user clicks and prefetches with this parameter. Attackers can potentially exploit this by sending requests with the RSC header without using a cache-buster.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Uu0qe" prefix="r2464" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12350979251655801261"],"question":[0,"Where should environment variables containing secrets be accessed in a Next.js application?"],"answer":[0,"Secret keys should be stored in environment variables, but only the Data Access Layer should access `process.env`. This containment prevents secrets from spreading throughout the application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-environment-variables-containing-secrets-be-accessed-in-a-next-js-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-environment-variables-containing-secrets-be-accessed-in-a-next-js-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-environment-variables-containing-secrets-be-accessed-in-a-next-js-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should environment variables containing secrets be accessed in a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Secret keys should be stored in environment variables, but only the Data Access Layer should access <code>process.env</code>. This containment prevents secrets from spreading throughout the application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UcOsQ" prefix="r2465" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12522084994687139868"],"question":[0,"What is the Data Access Layer (DAL) pattern in Next.js authentication?"],"answer":[0,"The Data Access Layer (DAL) is a centralized internal library that controls how and when data is fetched. It should include a verifySession() function that checks session validity, use React's cache() API to memoize results during a render pass, and return only verified user information needed for subsequent requests. The DAL ensures authorization checks happen wherever data-fetching functions are called."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-data-access-layer-dal-pattern-in-next-js-authentication"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-data-access-layer-dal-pattern-in-next-js-authentication" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-data-access-layer-dal-pattern-in-next-js-authentication" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Data Access Layer (DAL) pattern in Next.js authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Data Access Layer (DAL) is a centralized internal library that controls how and when data is fetched. It should include a verifySession() function that checks session validity, use React's cache() API to memoize results during a render pass, and return only verified user information needed for subsequent requests. The DAL ensures authorization checks happen wherever data-fetching functions are called.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGUnIa" prefix="r2466" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12567024492450323945"],"question":[0,"What is CVE-2025-29927 and what Next.js versions are affected?"],"answer":[0,"CVE-2025-29927 is a critical (9.1 CVSS) Next.js middleware authorization bypass vulnerability that allows attackers to bypass authorization checks by including the x-middleware-subrequest header in HTTP requests. It affects Next.js versions 11.1.4–13.5.6 and versions prior to 14.2.25 (for 14.x) and 15.2.3 (for 15.x). Self-hosted applications using middleware are vulnerable, though Vercel-hosted deployments are automatically protected."],"confidence":[0,0.95],"sources":[1,[[0,"https://securitylabs.datadoghq.com/articles/nextjs-middleware-auth-bypass/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-cve-2025-29927-and-what-next-js-versions-are-affected"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-cve-2025-29927-and-what-next-js-versions-are-affected" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-cve-2025-29927-and-what-next-js-versions-are-affected" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is CVE-2025-29927 and what Next.js versions are affected?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CVE-2025-29927 is a critical (9.1 CVSS) Next.js middleware authorization bypass vulnerability that allows attackers to bypass authorization checks by including the x-middleware-subrequest header in HTTP requests. It affects Next.js versions 11.1.4–13.5.6 and versions prior to 14.2.25 (for 14.x) and 15.2.3 (for 15.x). Self-hosted applications using middleware are vulnerable, though Vercel-hosted deployments are automatically protected.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://securitylabs.datadoghq.com/articles/nextjs-middleware-auth-bypass/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>securitylabs.datadoghq.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zl0RE7" prefix="r2467" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12757545026933260008"],"question":[0,"What cookie options are supported by the cookies().set() method in Next.js?"],"answer":[0,"Supported options include: name (String), value (String), expires (Date), maxAge (Number - seconds), domain (String), path (String, default: '/'), secure (Boolean - HTTPS-only), httpOnly (Boolean - prevent client access), sameSite (Boolean | 'lax' | 'strict' | 'none'), priority (String - 'low', 'medium', or 'high'), and partitioned (Boolean - CHIPS support)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-options-are-supported-by-the-cookies-set-method-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-options-are-supported-by-the-cookies-set-method-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-options-are-supported-by-the-cookies-set-method-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie options are supported by the cookies().set() method in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Supported options include: name (String), value (String), expires (Date), maxAge (Number - seconds), domain (String), path (String, default: '/'), secure (Boolean - HTTPS-only), httpOnly (Boolean - prevent client access), sameSite (Boolean | 'lax' | 'strict' | 'none'), priority (String - 'low', 'medium', or 'high'), and partitioned (Boolean - CHIPS support).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vqx32" prefix="r2468" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13412166764059101314"],"question":[0,"What should session cookie payloads contain according to Next.js security guidelines?"],"answer":[0,"Session cookie payloads should contain 'minimum, unique user data' like user ID and role. They should NOT include passwords or personally identifiable information (PII)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-session-cookie-payloads-contain-according-to-next-js-security-guidel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-session-cookie-payloads-contain-according-to-next-js-security-guidel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-session-cookie-payloads-contain-according-to-next-js-security-guidel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should session cookie payloads contain according to Next.js security guidelines?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Session cookie payloads should contain 'minimum, unique user data' like user ID and role. They should NOT include passwords or personally identifiable information (PII).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2aItof" prefix="r2469" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13529788868321158866"],"question":[0,"What are the two experimental taint APIs available in Next.js for session security?"],"answer":[0,"1) experimental_taintUniqueValue - marks specific values like tokens, passwords, or keys to prevent passage to Client Components, and 2) experimental_taintObjectReference - marks entire objects to prevent passage to Client Components. Both are imported from 'react'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-experimental-taint-apis-available-in-next-js-for-session-securi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-experimental-taint-apis-available-in-next-js-for-session-securi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-experimental-taint-apis-available-in-next-js-for-session-securi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two experimental taint APIs available in Next.js for session security?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>experimental_taintUniqueValue - marks specific values like tokens, passwords, or keys to prevent passage to Client Components, and 2) experimental_taintObjectReference - marks entire objects to prevent passage to Client Components. Both are imported from 'react'.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAPy4s" prefix="r2470" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13771797935401713466"],"question":[0,"What cookie security attributes does Next.js recommend for authentication sessions?"],"answer":[0,"Next.js recommends setting cookies with: httpOnly: true (prevents client-side JavaScript access), secure: true (HTTPS-only transmission), sameSite: 'lax' (controls cross-site behavior), path: '/' (scope within domain), and an expires or maxAge value for expiration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-security-attributes-does-next-js-recommend-for-authentication-sessio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-security-attributes-does-next-js-recommend-for-authentication-sessio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-security-attributes-does-next-js-recommend-for-authentication-sessio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie security attributes does Next.js recommend for authentication sessions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends setting cookies with: httpOnly: true (prevents client-side JavaScript access), secure: true (HTTPS-only transmission), sameSite: 'lax' (controls cross-site behavior), path: '/' (scope within domain), and an expires or maxAge value for expiration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1szRPw" prefix="r2471" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13873890563641387913"],"question":[0,"What runtime does Next.js middleware use by default and what are its authentication limitations?"],"answer":[0,"Middleware uses the Edge Runtime by default, which is based on Web APIs and does not support native Node.js APIs. This means you cannot use Node.js modules like 'crypto', packages like 'jsonwebtoken', or perform filesystem operations. For JWT operations on Edge, you must use edge-compatible libraries like 'jose' instead of 'jsonwebtoken'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-does-next-js-middleware-use-by-default-and-what-are-its-authenticat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-does-next-js-middleware-use-by-default-and-what-are-its-authenticat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-does-next-js-middleware-use-by-default-and-what-are-its-authenticat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime does Next.js middleware use by default and what are its authentication limitations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware uses the Edge Runtime by default, which is based on Web APIs and does not support native Node.js APIs. This means you cannot use Node.js modules like 'crypto', packages like 'jsonwebtoken', or perform filesystem operations. For JWT operations on Edge, you must use edge-compatible libraries like 'jose' instead of 'jsonwebtoken'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMmxJK" prefix="r2472" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13948321930733273125"],"question":[0,"What JavaScript features are explicitly disabled in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime explicitly disables: eval() and dynamic function generation via new Function(), WebAssembly.compile and WebAssembly.instantiate, and direct require() calls (ES Modules required). Dynamic code evaluation statements cause runtime errors unless allowlisted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-javascript-features-are-explicitly-disabled-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-javascript-features-are-explicitly-disabled-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-javascript-features-are-explicitly-disabled-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What JavaScript features are explicitly disabled in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime explicitly disables: eval() and dynamic function generation via new Function(), WebAssembly.compile and WebAssembly.instantiate, and direct require() calls (ES Modules required). Dynamic code evaluation statements cause runtime errors unless allowlisted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2xm9n" prefix="r2473" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14016551230261202720"],"question":[0,"Why should authentication checks not rely solely on Layout components in Next.js?"],"answer":[0,"Layouts don't re-render on navigation, so auth checks shouldn't rely solely on layout logic. Additionally, returning `null` in layouts if unauthorized will not prevent nested route segments and Server Actions from being accessed. Place checks close to your data source or the component that will be conditionally rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-should-authentication-checks-not-rely-solely-on-layout-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-should-authentication-checks-not-rely-solely-on-layout-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-should-authentication-checks-not-rely-solely-on-layout-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why should authentication checks not rely solely on Layout components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layouts don't re-render on navigation, so auth checks shouldn't rely solely on layout logic. Additionally, returning <code>null</code> in layouts if unauthorized will not prevent nested route segments and Server Actions from being accessed. Place checks close to your data source or the component that will be conditionally rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZY8qDE" prefix="r2474" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14299640715130445654"],"question":[0,"What error handling behavior changes between development and production modes in Next.js?"],"answer":[0,"In production mode, React sends error hashes to clients instead of full error messages and stack traces. The hash correlates multiple errors to server logs. Development mode does not optimize for security, so always deploy production builds for production workloads."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-handling-behavior-changes-between-development-and-production-modes-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-handling-behavior-changes-between-development-and-production-modes-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-handling-behavior-changes-between-development-and-production-modes-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error handling behavior changes between development and production modes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In production mode, React sends error hashes to clients instead of full error messages and stack traces. The hash correlates multiple errors to server logs. Development mode does not optimize for security, so always deploy production builds for production workloads.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-handlers-request-processing" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Handlers > Request Processing</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 37 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1ko0Du" prefix="r2475" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2339145513806220086"],"question":[0,"What was included in the NextRequest geo object before it was removed?"],"answer":[0,"The geo object included: geo.country (country code), geo.region (region code), geo.city, geo.latitude, and geo.longitude."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/pages/api-reference/functions/next-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-included-in-the-nextrequest-geo-object-before-it-was-removed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-included-in-the-nextrequest-geo-object-before-it-was-removed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-included-in-the-nextrequest-geo-object-before-it-was-removed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was included in the NextRequest geo object before it was removed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The geo object included: geo.country (country code), geo.region (region code), geo.city, geo.latitude, and geo.longitude.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/pages/api-reference/functions/next-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2u3Mqu" prefix="r2476" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2508566232935617643"],"question":[0,"What is the default value for the path option when setting cookies?"],"answer":[0,"The default path is '/'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-path-option-when-setting-cookies"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-path-option-when-setting-cookies" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-path-option-when-setting-cookies" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the path option when setting cookies?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default path is '/'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qKR4m" prefix="r2477" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2564664889768163335"],"question":[0,"What is the default value for the preferredRegion route segment config option?"],"answer":[0,"The default value is 'auto'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-preferredregion-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-preferredregion-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-preferredregion-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the preferredRegion route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z93znY" prefix="r2478" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3064007836149129281"],"question":[0,"How do you opt into caching for a GET Route Handler?"],"answer":[0,"Use export const dynamic = 'force-static' in your Route Handler file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-opt-into-caching-for-a-get-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-opt-into-caching-for-a-get-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-opt-into-caching-for-a-get-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you opt into caching for a GET Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use export const dynamic = 'force-static' in your Route Handler file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QD9nF" prefix="r2479" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3066917669536690112"],"question":[0,"What are all the valid values for export const dynamic in Route Handlers?"],"answer":[0,"'auto' (default), 'force-dynamic', 'error', and 'force-static'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-valid-values-for-export-const-dynamic-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-valid-values-for-export-const-dynamic-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-valid-values-for-export-const-dynamic-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the valid values for export const dynamic in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' (default), 'force-dynamic', 'error', and 'force-static'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rr33d" prefix="r2480" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3555060534604762376"],"question":[0,"Can a route.js file exist at the same route segment level as a page.js file?"],"answer":[0,"No, there cannot be a route.js file at the same route segment level as page.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-a-route-js-file-exist-at-the-same-route-segment-level-as-a-page-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-a-route-js-file-exist-at-the-same-route-segment-level-as-a-page-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-a-route-js-file-exist-at-the-same-route-segment-level-as-a-page-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can a route.js file exist at the same route segment level as a page.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, there cannot be a route.js file at the same route segment level as page.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVacJf" prefix="r2481" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4131888283858089701"],"question":[0,"How do you create a JSON response with a custom status code using NextResponse?"],"answer":[0,"Use NextResponse.json(body, { status: code }). For example: NextResponse.json({ error: 'Internal Server Error' }, { status: 500 })."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-json-response-with-a-custom-status-code-using-nextresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-json-response-with-a-custom-status-code-using-nextresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-json-response-with-a-custom-status-code-using-nextresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a JSON response with a custom status code using NextResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use NextResponse.json(body, { status: code }). For example: NextResponse.json({ error: 'Internal Server Error' }, { status: 500 }).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2s9Qlh" prefix="r2482" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4166455109710077764"],"question":[0,"Can you write (set/delete) cookies in Server Components?"],"answer":[0,"No, writing cookies only works in Server Actions or Route Handlers. Reading cookies works in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-write-set-delete-cookies-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-write-set-delete-cookies-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-write-set-delete-cookies-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you write (set/delete) cookies in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, writing cookies only works in Server Actions or Route Handlers. Reading cookies works in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpRMrP" prefix="r2483" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4269035538726574935"],"question":[0,"In what version did cookies() become async?"],"answer":[0,"cookies() became async in v15.0.0-RC, with a codemod available for upgrading."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-version-did-cookies-become-async"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-version-did-cookies-become-async" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-version-did-cookies-become-async" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what version did cookies() become async?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies() became async in v15.0.0-RC, with a codemod available for upgrading.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9bTxQ" prefix="r2484" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4959212696719456015"],"question":[0,"What is the second parameter of a Route Handler function?"],"answer":[0,"The second parameter is an optional context object containing params, which is a promise that resolves to an object containing the dynamic route parameters for the current route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-second-parameter-of-a-route-handler-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-second-parameter-of-a-route-handler-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-second-parameter-of-a-route-handler-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the second parameter of a Route Handler function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The second parameter is an optional context object containing params, which is a promise that resolves to an object containing the dynamic route parameters for the current route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16yFFz" prefix="r2485" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5517159486200179206"],"question":[0,"What HTTP status code does Next.js return if an unsupported HTTP method is called on a Route Handler?"],"answer":[0,"Next.js returns a 405 Method Not Allowed response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-return-if-an-unsupported-http-method-is-calle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-return-if-an-unsupported-http-method-is-calle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-return-if-an-unsupported-http-method-is-calle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js return if an unsupported HTTP method is called on a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js returns a 405 Method Not Allowed response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1SGYhv" prefix="r2486" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6138273898224459227"],"question":[0,"Can params still be accessed synchronously in Next.js 15?"],"answer":[0,"Yes, for backwards compatibility you can still access params synchronously in Next.js 15, but this behavior will be deprecated in the future and warnings will be shown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"can-params-still-be-accessed-synchronously-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-params-still-be-accessed-synchronously-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-params-still-be-accessed-synchronously-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can params still be accessed synchronously in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, for backwards compatibility you can still access params synchronously in Next.js 15, but this behavior will be deprecated in the future and warnings will be shown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hEQ1T" prefix="r2487" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6270155069417836996"],"question":[0,"What is the default maximum duration for Route Handlers deployed on Vercel's free/Hobby plan?"],"answer":[0,"The default is 10 seconds, configurable up to 60 seconds on the Hobby plan."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-duration-for-route-handlers-deployed-on-vercel-s-fre"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-duration-for-route-handlers-deployed-on-vercel-s-fre" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-duration-for-route-handlers-deployed-on-vercel-s-fre" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum duration for Route Handlers deployed on Vercel's free/Hobby plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is 10 seconds, configurable up to 60 seconds on the Hobby plan.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1d6zuz" prefix="r2488" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6573327732413374074"],"question":[0,"Is the params property in Route Handlers synchronous or asynchronous in Next.js 15?"],"answer":[0,"In Next.js 15, params is a promise that must be awaited. In version 14 and earlier, params was synchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-params-property-in-route-handlers-synchronous-or-asynchronous-in-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-params-property-in-route-handlers-synchronous-or-asynchronous-in-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-params-property-in-route-handlers-synchronous-or-asynchronous-in-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the params property in Route Handlers synchronous or asynchronous in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, params is a promise that must be awaited. In version 14 and earlier, params was synchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1AnLui" prefix="r2489" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6788644685037674401"],"question":[0,"What is the difference between NextResponse.redirect() and NextResponse.rewrite()?"],"answer":[0,"redirect() redirects to a new URL (browser shows new URL), while rewrite() proxies to a different URL while preserving the original URL in the browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between NextResponse.redirect() and NextResponse.rewrite()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() redirects to a new URL (browser shows new URL), while rewrite() proxies to a different URL while preserving the original URL in the browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rToPB" prefix="r2490" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6881666685137378263"],"question":[0,"Can you use the 'use cache' directive directly inside a Route Handler body?"],"answer":[0,"No, 'use cache' cannot be used directly inside a Route Handler body. You must extract it to a helper function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-use-cache-directive-directly-inside-a-route-handler-body"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-use-cache-directive-directly-inside-a-route-handler-body" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-use-cache-directive-directly-inside-a-route-handler-body" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the 'use cache' directive directly inside a Route Handler body?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, 'use cache' cannot be used directly inside a Route Handler body. You must extract it to a helper function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eH6n1" prefix="r2491" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7708351797888747545"],"question":[0,"Must the revalidate value be statically analyzable?"],"answer":[0,"Yes, the revalidate value needs to be statically analyzable. For example, revalidate = 600 is valid, but revalidate = 60 * 10 is not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"must-the-revalidate-value-be-statically-analyzable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-the-revalidate-value-be-statically-analyzable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-the-revalidate-value-be-statically-analyzable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must the revalidate value be statically analyzable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the revalidate value needs to be statically analyzable. For example, revalidate = 600 is valid, but revalidate = 60 * 10 is not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJAyAz" prefix="r2492" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8108584984933685142"],"question":[0,"What methods are available on the NextResponse.cookies property?"],"answer":[0,"set(name, value), get(name), getAll(name?), has(name), and delete(name)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-nextresponse-cookies-property"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-nextresponse-cookies-property" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-nextresponse-cookies-property" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the NextResponse.cookies property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>set(name, value), get(name), getAll(name?), has(name), and delete(name).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gYxhF" prefix="r2493" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8347030738395101412"],"question":[0,"Is the HEAD method automatically generated from GET in Route Handlers?"],"answer":[0,"No, HEAD is not automatically generated. It must be explicitly defined if needed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-head-method-automatically-generated-from-get-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-head-method-automatically-generated-from-get-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-head-method-automatically-generated-from-get-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the HEAD method automatically generated from GET in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, HEAD is not automatically generated. It must be explicitly defined if needed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bFTRK" prefix="r2494" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8351922861212145229"],"question":[0,"What is the default value for the fetchCache route segment config option?"],"answer":[0,"The default value is 'auto'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-fetchcache-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-fetchcache-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-fetchcache-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the fetchCache route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2adMoe" prefix="r2495" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8625279701118915452"],"question":[0,"Can you set both status and headers in NextResponse.json()?"],"answer":[0,"Yes, the second parameter accepts both status and headers. For example: NextResponse.json({ error: 'Not Found' }, { status: 404, headers: { 'x-powered-by': 'Next.js' } })."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-both-status-and-headers-in-nextresponse-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-both-status-and-headers-in-nextresponse-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-both-status-and-headers-in-nextresponse-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set both status and headers in NextResponse.json()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the second parameter accepts both status and headers. For example: NextResponse.json({ error: 'Not Found' }, { status: 404, headers: { 'x-powered-by': 'Next.js' } }).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dArMk" prefix="r2496" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9384707994489259870"],"question":[0,"Do Route Handlers support streaming responses?"],"answer":[0,"Yes, Route Handlers have an isomorphic Web API to support both Edge and Node.js runtimes seamlessly, including support for streaming."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"do-route-handlers-support-streaming-responses"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-route-handlers-support-streaming-responses" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-route-handlers-support-streaming-responses" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Route Handlers support streaming responses?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Route Handlers have an isomorphic Web API to support both Edge and Node.js runtimes seamlessly, including support for streaming.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ezBXA" prefix="r2497" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10049600326385660964"],"question":[0,"What is the default value for the revalidate route segment config option?"],"answer":[0,"The default value is false (indefinite caching)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the revalidate route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false (indefinite caching).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zj4ghh" prefix="r2498" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10380534976437353741"],"question":[0,"Which HTTP methods can be cached in Route Handlers?"],"answer":[0,"Only GET methods can opt into caching. Other supported HTTP methods (POST, PUT, PATCH, DELETE, HEAD, OPTIONS) are not cached, even if placed alongside a cached GET method."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"which-http-methods-can-be-cached-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-http-methods-can-be-cached-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-http-methods-can-be-cached-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTTP methods can be cached in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only GET methods can opt into caching. Other supported HTTP methods (POST, PUT, PATCH, DELETE, HEAD, OPTIONS) are not cached, even if placed alongside a cached GET method.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Nzk12" prefix="r2499" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10891961592810602714"],"question":[0,"What version of Next.js introduced the cookies() function?"],"answer":[0,"The cookies() function was introduced in v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-version-of-next-js-introduced-the-cookies-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-version-of-next-js-introduced-the-cookies-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-version-of-next-js-introduced-the-cookies-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What version of Next.js introduced the cookies() function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies() function was introduced in v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hwjYg" prefix="r2500" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11477749678520814051"],"question":[0,"Were the geo and ip properties removed from NextRequest in Next.js 15?"],"answer":[0,"Yes, the geo and ip properties were removed from NextRequest in Next.js 15. Vercel users should use the geolocation and ipAddress functions from @vercel/functions instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/68379"]]],"topic":[0,"nextjs"],"slug":[0,"were-the-geo-and-ip-properties-removed-from-nextrequest-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="were-the-geo-and-ip-properties-removed-from-nextrequest-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#were-the-geo-and-ip-properties-removed-from-nextrequest-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Were the geo and ip properties removed from NextRequest in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the geo and ip properties were removed from NextRequest in Next.js 15. Vercel users should use the geolocation and ipAddress functions from @vercel/functions instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/68379" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rPvdu" prefix="r2501" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11538416852191240611"],"question":[0,"What are the valid values for export const runtime in Route Handlers?"],"answer":[0,"'nodejs' (default) and 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-export-const-runtime-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-export-const-runtime-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-export-const-runtime-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for export const runtime in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' (default) and 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13clwK" prefix="r2502" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12363837745032505479"],"question":[0,"What is the default value for the dynamic route segment config option?"],"answer":[0,"The default value is 'auto'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the dynamic route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkF8WJ" prefix="r2503" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12374842632312535184"],"question":[0,"What is the maximum duration for Route Handlers on Vercel's Pro plan?"],"answer":[0,"On the Pro plan, the default is 15 seconds, configurable up to 300 seconds (5 minutes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-duration-for-route-handlers-on-vercel-s-pro-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-duration-for-route-handlers-on-vercel-s-pro-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-duration-for-route-handlers-on-vercel-s-pro-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum duration for Route Handlers on Vercel's Pro plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On the Pro plan, the default is 15 seconds, configurable up to 300 seconds (5 minutes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14q4ee" prefix="r2504" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12466700111658169748"],"question":[0,"What runtime APIs will prevent prerendering in Route Handlers?"],"answer":[0,"Using cookies(), headers(), connection(), or any Dynamic API will prevent prerendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-apis-will-prevent-prerendering-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-apis-will-prevent-prerendering-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-apis-will-prevent-prerendering-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime APIs will prevent prerendering in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using cookies(), headers(), connection(), or any Dynamic API will prevent prerendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aFjN5" prefix="r2505" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12615592021238548229"],"question":[0,"What property on NextRequest provides an extended, parsed URL object?"],"answer":[0,"request.nextUrl provides the extended, parsed URL object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-property-on-nextrequest-provides-an-extended-parsed-url-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-property-on-nextrequest-provides-an-extended-parsed-url-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-property-on-nextrequest-provides-an-extended-parsed-url-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What property on NextRequest provides an extended, parsed URL object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>request.nextUrl provides the extended, parsed URL object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="258TnD" prefix="r2506" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12795196494355069311"],"question":[0,"What is the default value for the runtime route segment config option?"],"answer":[0,"The default runtime is 'nodejs'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the runtime route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default runtime is 'nodejs'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eqDGb" prefix="r2507" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13723439756724876922"],"question":[0,"How do you read the JSON body of a request in a Route Handler?"],"answer":[0,"Use await request.json(). For example: const data = await request.json();"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-read-the-json-body-of-a-request-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-read-the-json-body-of-a-request-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-read-the-json-body-of-a-request-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you read the JSON body of a request in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use await request.json(). For example: const data = await request.json();</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ikajd" prefix="r2508" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13746763658196885463"],"question":[0,"What happens if OPTIONS is not defined in a Route Handler?"],"answer":[0,"Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-options-is-not-defined-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-options-is-not-defined-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-options-is-not-defined-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if OPTIONS is not defined in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29tMoO" prefix="r2509" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14462658315082470216"],"question":[0,"What types of values can export const revalidate accept?"],"answer":[0,"false (default) for indefinite caching, 0 to ensure dynamic rendering, or a number in seconds to set the default revalidation frequency."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-values-can-export-const-revalidate-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-values-can-export-const-revalidate-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-values-can-export-const-revalidate-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of values can export const revalidate accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false (default) for indefinite caching, 0 to ensure dynamic rendering, or a number in seconds to set the default revalidation frequency.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7kaob" prefix="r2510" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14656356114493311131"],"question":[0,"How do you read form data from a request in a Route Handler?"],"answer":[0,"Use await request.formData(). For example: const formData = await request.formData(); const name = formData.get('name');"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-read-form-data-from-a-request-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-read-form-data-from-a-request-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-read-form-data-from-a-request-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you read form data from a request in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use await request.formData(). For example: const formData = await request.formData(); const name = formData.get('name');</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzVvq" prefix="r2511" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14661892377902226701"],"question":[0,"What does NextResponse.redirect() return?"],"answer":[0,"It produces a response that redirects to a URL. It accepts a URL object and returns a redirect response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-redirect-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-redirect-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-redirect-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.redirect() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It produces a response that redirects to a URL. It accepts a URL object and returns a redirect response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="configuration-security-server-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Configuration > Security & Server Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 36 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1BtYLu" prefix="r2512" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"20130246648236020"],"question":[0,"How does Next.js secure Server Action endpoints?"],"answer":[0,"Next.js creates encrypted, non-deterministic IDs to allow the client to reference and call the Server Action. These IDs are periodically recalculated between builds for enhanced security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-secure-server-action-endpoints"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-secure-server-action-endpoints" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-secure-server-action-endpoints" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js secure Server Action endpoints?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js creates encrypted, non-deterministic IDs to allow the client to reference and call the Server Action. These IDs are periodically recalculated between builds for enhanced security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MQeDq" prefix="r2513" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"702429220961471916"],"question":[0,"Can the Next.js Taint API guarantee prevention of secret leaks?"],"answer":[0,"No. The React team warns: 'Do not rely solely on tainting for security.' Taint does not work if you extract data fields out of an object and pass them along, and derived values (like uppercasing a tainted string) will not be tainted."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.vidocsecurity.com/blog/security-in-nextjs-14"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-next-js-taint-api-guarantee-prevention-of-secret-leaks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-next-js-taint-api-guarantee-prevention-of-secret-leaks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-next-js-taint-api-guarantee-prevention-of-secret-leaks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the Next.js Taint API guarantee prevention of secret leaks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The React team warns: 'Do not rely solely on tainting for security.' Taint does not work if you extract data fields out of an object and pass them along, and derived values (like uppercasing a tainted string) will not be tainted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.vidocsecurity.com/blog/security-in-nextjs-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.vidocsecurity.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dh4hm" prefix="r2514" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1672090909901953262"],"question":[0,"How do you disable the API Routes response size limit in Next.js?"],"answer":[0,"Export a config object in your API route with `responseLimit: false`. Example: `export const config = { api: { responseLimit: false } }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/api-routes-response-size-limit"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-disable-the-api-routes-response-size-limit-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-disable-the-api-routes-response-size-limit-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-disable-the-api-routes-response-size-limit-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you disable the API Routes response size limit in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a config object in your API route with <code>responseLimit: false</code>. Example: <code>export const config = { api: { responseLimit: false } }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/api-routes-response-size-limit" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rmyu8" prefix="r2515" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2772484359806066145"],"question":[0,"What security mechanism does Next.js use to protect Server Actions from CSRF attacks?"],"answer":[0,"Next.js compares the Origin header to the Host header. If these don't match and the origin is not in the allowedOrigins list, the request will be aborted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-mechanism-does-next-js-use-to-protect-server-actions-from-csrf-att"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-mechanism-does-next-js-use-to-protect-server-actions-from-csrf-att" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-mechanism-does-next-js-use-to-protect-server-actions-from-csrf-att" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security mechanism does Next.js use to protect Server Actions from CSRF attacks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js compares the Origin header to the Host header. If these don't match and the origin is not in the allowedOrigins list, the request will be aborted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cmPTY" prefix="r2516" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2813157526107191852"],"question":[0,"Does Next.js Server Actions allowedOrigins configuration support wildcard domains?"],"answer":[0,"Yes. Wildcard domains are supported using the asterisk (*) pattern. Example: `allowedOrigins: ['my-proxy.com', '*.my-proxy.com']`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-server-actions-allowedorigins-configuration-support-wildcard-domain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-server-actions-allowedorigins-configuration-support-wildcard-domain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-server-actions-allowedorigins-configuration-support-wildcard-domain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js Server Actions allowedOrigins configuration support wildcard domains?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Wildcard domains are supported using the asterisk (*) pattern. Example: <code>allowedOrigins: ['my-proxy.com', '*.my-proxy.com']</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rOiuX" prefix="r2517" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3630169665593302693"],"question":[0,"When multiple headers target the same path with identical keys in next.config.js, which one takes precedence?"],"answer":[0,"The last header key will override the first. Headers are evaluated in order, with later definitions overwriting earlier ones for the same path and key combination."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"when-multiple-headers-target-the-same-path-with-identical-keys-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-multiple-headers-target-the-same-path-with-identical-keys-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-multiple-headers-target-the-same-path-with-identical-keys-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When multiple headers target the same path with identical keys in next.config.js, which one takes precedence?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The last header key will override the first. Headers are evaluated in order, with later definitions overwriting earlier ones for the same path and key combination.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ez1S7" prefix="r2518" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3695689794337253346"],"question":[0,"What is the security risk of using NEXT_PUBLIC_ prefix for environment variables?"],"answer":[0,"Variables with NEXT_PUBLIC_ prefix are exposed to the client-side and inlined into the JavaScript bundle at build time. Never use this prefix for sensitive information like API keys, database credentials, or secrets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-security-risk-of-using-next-public-prefix-for-environment-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-security-risk-of-using-next-public-prefix-for-environment-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-security-risk-of-using-next-public-prefix-for-environment-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the security risk of using NEXT_PUBLIC_ prefix for environment variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Variables with NEXT_PUBLIC_ prefix are exposed to the client-side and inlined into the JavaScript bundle at build time. Never use this prefix for sensitive information like API keys, database credentials, or secrets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oSScK" prefix="r2519" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3870876694424273663"],"question":[0,"What are the two React Taint APIs available in Next.js?"],"answer":[0,"experimental_taintObjectReference (for data objects) and experimental_taintUniqueValue (for specific values). These prevent accidental exposure of sensitive data to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-react-taint-apis-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-react-taint-apis-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-react-taint-apis-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two React Taint APIs available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>experimental_taintObjectReference (for data objects) and experimental_taintUniqueValue (for specific values). These prevent accidental exposure of sensitive data to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1TFyXy" prefix="r2520" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4069313631394399104"],"question":[0,"What type values are supported in the 'has' and 'missing' fields for Next.js headers configuration?"],"answer":[0,"Four type values: 'header', 'cookie', 'host', and 'query'. These allow conditional matching based on HTTP headers, cookies, host, or query parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-values-are-supported-in-the-has-and-missing-fields-for-next-js-headers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-values-are-supported-in-the-has-and-missing-fields-for-next-js-headers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-values-are-supported-in-the-has-and-missing-fields-for-next-js-headers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type values are supported in the 'has' and 'missing' fields for Next.js headers configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Four type values: 'header', 'cookie', 'host', and 'query'. These allow conditional matching based on HTTP headers, cookies, host, or query parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tTm8c" prefix="r2521" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5058648325958077773"],"question":[0,"How do you disable the 'x-powered-by' header in Next.js?"],"answer":[0,"Set `poweredByHeader: false` in next.config.js. This removes the header from response headers to minimize information disclosure."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-disable-the-x-powered-by-header-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-disable-the-x-powered-by-header-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-disable-the-x-powered-by-header-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you disable the 'x-powered-by' header in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>poweredByHeader: false</code> in next.config.js. This removes the header from response headers to minimize information disclosure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BHje2" prefix="r2522" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5095797581935086615"],"question":[0,"What three hash algorithms are supported for Next.js experimental SRI (Subresource Integrity)?"],"answer":[0,"sha256, sha384, and sha512. Configure via `experimental.sri.algorithm` in next.config.js. Example: `experimental: { sri: { algorithm: 'sha256' } }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-hash-algorithms-are-supported-for-next-js-experimental-sri-subresourc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-hash-algorithms-are-supported-for-next-js-experimental-sri-subresourc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-hash-algorithms-are-supported-for-next-js-experimental-sri-subresourc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three hash algorithms are supported for Next.js experimental SRI (Subresource Integrity)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sha256, sha384, and sha512. Configure via <code>experimental.sri.algorithm</code> in next.config.js. Example: <code>experimental: { sri: { algorithm: 'sha256' } }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17EC97" prefix="r2523" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5236536271115917612"],"question":[0,"What flag enables HTTPS for Next.js development server?"],"answer":[0,"`next dev --experimental-https`. To use custom certificates, provide all three arguments: `--experimental-https --experimental-https-key ./path/to/key --experimental-https-cert ./path/to/cert`"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/kb/guide/access-nextjs-localhost-https-certificate-self-signed"]]],"topic":[0,"nextjs"],"slug":[0,"what-flag-enables-https-for-next-js-development-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-flag-enables-https-for-next-js-development-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-flag-enables-https-for-next-js-development-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What flag enables HTTPS for Next.js development server?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>next dev --experimental-https</code>. To use custom certificates, provide all three arguments: <code>--experimental-https --experimental-https-key ./path/to/key --experimental-https-cert ./path/to/cert</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/kb/guide/access-nextjs-localhost-https-certificate-self-signed" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BEi2J" prefix="r2524" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6239685162698286674"],"question":[0,"Does Vercel automatically add HSTS headers?"],"answer":[0,"Yes. Vercel, the official Next.js hosting solution, adds the HSTS headers automatically."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.logrocket.com/using-next-js-security-headers"]]],"topic":[0,"nextjs"],"slug":[0,"does-vercel-automatically-add-hsts-headers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-vercel-automatically-add-hsts-headers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-vercel-automatically-add-hsts-headers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Vercel automatically add HSTS headers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Vercel, the official Next.js hosting solution, adds the HSTS headers automatically.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.logrocket.com/using-next-js-security-headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.logrocket.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zdcjsn" prefix="r2525" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6255976465301113284"],"question":[0,"What paths should be excluded from CSP nonce application in Next.js middleware matcher configuration?"],"answer":[0,"API routes, _next/static files, _next/image optimization, favicon.ico, requests with the 'next-router-prefetch' header, and requests with 'purpose: prefetch' header."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-paths-should-be-excluded-from-csp-nonce-application-in-next-js-middleware-m"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-paths-should-be-excluded-from-csp-nonce-application-in-next-js-middleware-m" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-paths-should-be-excluded-from-csp-nonce-application-in-next-js-middleware-m" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What paths should be excluded from CSP nonce application in Next.js middleware matcher configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>API routes, _next/static files, _next/image optimization, favicon.ico, requests with the 'next-router-prefetch' header, and requests with 'purpose: prefetch' header.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="73oeI" prefix="r2526" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6559039279604417791"],"question":[0,"Can custom server files be used with Next.js standalone output mode?"],"answer":[0,"No. When using standalone output mode, it does not trace custom server files. Standalone output and custom servers cannot be used together."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.arcjet.com/security-advice-for-self-hosting-next-js-in-docker"]]],"topic":[0,"nextjs"],"slug":[0,"can-custom-server-files-be-used-with-next-js-standalone-output-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-custom-server-files-be-used-with-next-js-standalone-output-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-custom-server-files-be-used-with-next-js-standalone-output-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can custom server files be used with Next.js standalone output mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When using standalone output mode, it does not trace custom server files. Standalone output and custom servers cannot be used together.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.arcjet.com/security-advice-for-self-hosting-next-js-in-docker" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.arcjet.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRwFcB" prefix="r2527" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6704010325726192301"],"question":[0,"What is the recommended nonce generation pattern in Next.js CSP middleware?"],"answer":[0,"Buffer.from(crypto.randomUUID()).toString('base64'). This creates a unique, cryptographically random nonce for each request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-nonce-generation-pattern-in-next-js-csp-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-nonce-generation-pattern-in-next-js-csp-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-nonce-generation-pattern-in-next-js-csp-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended nonce generation pattern in Next.js CSP middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Buffer.from(crypto.randomUUID()).toString('base64'). This creates a unique, cryptographically random nonce for each request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IdfTU" prefix="r2528" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6996908062252268771"],"question":[0,"How do you configure a custom body size limit for Server Actions in next.config.js?"],"answer":[0,"Use the `serverActions.bodySizeLimit` option. It accepts either a number of bytes (e.g., 1000) or string formats supported by the bytes library (e.g., '500kb' or '3mb'). Example: `serverActions: { bodySizeLimit: '2mb' }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-custom-body-size-limit-for-server-actions-in-next-config-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-custom-body-size-limit-for-server-actions-in-next-config-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-custom-body-size-limit-for-server-actions-in-next-config-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a custom body size limit for Server Actions in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>serverActions.bodySizeLimit</code> option. It accepts either a number of bytes (e.g., 1000) or string formats supported by the bytes library (e.g., '500kb' or '3mb'). Example: <code>serverActions: { bodySizeLimit: '2mb' }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtXlPF" prefix="r2529" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7159315976115404384"],"question":[0,"What are the two common X-Frame-Options values and their meanings?"],"answer":[0,"DENY (recommended, completely denies site being loaded within frames) and SAMEORIGIN (ensures the site is only rendered in frames on itself, not on other sites). These protect against clickjacking attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-common-x-frame-options-values-and-their-meanings"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-common-x-frame-options-values-and-their-meanings" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-common-x-frame-options-values-and-their-meanings" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two common X-Frame-Options values and their meanings?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>DENY (recommended, completely denies site being loaded within frames) and SAMEORIGIN (ensures the site is only rendered in frames on itself, not on other sites). These protect against clickjacking attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2brDl" prefix="r2530" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7590961156259013643"],"question":[0,"What security consideration exists when using output: 'standalone' with next start?"],"answer":[0,"Do NOT use `next start` with output: 'standalone'. Instead use `node .next/standalone/server.js`. Using next start with standalone mode creates a security vulnerability (CVE-2025-29927) in Next.js versions earlier than 12.3.5, 13.5.9, 14.2.25, and 15.2.3."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/output"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-consideration-exists-when-using-output-standalone-with-next-start"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-consideration-exists-when-using-output-standalone-with-next-start" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-consideration-exists-when-using-output-standalone-with-next-start" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security consideration exists when using output: 'standalone' with next start?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Do NOT use <code>next start</code> with output: 'standalone'. Instead use <code>node .next/standalone/server.js</code>. Using next start with standalone mode creates a security vulnerability (CVE-2025-29927) in Next.js versions earlier than 12.3.5, 13.5.9, 14.2.25, and 15.2.3.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/output" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NpnEB" prefix="r2531" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8245208517405469433"],"question":[0,"Can you deploy a Next.js custom server on Vercel?"],"answer":[0,"No. If you are deploying on Vercel, you will not be able to bring your custom server with you. Custom servers require a different hosting environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/custom-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-deploy-a-next-js-custom-server-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-deploy-a-next-js-custom-server-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-deploy-a-next-js-custom-server-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you deploy a Next.js custom server on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. If you are deploying on Vercel, you will not be able to bring your custom server with you. Custom servers require a different hosting environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/custom-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFAyAj" prefix="r2532" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8594701298514750899"],"question":[0,"How do you read a CSP nonce in a Next.js Server Component?"],"answer":[0,"Use `(await headers()).get('x-nonce')` or `headers().get('x-nonce')`. The nonce is stored in the 'x-nonce' header set by middleware."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-read-a-csp-nonce-in-a-next-js-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-read-a-csp-nonce-in-a-next-js-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-read-a-csp-nonce-in-a-next-js-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you read a CSP nonce in a Next.js Server Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>(await headers()).get('x-nonce')</code> or <code>headers().get('x-nonce')</code>. The nonce is stored in the 'x-nonce' header set by middleware.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18bTwz" prefix="r2533" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8725145812529653685"],"question":[0,"What HTTP status code does Next.js use for permanent redirects configured via the redirects function?"],"answer":[0,"308. When `permanent: true` is set in a redirect configuration, Next.js uses the 308 status code which instructs clients and search engines to cache the redirect forever."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-use-for-permanent-redirects-configured-via-th"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-use-for-permanent-redirects-configured-via-th" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-use-for-permanent-redirects-configured-via-th" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js use for permanent redirects configured via the redirects function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol start="308"> <li>When <code>permanent: true</code> is set in a redirect configuration, Next.js uses the 308 status code which instructs clients and search engines to cache the redirect forever.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVKmN1" prefix="r2534" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8866461009159376490"],"question":[0,"What Next.js version introduced support for the 'missing' field in headers configuration?"],"answer":[0,"v13.3.0+. The 'missing' field allows applying headers only when certain conditions are NOT met."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-version-introduced-support-for-the-missing-field-in-headers-configu"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-version-introduced-support-for-the-missing-field-in-headers-configu" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-version-introduced-support-for-the-missing-field-in-headers-configu" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js version introduced support for the 'missing' field in headers configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v13.3.0+. The 'missing' field allows applying headers only when certain conditions are NOT met.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zn230" prefix="r2535" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9790193808475925615"],"question":[0,"What Next.js version added experimental SRI (Subresource Integrity) support?"],"answer":[0,"v14.0.0+. SRI allows maintaining static generation while enforcing integrity through build-time hash generation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-version-added-experimental-sri-subresource-integrity-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-version-added-experimental-sri-subresource-integrity-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-version-added-experimental-sri-subresource-integrity-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js version added experimental SRI (Subresource Integrity) support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v14.0.0+. SRI allows maintaining static generation while enforcing integrity through build-time hash generation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8fA8N" prefix="r2536" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10068312615287800406"],"question":[0,"When are Next.js headers evaluated in the request processing pipeline?"],"answer":[0,"Before filesystem checks, including pages and /public files. This allows headers to be applied even to static assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-next-js-headers-evaluated-in-the-request-processing-pipeline"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-next-js-headers-evaluated-in-the-request-processing-pipeline" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-next-js-headers-evaluated-in-the-request-processing-pipeline" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are Next.js headers evaluated in the request processing pipeline?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Before filesystem checks, including pages and /public files. This allows headers to be applied even to static assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17r1nE" prefix="r2537" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10658983255550934414"],"question":[0,"What is the recommended approach for CORS in production Next.js applications?"],"answer":[0,"Never use wildcards (*) in production for Access-Control-Allow-Origin. Instead, explicitly list allowed origins. For dynamic scenarios, use Vercel's Routing Middleware to set different CORS policies based on the requesting origin."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/kb/guide/how-to-enable-cors"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-cors-in-production-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-cors-in-production-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-cors-in-production-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for CORS in production Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Never use wildcards (*) in production for Access-Control-Allow-Origin. Instead, explicitly list allowed origins. For dynamic scenarios, use Vercel's Routing Middleware to set different CORS policies based on the requesting origin.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/kb/guide/how-to-enable-cors" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UVFmd" prefix="r2538" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10907205100426022097"],"question":[0,"What is the default API Routes response size limit in Next.js?"],"answer":[0,"4MB. This limit exists because serverless platforms typically have payload size restrictions, and large responses can impact performance when not using a CDN or dedicated media host."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/api-routes-response-size-limit"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-api-routes-response-size-limit-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-api-routes-response-size-limit-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-api-routes-response-size-limit-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default API Routes response size limit in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>4MB. This limit exists because serverless platforms typically have payload size restrictions, and large responses can impact performance when not using a CDN or dedicated media host.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/api-routes-response-size-limit" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1cR0o2" prefix="r2539" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10921598206105058476"],"question":[0,"What is the default value of the httpAgentOptions.keepAlive setting in Next.js for Node.js versions prior to 18?"],"answer":[0,"true. HTTP Keep-Alive is enabled automatically by default in Node.js versions before 18. Next.js automatically implements fetch() polyfilling with undici and activates HTTP Keep-Alive functionality."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/httpAgentOptions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-httpagentoptions-keepalive-setting-in-next-js-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-httpagentoptions-keepalive-setting-in-next-js-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-httpagentoptions-keepalive-setting-in-next-js-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the httpAgentOptions.keepAlive setting in Next.js for Node.js versions prior to 18?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. HTTP Keep-Alive is enabled automatically by default in Node.js versions before 18. Next.js automatically implements fetch() polyfilling with undici and activates HTTP Keep-Alive functionality.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/httpAgentOptions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Qlv8T" prefix="r2540" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11250827070905956064"],"question":[0,"What Next.js version introduced support for the 'has' field in headers configuration?"],"answer":[0,"v10.2.0+. The 'has' field allows conditional header application based on header, cookie, query, or host values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-version-introduced-support-for-the-has-field-in-headers-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-version-introduced-support-for-the-has-field-in-headers-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-version-introduced-support-for-the-has-field-in-headers-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js version introduced support for the 'has' field in headers configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v10.2.0+. The 'has' field allows conditional header application based on header, cookie, query, or host values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2h1suq" prefix="r2541" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11329329896782261253"],"question":[0,"What CSP directives should be used in development vs production for Next.js?"],"answer":[0,"Development: Include 'unsafe-eval' in script-src and 'unsafe-inline' in style-src for debugging support. Production: Remove these unsafe directives and use proper nonce or SRI implementation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-csp-directives-should-be-used-in-development-vs-production-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-csp-directives-should-be-used-in-development-vs-production-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-csp-directives-should-be-used-in-development-vs-production-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSP directives should be used in development vs production for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Development: Include 'unsafe-eval' in script-src and 'unsafe-inline' in style-src for debugging support. Production: Remove these unsafe directives and use proper nonce or SRI implementation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="19kXAi" prefix="r2542" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11539829001440257569"],"question":[0,"How do you enable the experimental taint API in Next.js?"],"answer":[0,"Set `experimental.taint: true` in next.config.js. Example: `module.exports = { experimental: { taint: true } }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-the-experimental-taint-api-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-the-experimental-taint-api-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-the-experimental-taint-api-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable the experimental taint API in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>experimental.taint: true</code> in next.config.js. Example: <code>module.exports = { experimental: { taint: true } }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YhPgy" prefix="r2543" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12591052352909088563"],"question":[0,"What is the default origin policy for Next.js Server Actions?"],"answer":[0,"Only same-origin requests are allowed by default. The allowedOrigins configuration must be used to permit Server Action invocations from other domains."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-origin-policy-for-next-js-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-origin-policy-for-next-js-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-origin-policy-for-next-js-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default origin policy for Next.js Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only same-origin requests are allowed by default. The allowedOrigins configuration must be used to permit Server Action invocations from other domains.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25mm4k" prefix="r2544" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12592776832574158915"],"question":[0,"What is the standard X-Content-Type-Options header value for security?"],"answer":[0,"nosniff. This prevents the browser from attempting to guess the content type if the Content-Type header is not explicitly set, protecting against MIME type sniffing attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-standard-x-content-type-options-header-value-for-security"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-standard-x-content-type-options-header-value-for-security" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-standard-x-content-type-options-header-value-for-security" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the standard X-Content-Type-Options header value for security?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>nosniff. This prevents the browser from attempting to guess the content type if the Content-Type header is not explicitly set, protecting against MIME type sniffing attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZxpeoX" prefix="r2545" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13423560888447836453"],"question":[0,"What are the available values for the crossOrigin configuration in next.config.js?"],"answer":[0,"Two values: 'anonymous' (permits cross-origin requests without sending credentials) and 'use-credentials' (enables cross-origin requests with credentials included). This configuration adds the crossOrigin attribute to all <script> tags generated by next/script."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/crossOrigin"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-available-values-for-the-crossorigin-configuration-in-next-config-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-available-values-for-the-crossorigin-configuration-in-next-config-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-available-values-for-the-crossorigin-configuration-in-next-config-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the available values for the crossOrigin configuration in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Two values: 'anonymous' (permits cross-origin requests without sending credentials) and 'use-credentials' (enables cross-origin requests with credentials included). This configuration adds the crossOrigin attribute to all <script> tags generated by next/script.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/crossOrigin" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UFPNQ" prefix="r2546" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13918169939191812908"],"question":[0,"What performance optimization does Next.js custom server disable?"],"answer":[0,"Automatic Static Optimization. A custom server removes important performance optimizations including serverless functions and the ability to automatically optimize static pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/custom-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-optimization-does-next-js-custom-server-disable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-optimization-does-next-js-custom-server-disable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-optimization-does-next-js-custom-server-disable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance optimization does Next.js custom server disable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Automatic Static Optimization. A custom server removes important performance optimizations including serverless functions and the ability to automatically optimize static pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/custom-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZriMO4" prefix="r2547" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14560635052243213124"],"question":[0,"Do Next.js security headers exist by default in starter apps?"],"answer":[0,"No. By default, Next.js starter apps do not have security headers enabled. There is no Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, or any other security header present in the response headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.logrocket.com/using-next-js-security-headers"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-security-headers-exist-by-default-in-starter-apps"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-security-headers-exist-by-default-in-starter-apps" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-security-headers-exist-by-default-in-starter-apps" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js security headers exist by default in starter apps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. By default, Next.js starter apps do not have security headers enabled. There is no Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, or any other security header present in the response headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.logrocket.com/using-next-js-security-headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.logrocket.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="data-fetching-data-security-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Data Fetching > Data Security & Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 36 questions </span> </div> <div class="space-y-4"> <astro-island uid="1Ooma6" prefix="r2548" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"51596423600409818"],"question":[0,"When are NEXT_PUBLIC_ environment variables inlined in Next.js?"],"answer":[0,"They are inlined into the JavaScript bundle at build time during next build, and the app will no longer respond to changes to these variables after being built."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-next-public-environment-variables-inlined-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-next-public-environment-variables-inlined-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-next-public-environment-variables-inlined-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are NEXT_PUBLIC_ environment variables inlined in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>They are inlined into the JavaScript bundle at build time during next build, and the app will no longer respond to changes to these variables after being built.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GPcjW" prefix="r2549" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"174637629296999671"],"question":[0,"What does export const dynamic = 'force-dynamic' do in Next.js?"],"answer":[0,"It forces dynamic rendering, causing routes to be rendered for each user at request time. This is equivalent to setting every fetch() request to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-force-dynamic-do-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-force-dynamic-do-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-force-dynamic-do-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const dynamic = 'force-dynamic' do in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces dynamic rendering, causing routes to be rendered for each user at request time. This is equivalent to setting every fetch() request to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GGCRJ" prefix="r2550" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"499940656185936273"],"question":[0,"What is the default runtime for Next.js route segments?"],"answer":[0,"The default runtime is 'nodejs'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-next-js-route-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-next-js-route-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-next-js-route-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for Next.js route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default runtime is 'nodejs'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20nSrj" prefix="r2551" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1004160263521291044"],"question":[0,"What type of IDs does Next.js create for Server Action references?"],"answer":[0,"Next.js creates encrypted, non-deterministic IDs for Server Action references that are periodically recalculated between builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-ids-does-next-js-create-for-server-action-references"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-ids-does-next-js-create-for-server-action-references" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-ids-does-next-js-create-for-server-action-references" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of IDs does Next.js create for Server Action references?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js creates encrypted, non-deterministic IDs for Server Action references that are periodically recalculated between builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDyFtO" prefix="r2552" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1382165588293720259"],"question":[0,"What does export const dynamic = 'error' do?"],"answer":[0,"It forces static rendering and throws errors if Dynamic APIs are used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-error-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-error-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-error-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const dynamic = 'error' do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and throws errors if Dynamic APIs are used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1G3S25" prefix="r2553" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2044313812397331659"],"question":[0,"What is the default value for the 'dynamic' route segment config option?"],"answer":[0,"The default value is 'auto', which caches as much as possible without preventing components from opting into dynamic behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'dynamic' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'auto', which caches as much as possible without preventing components from opting into dynamic behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1VEWLN" prefix="r2554" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2416431725069848663"],"question":[0,"What is the default value for the 'dynamicParams' route segment config option?"],"answer":[0,"The default value is true, which renders ungenerated dynamic segments on-demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamicparams-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamicparams-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamicparams-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'dynamicParams' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is true, which renders ungenerated dynamic segments on-demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21ffUz" prefix="r2555" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2926641286149822116"],"question":[0,"What does cache: 'no-store' do in Next.js fetch configuration?"],"answer":[0,"It retrieves resources from the remote server on every request, regardless of Dynamic API detection."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-cache-no-store-do-in-next-js-fetch-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-cache-no-store-do-in-next-js-fetch-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-cache-no-store-do-in-next-js-fetch-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does cache: 'no-store' do in Next.js fetch configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It retrieves resources from the remote server on every request, regardless of Dynamic API detection.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cTw0q" prefix="r2556" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3119496864700269255"],"question":[0,"How often are Server Action encryption keys regenerated by default?"],"answer":[0,"A new private key is generated for each action every time a Next.js application is built, meaning keys regenerate on each build (not on a time-based schedule)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-often-are-server-action-encryption-keys-regenerated-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-often-are-server-action-encryption-keys-regenerated-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-often-are-server-action-encryption-keys-regenerated-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How often are Server Action encryption keys regenerated by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A new private key is generated for each action every time a Next.js application is built, meaning keys regenerate on each build (not on a time-based schedule).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pLPQ8" prefix="r2557" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3632192077567004294"],"question":[0,"What is the signature for revalidateTag in modern Next.js?"],"answer":[0,"revalidateTag(tag: string, profile: string | { expire?: number }): void. The two-argument signature is required; the single-argument version is deprecated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-signature-for-revalidatetag-in-modern-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-signature-for-revalidatetag-in-modern-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-signature-for-revalidatetag-in-modern-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the signature for revalidateTag in modern Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidateTag(tag: string, profile: string | { expire?: number }): void. The two-argument signature is required; the single-argument version is deprecated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dExY0" prefix="r2558" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3670012971435547603"],"question":[0,"What happens when multiple fetch requests with the same URL have different revalidate values?"],"answer":[0,"When multiple fetch requests with identical URLs but different revalidate values exist, the lower value will be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-multiple-fetch-requests-with-the-same-url-have-different-reval"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-multiple-fetch-requests-with-the-same-url-have-different-reval" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-multiple-fetch-requests-with-the-same-url-have-different-reval" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when multiple fetch requests with the same URL have different revalidate values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When multiple fetch requests with identical URLs but different revalidate values exist, the lower value will be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xEYkM" prefix="r2559" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3801495362560173532"],"question":[0,"When was Server Actions feature enabled by default in Next.js?"],"answer":[0,"Server Actions are enabled by default in Next.js 14 and later. For versions prior to 14, you must activate it by setting experimental.serverActions to true."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-server-actions-feature-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-server-actions-feature-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-server-actions-feature-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was Server Actions feature enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions are enabled by default in Next.js 14 and later. For versions prior to 14, you must activate it by setting experimental.serverActions to true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IrdTs" prefix="r2560" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4159188854155344478"],"question":[0,"What environment variable prefix exposes variables to the browser in Next.js?"],"answer":[0,"Environment variables prefixed with NEXT_PUBLIC_ are exposed to the client. By default, environment variables are server-only."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-prefix-exposes-variables-to-the-browser-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-prefix-exposes-variables-to-the-browser-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-prefix-exposes-variables-to-the-browser-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable prefix exposes variables to the browser in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables prefixed with NEXT_PUBLIC_ are exposed to the client. By default, environment variables are server-only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Uuqeh" prefix="r2561" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4900699508246989523"],"question":[0,"What does export const dynamic = 'force-static' do?"],"answer":[0,"It forces static rendering and returns empty values for cookies, headers, and search parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-force-static-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-force-static-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-force-static-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const dynamic = 'force-static' do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and returns empty values for cookies, headers, and search parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29D02K" prefix="r2562" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5564594549311570569"],"question":[0,"What is the lowest revalidate value behavior across layouts and pages in Next.js?"],"answer":[0,"The lowest revalidate value across each layout and page determines the revalidation frequency for the entire route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-lowest-revalidate-value-behavior-across-layouts-and-pages-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-lowest-revalidate-value-behavior-across-layouts-and-pages-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-lowest-revalidate-value-behavior-across-layouts-and-pages-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the lowest revalidate value behavior across layouts and pages in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate value across each layout and page determines the revalidation frequency for the entire route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMddMN" prefix="r2563" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5572447472798493529"],"question":[0,"What does revalidate: 0 do in Next.js fetch configuration?"],"answer":[0,"revalidate: 0 prevents the resource from being cached entirely."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-0-do-in-next-js-fetch-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-0-do-in-next-js-fetch-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-0-do-in-next-js-fetch-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidate: 0 do in Next.js fetch configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidate: 0 prevents the resource from being cached entirely.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZogtJU" prefix="r2564" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5855189869971790771"],"question":[0,"What is the recommended profile value for revalidateTag in Next.js?"],"answer":[0,"The recommended value is 'max', which provides stale-while-revalidate semantics where stale content is served while fresh content is fetched in the background."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-profile-value-for-revalidatetag-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-profile-value-for-revalidatetag-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-profile-value-for-revalidatetag-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended profile value for revalidateTag in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended value is 'max', which provides stale-while-revalidate semantics where stale content is served while fresh content is fetched in the background.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqjEM5" prefix="r2565" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5874878102241702023"],"question":[0,"What dynamic functions automatically opt a Next.js route into dynamic rendering?"],"answer":[0,"Using cookies(), headers(), or draftMode() from next/headers, or using the searchParams prop in Pages will opt the route into dynamic rendering at request time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-dynamic-functions-automatically-opt-a-next-js-route-into-dynamic-rendering"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-dynamic-functions-automatically-opt-a-next-js-route-into-dynamic-rendering" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-dynamic-functions-automatically-opt-a-next-js-route-into-dynamic-rendering" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What dynamic functions automatically opt a Next.js route into dynamic rendering?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using cookies(), headers(), or draftMode() from next/headers, or using the searchParams prop in Pages will opt the route into dynamic rendering at request time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2o2IYR" prefix="r2566" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5958138913435522623"],"question":[0,"What are the three recommended data fetching approaches for Next.js according to the Data Security guide?"],"answer":[0,"HTTP APIs (for existing large applications), Data Access Layer (for new projects), and Component-Level Data Access (for prototypes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-recommended-data-fetching-approaches-for-next-js-according-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-recommended-data-fetching-approaches-for-next-js-according-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-recommended-data-fetching-approaches-for-next-js-according-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three recommended data fetching approaches for Next.js according to the Data Security guide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>HTTP APIs (for existing large applications), Data Access Layer (for new projects), and Component-Level Data Access (for prototypes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nGBHE" prefix="r2567" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6842684647982405881"],"question":[0,"What is the default body size limit for Server Actions in Next.js?"],"answer":[0,"The default request body size is capped at 1MB to prevent the consumption of excessive server resources in parsing large amounts of data, as well as potential DDoS attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-body-size-limit-for-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-body-size-limit-for-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-body-size-limit-for-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default body size limit for Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default request body size is capped at 1MB to prevent the consumption of excessive server resources in parsing large amounts of data, as well as potential DDoS attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZXGGNM" prefix="r2568" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7048502709656527216"],"question":[0,"What is the serverActions.allowedOrigins configuration option used for?"],"answer":[0,"It specifies a list of extra safe origin domains from which Server Actions can be invoked. If not provided, only the same origin is allowed. It accepts an array of strings and supports wildcard patterns like '*.my-proxy.com'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-serveractions-allowedorigins-configuration-option-used-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-serveractions-allowedorigins-configuration-option-used-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-serveractions-allowedorigins-configuration-option-used-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the serverActions.allowedOrigins configuration option used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It specifies a list of extra safe origin domains from which Server Actions can be invoked. If not provided, only the same origin is allowed. It accepts an array of strings and supports wildcard patterns like '*.my-proxy.com'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aCiP8" prefix="r2569" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7870407531742635307"],"question":[0,"What is the default value for the 'revalidate' route segment config option?"],"answer":[0,"The default value is false, which caches indefinitely with default heuristic."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'revalidate' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false, which caches indefinitely with default heuristic.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1p3for" prefix="r2570" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8808017875109483154"],"question":[0,"What React channel does enabling experimental.taint activate?"],"answer":[0,"Activating the taint flag also enables the React experimental channel for app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-channel-does-enabling-experimental-taint-activate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-channel-does-enabling-experimental-taint-activate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-channel-does-enabling-experimental-taint-activate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React channel does enabling experimental.taint activate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Activating the taint flag also enables the React experimental channel for app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="U8SzO" prefix="r2571" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9775106013827338665"],"question":[0,"What two React taint APIs are available in Next.js?"],"answer":[0,"experimental_taintObjectReference for tainting data objects, and experimental_taintUniqueValue for tainting specific values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-react-taint-apis-are-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-react-taint-apis-are-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-react-taint-apis-are-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two React taint APIs are available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>experimental_taintObjectReference for tainting data objects, and experimental_taintUniqueValue for tainting specific values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XJzaI" prefix="r2572" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10224157248026997134"],"question":[0,"Are functions and classes allowed to be passed to Client Components by default in Next.js?"],"answer":[0,"No, functions and classes are already blocked from being passed to Client Components by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"are-functions-and-classes-allowed-to-be-passed-to-client-components-by-default-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-functions-and-classes-allowed-to-be-passed-to-client-components-by-default-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-functions-and-classes-allowed-to-be-passed-to-client-components-by-default-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are functions and classes allowed to be passed to Client Components by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, functions and classes are already blocked from being passed to Client Components by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQPbB4" prefix="r2573" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10379532370612601131"],"question":[0,"What configuration option enables React taint APIs in Next.js?"],"answer":[0,"Set experimental.taint: true in next.config.js to enable React taint APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-enables-react-taint-apis-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-enables-react-taint-apis-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-enables-react-taint-apis-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option enables React taint APIs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set experimental.taint: true in next.config.js to enable React taint APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27Iduh" prefix="r2574" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10755433631451093806"],"question":[0,"What is the maximum character length for a single cache tag in Next.js?"],"answer":[0,"The maximum length for a custom tag is 256 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-single-cache-tag-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-single-cache-tag-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-single-cache-tag-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a single cache tag in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The maximum length for a custom tag is 256 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1I4lBu" prefix="r2575" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11056889169112041670"],"question":[0,"What does cache: 'force-cache' do in Next.js fetch configuration?"],"answer":[0,"It searches the Data Cache for matching requests. Returns cached content if fresh; otherwise fetches from server and updates cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-cache-force-cache-do-in-next-js-fetch-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-cache-force-cache-do-in-next-js-fetch-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-cache-force-cache-do-in-next-js-fetch-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does cache: 'force-cache' do in Next.js fetch configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It searches the Data Cache for matching requests. Returns cached content if fresh; otherwise fetches from server and updates cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gNqqY" prefix="r2576" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11504940568699230945"],"question":[0,"What should a Data Access Layer (DAL) return according to Next.js security best practices?"],"answer":[0,"It should return safe, minimal Data Transfer Objects (DTOs) - objects that are safe to be transferred to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-a-data-access-layer-dal-return-according-to-next-js-security-best-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-a-data-access-layer-dal-return-according-to-next-js-security-best-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-a-data-access-layer-dal-return-according-to-next-js-security-best-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should a Data Access Layer (DAL) return according to Next.js security best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It should return safe, minimal Data Transfer Objects (DTOs) - objects that are safe to be transferred to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBPbGc" prefix="r2577" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11754397633574767239"],"question":[0,"What is the default cache behavior for fetch requests in Next.js?"],"answer":[0,"By default, fetch requests are not cached. The default option is 'auto no cache' - Next.js fetches from the remote server on every request in development, but during next build it fetches once for static prerendering (unless Dynamic APIs are detected)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-behavior-for-fetch-requests-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-behavior-for-fetch-requests-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-behavior-for-fetch-requests-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default cache behavior for fetch requests in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, fetch requests are not cached. The default option is 'auto no cache' - Next.js fetches from the remote server on every request in development, but during next build it fetches once for static prerendering (unless Dynamic APIs are detected).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tCB22" prefix="r2578" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11795770585500934106"],"question":[0,"Where can revalidateTag be called in Next.js?"],"answer":[0,"It can only be called in Server Actions and Route Handlers, not in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-revalidatetag-be-called-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-revalidatetag-be-called-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-revalidatetag-be-called-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can revalidateTag be called in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It can only be called in Server Actions and Route Handlers, not in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kKCKO" prefix="r2579" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11823416383057997459"],"question":[0,"How does Next.js protect Server Actions from CSRF attacks?"],"answer":[0,"Server Actions compare the Origin header against the Host header (or X-Forwarded-Host). If they don't match, the request is aborted. Server Actions also exclusively use the POST method."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-protect-server-actions-from-csrf-attacks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-protect-server-actions-from-csrf-attacks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-protect-server-actions-from-csrf-attacks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js protect Server Actions from CSRF attacks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions compare the Origin header against the Host header (or X-Forwarded-Host). If they don't match, the request is aborted. Server Actions also exclusively use the POST method.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LS0ti" prefix="r2580" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12292343089502711535"],"question":[0,"What does revalidate: false mean in Next.js fetch configuration?"],"answer":[0,"revalidate: false caches the resource indefinitely (semantically equivalent to revalidate: Infinity), though HTTP cache may eventually evict older resources."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-false-mean-in-next-js-fetch-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-false-mean-in-next-js-fetch-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-false-mean-in-next-js-fetch-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidate: false mean in Next.js fetch configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidate: false caches the resource indefinitely (semantically equivalent to revalidate: Infinity), though HTTP cache may eventually evict older resources.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25hriO" prefix="r2581" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12398998450941127783"],"question":[0,"What environment variable allows persistent Server Action encryption keys across builds?"],"answer":[0,"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY ensures encryption keys are persistent across builds and all server instances use the same key. This variable must be AES-GCM encrypted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-allows-persistent-server-action-encryption-keys-across"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-allows-persistent-server-action-encryption-keys-across" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-allows-persistent-server-action-encryption-keys-across" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable allows persistent Server Action encryption keys across builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_SERVER_ACTIONS_ENCRYPTION_KEY ensures encryption keys are persistent across builds and all server instances use the same key. This variable must be AES-GCM encrypted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi0ihn" prefix="r2582" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13181778356406124095"],"question":[0,"How can you configure body size limits for Server Actions?"],"answer":[0,"Use the bodySizeLimit option in serverActions configuration with either byte values (e.g., 1000) or string formats like '500kb' or '3mb'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-configure-body-size-limits-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-configure-body-size-limits-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-configure-body-size-limits-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you configure body size limits for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the bodySizeLimit option in serverActions configuration with either byte values (e.g., 1000) or string formats like '500kb' or '3mb'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Nqaaa" prefix="r2583" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14391273689274576830"],"question":[0,"What does unstable_cache's revalidate option do when set to false?"],"answer":[0,"When set to false or omitted, it caches indefinitely or until matching revalidateTag() or revalidatePath() methods are called."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/unstable_cache"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-unstable-cache-s-revalidate-option-do-when-set-to-false"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-unstable-cache-s-revalidate-option-do-when-set-to-false" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-unstable-cache-s-revalidate-option-do-when-set-to-false" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does unstable_cache's revalidate option do when set to false?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When set to false or omitted, it caches indefinitely or until matching revalidateTag() or revalidatePath() methods are called.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/unstable_cache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="typescript-typescript-setup-and-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">TypeScript > TypeScript Setup and Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 36 questions </span> </div> <div class="space-y-4"> <astro-island uid="Q3SF1" prefix="r2584" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"117817992929029481"],"question":[0,"What module format does next.config.ts use by default?"],"answer":[0,"next.config.ts uses CommonJS by default. Node.js will assume it's CommonJS and reparse as ESM when module syntax is detected."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-module-format-does-next-config-ts-use-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-module-format-does-next-config-ts-use-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-module-format-does-next-config-ts-use-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What module format does next.config.ts use by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next.config.ts uses CommonJS by default. Node.js will assume it's CommonJS and reparse as ESM when module syntax is detected.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sBDYs" prefix="r2585" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"576523420675804285"],"question":[0,"What file does Next.js automatically generate to reference TypeScript types?"],"answer":[0,"Next.js generates a `next-env.d.ts` file in the project root that references Next.js type definitions, allowing TypeScript to recognize non-code imports and Next.js-specific types."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-automatically-generate-to-reference-typescript-types"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-automatically-generate-to-reference-typescript-types" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-automatically-generate-to-reference-typescript-types" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js automatically generate to reference TypeScript types?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a <code>next-env.d.ts</code> file in the project root that references Next.js type definitions, allowing TypeScript to recognize non-code imports and Next.js-specific types.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgTlFW" prefix="r2586" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"634426482364969791"],"question":[0,"What is the default value of the `typescript.tsconfigPath` config option?"],"answer":[0,"The default is \"tsconfig.json\". This option allows you to specify an alternate TypeScript configuration file path for builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typescript-tsconfigpath-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typescript-tsconfigpath-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typescript-tsconfigpath-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `typescript.tsconfigPath` config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is "tsconfig.json". This option allows you to specify an alternate TypeScript configuration file path for builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zm2rsw" prefix="r2587" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"657273386554995321"],"question":[0,"What file extension should you use for ESM in Next.js config files?"],"answer":[0,"Use next.config.mjs for ESM format. The .mts extension is currently not supported for Next.js config files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extension-should-you-use-for-esm-in-next-js-config-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extension-should-you-use-for-esm-in-next-js-config-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extension-should-you-use-for-esm-in-next-js-config-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extension should you use for ESM in Next.js config files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use next.config.mjs for ESM format. The .mts extension is currently not supported for Next.js config files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="10hJG9" prefix="r2588" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"742241233160727377"],"question":[0,"What file extensions do you need to use to add TypeScript to an existing Next.js project?"],"answer":[0,"Rename a file to .ts (for TypeScript files without JSX) or .tsx (for TypeScript files with JSX/React components). Then run `next dev` or `next build` to automatically install the necessary dependencies and add a tsconfig.json file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-do-you-need-to-use-to-add-typescript-to-an-existing-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-do-you-need-to-use-to-add-typescript-to-an-existing-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-do-you-need-to-use-to-add-typescript-to-an-existing-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions do you need to use to add TypeScript to an existing Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Rename a file to .ts (for TypeScript files without JSX) or .tsx (for TypeScript files with JSX/React components). Then run <code>next dev</code> or <code>next build</code> to automatically install the necessary dependencies and add a tsconfig.json file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RrLcy" prefix="r2589" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1205693563048061829"],"question":[0,"What minimum TypeScript version is required to use async Server Components?"],"answer":[0,"TypeScript 5.1.3 or higher is required to use async Server Components. You also need @types/react 18.2.8 or higher."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-minimum-typescript-version-is-required-to-use-async-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-minimum-typescript-version-is-required-to-use-async-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-minimum-typescript-version-is-required-to-use-async-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What minimum TypeScript version is required to use async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TypeScript 5.1.3 or higher is required to use async Server Components. You also need @types/react 18.2.8 or higher.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24WbPJ" prefix="r2590" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1611582046099772279"],"question":[0,"When was the SWC compiler made the default for TypeScript compilation in Next.js?"],"answer":[0,"The SWC compiler became the default for TypeScript compilation in Next.js v12.0.0, replacing Babel and providing up to 17x faster compilation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-swc-compiler-made-the-default-for-typescript-compilation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-swc-compiler-made-the-default-for-typescript-compilation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-swc-compiler-made-the-default-for-typescript-compilation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the SWC compiler made the default for TypeScript compilation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The SWC compiler became the default for TypeScript compilation in Next.js v12.0.0, replacing Babel and providing up to 17x faster compilation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gOJnj" prefix="r2591" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3372533838424286211"],"question":[0,"Does Next.js support the paths and baseUrl tsconfig.json options?"],"answer":[0,"Yes. Next.js has built-in support for the \"paths\" and \"baseUrl\" options, which allow you to alias project directories to absolute paths. You must specify baseUrl if you specify paths."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/configuring/absolute-imports-and-module-aliases"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-support-the-paths-and-baseurl-tsconfig-json-options"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-support-the-paths-and-baseurl-tsconfig-json-options" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-support-the-paths-and-baseurl-tsconfig-json-options" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js support the paths and baseUrl tsconfig.json options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Next.js has built-in support for the "paths" and "baseUrl" options, which allow you to alias project directories to absolute paths. You must specify baseUrl if you specify paths.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/configuring/absolute-imports-and-module-aliases" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IF6xg" prefix="r2592" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3487754517097839753"],"question":[0,"What command can you run to generate types without running next dev or next build?"],"answer":[0,"Run `next typegen` to manually generate types including next-env.d.ts and route types without running a full dev server or build. This is useful for CI/CD pipelines."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-can-you-run-to-generate-types-without-running-next-dev-or-next-buil"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-can-you-run-to-generate-types-without-running-next-dev-or-next-buil" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-can-you-run-to-generate-types-without-running-next-dev-or-next-buil" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command can you run to generate types without running next dev or next build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run <code>next typegen</code> to manually generate types including next-env.d.ts and route types without running a full dev server or build. This is useful for CI/CD pipelines.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgwBfm" prefix="r2593" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3505122876879371676"],"question":[0,"When was incremental type checking support added to Next.js?"],"answer":[0,"Incremental type checking support was added in Next.js v10.2.1. It is enabled by default when you set \"incremental\": true in tsconfig.json."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-incremental-type-checking-support-added-to-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-incremental-type-checking-support-added-to-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-incremental-type-checking-support-added-to-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was incremental type checking support added to Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Incremental type checking support was added in Next.js v10.2.1. It is enabled by default when you set "incremental": true in tsconfig.json.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EJrtC" prefix="r2594" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3704614583739751348"],"question":[0,"What three commands regenerate the `next-env.d.ts` file?"],"answer":[0,"The `next-env.d.ts` file is regenerated when you run `next dev`, `next build`, or `next typegen`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-commands-regenerate-the-next-env-d-ts-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-commands-regenerate-the-next-env-d-ts-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-commands-regenerate-the-next-env-d-ts-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three commands regenerate the `next-env.d.ts` file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>next-env.d.ts</code> file is regenerated when you run <code>next dev</code>, <code>next build</code>, or <code>next typegen</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1A6bdW" prefix="r2595" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3952885708493237416"],"question":[0,"What three validations does the Next.js TypeScript plugin provide?"],"answer":[0,"The plugin: 1) warns if invalid values for segment config options are passed, 2) ensures the 'use client' directive is used correctly, and 3) ensures client hooks (like useState) are only used in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-validations-does-the-next-js-typescript-plugin-provide"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-validations-does-the-next-js-typescript-plugin-provide" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-validations-does-the-next-js-typescript-plugin-provide" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three validations does the Next.js TypeScript plugin provide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The plugin: 1) warns if invalid values for segment config options are passed, 2) ensures the 'use client' directive is used correctly, and 3) ensures client hooks (like useState) are only used in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ruTRL" prefix="r2596" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4423480732580749227"],"question":[0,"What default settings does create-next-app enable with the --yes flag?"],"answer":[0,"Using --yes enables: TypeScript, Tailwind CSS, ESLint, App Router, and Turbopack, with import alias @/*."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-default-settings-does-create-next-app-enable-with-the-yes-flag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-default-settings-does-create-next-app-enable-with-the-yes-flag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-default-settings-does-create-next-app-enable-with-the-yes-flag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What default settings does create-next-app enable with the --yes flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using --yes enables: TypeScript, Tailwind CSS, ESLint, App Router, and Turbopack, with import alias @/*.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="um65T" prefix="r2597" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4512474909536900083"],"question":[0,"What is the default value of `allowJs` in Next.js TypeScript configuration?"],"answer":[0,"`allowJs` is set to `true` to allow JavaScript files to be imported alongside TypeScript files, supporting incremental migration from JavaScript to TypeScript."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-allowjs-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-allowjs-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-allowjs-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `allowJs` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>allowJs</code> is set to <code>true</code> to allow JavaScript files to be imported alongside TypeScript files, supporting incremental migration from JavaScript to TypeScript.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Mixxh" prefix="r2598" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5032149779614848680"],"question":[0,"What is the default value of `noEmit` in Next.js TypeScript configuration?"],"answer":[0,"`noEmit` is set to `true` because Next.js uses its own build system to compile TypeScript files. TypeScript is used purely for type checking, not transpilation."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-noemit-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-noemit-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-noemit-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `noEmit` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>noEmit</code> is set to <code>true</code> because Next.js uses its own build system to compile TypeScript files. TypeScript is used purely for type checking, not transpilation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17GIEc" prefix="r2599" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5675640990630143934"],"question":[0,"What error occurs if you use async Server Components with TypeScript < 5.1.3?"],"answer":[0,"You may see a \"'Promise<Element>' is not a valid JSX element\" type error. Update to TypeScript 5.1.3+ and @types/react 18.2.8+ to resolve this."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-occurs-if-you-use-async-server-components-with-typescript-5-1-3"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-occurs-if-you-use-async-server-components-with-typescript-5-1-3" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-occurs-if-you-use-async-server-components-with-typescript-5-1-3" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error occurs if you use async Server Components with TypeScript < 5.1.3?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You may see a "'Promise<Element>' is not a valid JSX element" type error. Update to TypeScript 5.1.3+ and @types/react 18.2.8+ to resolve this.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yqWlU" prefix="r2600" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6251434239222797601"],"question":[0,"What TypeScript plugin does Next.js include by default?"],"answer":[0,"Next.js includes a custom TypeScript plugin configured as `{\"plugins\": [{\"name\": \"next\"}]}` in tsconfig.json, which VSCode and other editors use for advanced type-checking and auto-completion."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-plugin-does-next-js-include-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-plugin-does-next-js-include-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-plugin-does-next-js-include-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript plugin does Next.js include by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js includes a custom TypeScript plugin configured as <code>{"plugins": [{"name": "next"}]}</code> in tsconfig.json, which VSCode and other editors use for advanced type-checking and auto-completion.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKqxqC" prefix="r2601" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6603128228513911919"],"question":[0,"What three packages does Next.js automatically install when you add TypeScript to a project?"],"answer":[0,"Next.js automatically installs: typescript (the TypeScript compiler), @types/react (type definitions for React), and @types/node (type definitions for Node.js). It also installs @types/react-dom."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-packages-does-next-js-automatically-install-when-you-add-typescript-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-packages-does-next-js-automatically-install-when-you-add-typescript-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-packages-does-next-js-automatically-install-when-you-add-typescript-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three packages does Next.js automatically install when you add TypeScript to a project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically installs: typescript (the TypeScript compiler), @types/react (type definitions for React), and @types/node (type definitions for Node.js). It also installs @types/react-dom.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vD3c6" prefix="r2602" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6932072479296079302"],"question":[0,"What is the default value of `isolatedModules` in Next.js and why?"],"answer":[0,"`isolatedModules` must be set to `true` as a requirement for SWC/Babel. Next.js automatically enforces this setting and will override it if you set it to false."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/7959"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-isolatedmodules-in-next-js-and-why"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-isolatedmodules-in-next-js-and-why" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-isolatedmodules-in-next-js-and-why" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `isolatedModules` in Next.js and why?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>isolatedModules</code> must be set to <code>true</code> as a requirement for SWC/Babel. Next.js automatically enforces this setting and will override it if you set it to false.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/7959" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zq2XdA" prefix="r2603" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7079511082466051961"],"question":[0,"What is the default value of `module` in Next.js TypeScript configuration?"],"answer":[0,"`module` is set to \"esnext\" to use the latest ECMAScript module syntax."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-module-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-module-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-module-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `module` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>module</code> is set to "esnext" to use the latest ECMAScript module syntax.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="B2O68" prefix="r2604" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7787745124889720434"],"question":[0,"How do you enable the Next.js TypeScript plugin in VSCode?"],"answer":[0,"Open the command palette (Ctrl/⌘ + Shift + P), search for \"TypeScript: Select TypeScript Version\", and select \"Use Workspace Version\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-the-next-js-typescript-plugin-in-vscode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-the-next-js-typescript-plugin-in-vscode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-the-next-js-typescript-plugin-in-vscode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable the Next.js TypeScript plugin in VSCode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Open the command palette (Ctrl/⌘ + Shift + P), search for "TypeScript: Select TypeScript Version", and select "Use Workspace Version".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zwcbi" prefix="r2605" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7973658572366694968"],"question":[0,"Should you commit the `next-env.d.ts` file to version control?"],"answer":[0,"No. Next.js recommends adding `next-env.d.ts` to your .gitignore file because it is automatically regenerated during `next dev`, `next build`, or `next typegen`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-commit-the-next-env-d-ts-file-to-version-control"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-commit-the-next-env-d-ts-file-to-version-control" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-commit-the-next-env-d-ts-file-to-version-control" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you commit the `next-env.d.ts` file to version control?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js recommends adding <code>next-env.d.ts</code> to your .gitignore file because it is automatically regenerated during <code>next dev</code>, <code>next build</code>, or <code>next typegen</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CQQy9" prefix="r2606" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8189386760279320190"],"question":[0,"What happens if you restart next dev after modifying tsconfig.json path aliases?"],"answer":[0,"You must restart next dev after defining a new path alias for the changes to take effect."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/configuring/absolute-imports-and-module-aliases"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-restart-next-dev-after-modifying-tsconfig-json-path-aliases"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-restart-next-dev-after-modifying-tsconfig-json-path-aliases" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-restart-next-dev-after-modifying-tsconfig-json-path-aliases" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you restart next dev after modifying tsconfig.json path aliases?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must restart next dev after defining a new path alias for the changes to take effect.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/configuring/absolute-imports-and-module-aliases" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WcSbv" prefix="r2607" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8835839557012194210"],"question":[0,"What Node.js version is required to use ESM syntax in next.config.ts?"],"answer":[0,"Node.js v22.10.0 or higher with the native TypeScript resolver enabled via `NODE_OPTIONS=--experimental-transform-types` is required to use ESM syntax (including top-level await) in next.config.ts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-node-js-version-is-required-to-use-esm-syntax-in-next-config-ts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-node-js-version-is-required-to-use-esm-syntax-in-next-config-ts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-node-js-version-is-required-to-use-esm-syntax-in-next-config-ts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Node.js version is required to use ESM syntax in next.config.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js v22.10.0 or higher with the native TypeScript resolver enabled via <code>NODE_OPTIONS=--experimental-transform-types</code> is required to use ESM syntax (including top-level await) in next.config.ts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZK9tlj" prefix="r2608" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9718903770662959801"],"question":[0,"What is the default value of `esModuleInterop` in Next.js TypeScript configuration?"],"answer":[0,"`esModuleInterop` is set to `true` to enable better interoperability between CommonJS and ES Modules, allowing cleaner import syntax."],"confidence":[0,0.95],"sources":[1,[[0,"https://refine.dev/blog/next-js-with-typescript/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-esmoduleinterop-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-esmoduleinterop-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-esmoduleinterop-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `esModuleInterop` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>esModuleInterop</code> is set to <code>true</code> to enable better interoperability between CommonJS and ES Modules, allowing cleaner import syntax.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://refine.dev/blog/next-js-with-typescript/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>refine.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Ak4Tq" prefix="r2609" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9869582619587786226"],"question":[0,"What is the default value of the `jsx` compiler option in Next.js?"],"answer":[0,"The jsx option is set to \"preserve\" because Next.js implements its own optimized JSX transform. This setting is mandatory and Next.js will automatically enforce it."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/54456"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-jsx-compiler-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-jsx-compiler-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-jsx-compiler-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `jsx` compiler option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The jsx option is set to "preserve" because Next.js implements its own optimized JSX transform. This setting is mandatory and Next.js will automatically enforce it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/54456" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1g4Sdi" prefix="r2610" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10087330716259169671"],"question":[0,"What is the default value of `incremental` in Next.js TypeScript configuration?"],"answer":[0,"`incremental` is set to `true` to enable incremental type checking, which speeds up type checking in larger applications by only checking modified files and their dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-incremental-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-incremental-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-incremental-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `incremental` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>incremental</code> is set to <code>true</code> to enable incremental type checking, which speeds up type checking in larger applications by only checking modified files and their dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PQB2y" prefix="r2611" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10402195601344697689"],"question":[0,"When were statically typed links made available in Next.js?"],"answer":[0,"Statically typed links entered beta in Next.js v13.2.0. The feature is now stable under the `typedRoutes` configuration option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"when-were-statically-typed-links-made-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-were-statically-typed-links-made-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-were-statically-typed-links-made-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When were statically typed links made available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Statically typed links entered beta in Next.js v13.2.0. The feature is now stable under the <code>typedRoutes</code> configuration option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yMSzs" prefix="r2612" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11214457977812491645"],"question":[0,"When does Next.js automatically fall back to using Babel instead of SWC?"],"answer":[0,"Next.js automatically falls back to Babel when your application has a custom .babelrc file present."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-next-js-automatically-fall-back-to-using-babel-instead-of-swc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-next-js-automatically-fall-back-to-using-babel-instead-of-swc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-next-js-automatically-fall-back-to-using-babel-instead-of-swc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does Next.js automatically fall back to using Babel instead of SWC?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically falls back to Babel when your application has a custom .babelrc file present.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21c0Py" prefix="r2613" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11554170254469564843"],"question":[0,"What is the default value of `resolveJsonModule` in Next.js TypeScript configuration?"],"answer":[0,"`resolveJsonModule` is set to `true` to allow importing JSON files with full type checking support."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-resolvejsonmodule-in-next-js-typescript-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-resolvejsonmodule-in-next-js-typescript-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-resolvejsonmodule-in-next-js-typescript-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `resolveJsonModule` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>resolveJsonModule</code> is set to <code>true</code> to allow importing JSON files with full type checking support.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ibBAU" prefix="r2614" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11578078571656807296"],"question":[0,"Where are Next.js generated type files written?"],"answer":[0,"Generated type files are written to `<distDir>/types`, typically `.next/dev/types` during development or `.next/types` during builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-next-js-generated-type-files-written"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-next-js-generated-type-files-written" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-next-js-generated-type-files-written" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are Next.js generated type files written?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Generated type files are written to <code><distDir>/types</code>, typically <code>.next/dev/types</code> during development or <code>.next/types</code> during builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Wsjfw" prefix="r2615" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11620124636343172600"],"question":[0,"When was support for next.config.ts (TypeScript config files) added?"],"answer":[0,"Support for next.config.ts was added in Next.js v15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-support-for-next-config-ts-typescript-config-files-added"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-support-for-next-config-ts-typescript-config-files-added" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-support-for-next-config-ts-typescript-config-files-added" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was support for next.config.ts (TypeScript config files) added?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Support for next.config.ts was added in Next.js v15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="zRanF" prefix="r2616" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12043558323253502587"],"question":[0,"What is the default import alias when using create-next-app?"],"answer":[0,"The default import alias is `@/*` which maps to the project root. create-next-app will prompt to customize this during setup."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-import-alias-when-using-create-next-app"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-import-alias-when-using-create-next-app" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-import-alias-when-using-create-next-app" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default import alias when using create-next-app?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default import alias is <code>@/*</code> which maps to the project root. create-next-app will prompt to customize this during setup.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lw5fD" prefix="r2617" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12119133329822772992"],"question":[0,"What is the default value of `moduleResolution` in Next.js TypeScript configuration?"],"answer":[0,"`moduleResolution` is set to \"bundler\" to support package.json imports/exports without requiring file extensions on relative paths, matching Next.js's use of webpack/turbopack."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-moduleresolution-in-next-js-typescript-configuratio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-moduleresolution-in-next-js-typescript-configuratio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-moduleresolution-in-next-js-typescript-configuratio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `moduleResolution` in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>moduleResolution</code> is set to "bundler" to support package.json imports/exports without requiring file extensions on relative paths, matching Next.js's use of webpack/turbopack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XI3xs" prefix="r2618" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14329592655432321528"],"question":[0,"What is the default value of the `typedRoutes` config option?"],"answer":[0,"The default is `false`. When set to `true`, Next.js generates a link definition in `.next/types` containing information about all existing routes for static type checking."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typedroutes-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typedroutes-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typedroutes-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `typedRoutes` config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is <code>false</code>. When set to <code>true</code>, Next.js generates a link definition in <code>.next/types</code> containing information about all existing routes for static type checking.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEE1Ql" prefix="r2619" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14882701569583040962"],"question":[0,"What file does Next.js generate when typedRoutes is enabled?"],"answer":[0,"When typedRoutes is enabled, Next.js generates a `.next/types/link.d.ts` file containing type definitions for all existing routes in your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/fabrikapp/how-to-use-typed-routes-in-nextjs-25jd"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-generate-when-typedroutes-is-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-generate-when-typedroutes-is-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-generate-when-typedroutes-is-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js generate when typedRoutes is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When typedRoutes is enabled, Next.js generates a <code>.next/types/link.d.ts</code> file containing type definitions for all existing routes in your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/fabrikapp/how-to-use-typed-routes-in-nextjs-25jd" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="configuration-assets-resources" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Configuration > Assets & Resources</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 36 questions </span> </div> <div class="space-y-4"> <astro-island uid="1OM9y6" prefix="r2620" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"370602609990355559"],"question":[0,"What is the default value for dangerouslyAllowSVG in image configuration?"],"answer":[0,"`false`. SVG is disabled by default because it can lead to vulnerabilities without proper Content Security Policy headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-dangerouslyallowsvg-in-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-dangerouslyallowsvg-in-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-dangerouslyallowsvg-in-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for dangerouslyAllowSVG in image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>false</code>. SVG is disabled by default because it can lead to vulnerabilities without proper Content Security Policy headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1FHgsG" prefix="r2621" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"478894735638071201"],"question":[0,"What is the default image quality for the Cloudinary loader?"],"answer":[0,"`'auto'` (a string value, not a number)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-quality-for-the-cloudinary-loader"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-quality-for-the-cloudinary-loader" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-quality-for-the-cloudinary-loader" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image quality for the Cloudinary loader?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>'auto'</code> (a string value, not a number)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wRv54" prefix="r2622" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1352146741844526552"],"question":[0,"What is the default minimumCacheTTL for optimized images?"],"answer":[0,"60 seconds. If no configuration is provided and no upstream Cache-Control header exists, the default of 60 seconds is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-minimumcachettl-for-optimized-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-minimumcachettl-for-optimized-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-minimumcachettl-for-optimized-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default minimumCacheTTL for optimized images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>60 seconds. If no configuration is provided and no upstream Cache-Control header exists, the default of 60 seconds is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LNtpI" prefix="r2623" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1683349137870653128"],"question":[0,"What is the default image quality for the ImageEngine loader?"],"answer":[0,"50"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-quality-for-the-imageengine-loader"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-quality-for-the-imageengine-loader" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-quality-for-the-imageengine-loader" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image quality for the ImageEngine loader?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>50</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17FENz" prefix="r2624" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2299469993511988923"],"question":[0,"What is the default quality value for Next.js image optimization?"],"answer":[0,"75. As of Next.js 16, the qualities field is required and defaults to `[75]`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-value-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-value-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-value-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality value for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol start="75"> <li>As of Next.js 16, the qualities field is required and defaults to <code>[75]</code>.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1m8bHE" prefix="r2625" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2327841406472860314"],"question":[0,"Which files and folders does assetPrefix affect?"],"answer":[0,"assetPrefix only affects JavaScript and CSS files loaded from the `/_next/` path (`.next/static/` folder). It does NOT affect the `/public` folder or `/_next/data/` requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"which-files-and-folders-does-assetprefix-affect"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-files-and-folders-does-assetprefix-affect" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-files-and-folders-does-assetprefix-affect" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which files and folders does assetPrefix affect?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>assetPrefix only affects JavaScript and CSS files loaded from the <code>/_next/</code> path (<code>.next/static/</code> folder). It does NOT affect the <code>/public</code> folder or <code>/_next/data/</code> requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Aq098" prefix="r2626" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2971030633685151258"],"question":[0,"Where should robots.txt, sitemap.xml, and favicon.ico be placed in a Next.js project?"],"answer":[0,"These files should be placed in the `public/` folder at the root of the project. They will be accessible at the root URL path (e.g., `/robots.txt`, `/sitemap.xml`, `/favicon.ico`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-robots-txt-sitemap-xml-and-favicon-ico-be-placed-in-a-next-js-proje"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-robots-txt-sitemap-xml-and-favicon-ico-be-placed-in-a-next-js-proje" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-robots-txt-sitemap-xml-and-favicon-ico-be-placed-in-a-next-js-proje" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should robots.txt, sitemap.xml, and favicon.ico be placed in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>These files should be placed in the <code>public/</code> folder at the root of the project. They will be accessible at the root URL path (e.g., <code>/robots.txt</code>, <code>/sitemap.xml</code>, <code>/favicon.ico</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1eMdy3" prefix="r2627" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3300093299232496933"],"question":[0,"Is the port field in remotePatterns required for standard HTTPS URLs?"],"answer":[0,"No. The port should be omitted (not set to empty string) for standard ports. If present (e.g., `:3000`), it must be included in the pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/images"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-port-field-in-remotepatterns-required-for-standard-https-urls"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-port-field-in-remotepatterns-required-for-standard-https-urls" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-port-field-in-remotepatterns-required-for-standard-https-urls" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the port field in remotePatterns required for standard HTTPS URLs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The port should be omitted (not set to empty string) for standard ports. If present (e.g., <code>:3000</code>), it must be included in the pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="VK016" prefix="r2628" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3335955862541565012"],"question":[0,"What control does remotePatterns provide that domains did not?"],"answer":[0,"remotePatterns allows you to specify not just hostnames, but also protocols, ports, and pathname patterns. The domains configuration does not support wildcard pattern matching and cannot restrict protocol, port, or pathname."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.timsanteford.com/posts/migrating-next-js-image-domains-to-remote-patterns/"]]],"topic":[0,"nextjs"],"slug":[0,"what-control-does-remotepatterns-provide-that-domains-did-not"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-control-does-remotepatterns-provide-that-domains-did-not" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-control-does-remotepatterns-provide-that-domains-did-not" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What control does remotePatterns provide that domains did not?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>remotePatterns allows you to specify not just hostnames, but also protocols, ports, and pathname patterns. The domains configuration does not support wildcard pattern matching and cannot restrict protocol, port, or pathname.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.timsanteford.com/posts/migrating-next-js-image-domains-to-remote-patterns/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>timsanteford.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mmohI" prefix="r2629" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3502522468767632470"],"question":[0,"In what order should formats be listed to prioritize AVIF over WebP?"],"answer":[0,"List AVIF first: `formats: ['image/avif', 'image/webp']`. When the Accept header matches more than one configured format, the first match in the array is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-order-should-formats-be-listed-to-prioritize-avif-over-webp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-order-should-formats-be-listed-to-prioritize-avif-over-webp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-order-should-formats-be-listed-to-prioritize-avif-over-webp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what order should formats be listed to prioritize AVIF over WebP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>List AVIF first: <code>formats: ['image/avif', 'image/webp']</code>. When the Accept header matches more than one configured format, the first match in the array is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDu6GY" prefix="r2630" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3962731962234547275"],"question":[0,"Is gzip compression enabled by default in Next.js?"],"answer":[0,"Yes, by default Next.js uses gzip to compress rendered content and static files when using `next start` or a custom server (starting in Next.js 9.0.4)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/compress"]]],"topic":[0,"nextjs"],"slug":[0,"is-gzip-compression-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-gzip-compression-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-gzip-compression-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is gzip compression enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, by default Next.js uses gzip to compress rendered content and static files when using <code>next start</code> or a custom server (starting in Next.js 9.0.4).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/compress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HFCjc" prefix="r2631" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4408091065802872018"],"question":[0,"What is the default distDir value in Next.js?"],"answer":[0,"`.next`. This is where the build output is generated by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-distdir-value-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-distdir-value-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-distdir-value-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default distDir value in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>.next</code>. This is where the build output is generated by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24f9kC" prefix="r2632" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5002937478101025578"],"question":[0,"What is the default trailingSlash behavior in Next.js?"],"answer":[0,"`false`. By default, Next.js will redirect URLs with trailing slashes to their counterpart without a trailing slash (e.g., `/about/` redirects to `/about`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-trailingslash-behavior-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-trailingslash-behavior-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-trailingslash-behavior-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default trailingSlash behavior in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>false</code>. By default, Next.js will redirect URLs with trailing slashes to their counterpart without a trailing slash (e.g., <code>/about/</code> redirects to <code>/about</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bbe94" prefix="r2633" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5440664123834423444"],"question":[0,"What is the default Cache-Control header for files in the public folder?"],"answer":[0,"`Cache-Control: public, max-age=0`. Next.js cannot safely cache assets in the public folder because they may change."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-control-header-for-files-in-the-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-control-header-for-files-in-the-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-control-header-for-files-in-the-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Cache-Control header for files in the public folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>Cache-Control: public, max-age=0</code>. Next.js cannot safely cache assets in the public folder because they may change.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17nPL7" prefix="r2634" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5574329198433332060"],"question":[0,"Why was the public directory introduced instead of using the static directory?"],"answer":[0,"The public directory was introduced to not require the `/static` prefix for assets anymore. There was no reason to maintain both paths."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/static-dir-deprecated"]]],"topic":[0,"nextjs"],"slug":[0,"why-was-the-public-directory-introduced-instead-of-using-the-static-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-was-the-public-directory-introduced-instead-of-using-the-static-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-was-the-public-directory-introduced-instead-of-using-the-static-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why was the public directory introduced instead of using the static directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The public directory was introduced to not require the <code>/static</code> prefix for assets anymore. There was no reason to maintain both paths.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/static-dir-deprecated" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UFcmC" prefix="r2635" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5682473100520828355"],"question":[0,"How does Next.js reference files from the public folder in code?"],"answer":[0,"Files are referenced from the base URL (`/`). For example, `public/avatars/me.png` is accessible at `/avatars/me.png`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-reference-files-from-the-public-folder-in-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-reference-files-from-the-public-folder-in-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-reference-files-from-the-public-folder-in-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js reference files from the public folder in code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Files are referenced from the base URL (<code>/</code>). For example, <code>public/avatars/me.png</code> is accessible at <code>/avatars/me.png</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RpVSQ" prefix="r2636" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6103666558258747585"],"question":[0,"What is the default value for the assetPrefix configuration?"],"answer":[0,"`undefined` in development. It must be explicitly set to a CDN URL string (e.g., 'https://cdn.mydomain.com') in production if needed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-assetprefix-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-assetprefix-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-assetprefix-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the assetPrefix configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>undefined</code> in development. It must be explicitly set to a CDN URL string (e.g., '<a href="https://cdn.mydomain.com">https://cdn.mydomain.com</a>') in production if needed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="StX8z" prefix="r2637" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6598719379654415276"],"question":[0,"What is the default image quality for the ImageKit.io loader?"],"answer":[0,"80"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-quality-for-the-imagekit-io-loader"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-quality-for-the-imagekit-io-loader" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-quality-for-the-imagekit-io-loader" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image quality for the ImageKit.io loader?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>80</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eGkcj" prefix="r2638" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6666358813214283639"],"question":[0,"What is the recommended contentSecurityPolicy when enabling dangerouslyAllowSVG?"],"answer":[0,"`\"default-src 'self'; script-src 'none'; sandbox;\"` - this prevents scripts embedded in the image from executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-contentsecuritypolicy-when-enabling-dangerouslyallowsvg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-contentsecuritypolicy-when-enabling-dangerouslyallowsvg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-contentsecuritypolicy-when-enabling-dangerouslyallowsvg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended contentSecurityPolicy when enabling dangerouslyAllowSVG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>"default-src 'self'; script-src 'none'; sandbox;"</code> - this prevents scripts embedded in the image from executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JBfgs" prefix="r2639" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7042867025095380852"],"question":[0,"What is the default image quality for AWS CloudFront, Cloudflare, Contentful, Fastly, Gumlet, Supabase, and Thumbor loaders?"],"answer":[0,"75"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-quality-for-aws-cloudfront-cloudflare-contentful-fastl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-quality-for-aws-cloudfront-cloudflare-contentful-fastl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-quality-for-aws-cloudfront-cloudflare-contentful-fastl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image quality for AWS CloudFront, Cloudflare, Contentful, Fastly, Gumlet, Supabase, and Thumbor loaders?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>75</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="28iA90" prefix="r2640" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7460537540278828740"],"question":[0,"What are the default deviceSizes for Next.js image optimization?"],"answer":[0,"`[640, 750, 828, 1080, 1200, 1920, 2048, 3840]`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-devicesizes-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-devicesizes-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-devicesizes-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default deviceSizes for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>[640, 750, 828, 1080, 1200, 1920, 2048, 3840]</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Eaxx0" prefix="r2641" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7728704285255661705"],"question":[0,"What is the required name for the static assets folder in Next.js?"],"answer":[0,"The folder must be named `public`. The name cannot be changed and it's the only directory used to serve static assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-name-for-the-static-assets-folder-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-name-for-the-static-assets-folder-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-name-for-the-static-assets-folder-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required name for the static assets folder in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The folder must be named <code>public</code>. The name cannot be changed and it's the only directory used to serve static assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21wosJ" prefix="r2642" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7731531578445568754"],"question":[0,"When are files in the public folder included in the build?"],"answer":[0,"Only assets that are in the public directory at build time will be served by Next.js. Files added after the build will not be available."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-files-in-the-public-folder-included-in-the-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-files-in-the-public-folder-included-in-the-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-files-in-the-public-folder-included-in-the-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are files in the public folder included in the build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only assets that are in the public directory at build time will be served by Next.js. Files added after the build will not be available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdraSB" prefix="r2643" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8347913221849139224"],"question":[0,"Which part of the .next folder should be uploaded to a CDN when using assetPrefix?"],"answer":[0,"Only upload the contents of `.next/static/` to the CDN. Do NOT upload the rest of the `.next/` folder as you should not expose your server code and other configuration to the public."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"which-part-of-the-next-folder-should-be-uploaded-to-a-cdn-when-using-assetprefix"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-part-of-the-next-folder-should-be-uploaded-to-a-cdn-when-using-assetprefix" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-part-of-the-next-folder-should-be-uploaded-to-a-cdn-when-using-assetprefix" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which part of the .next folder should be uploaded to a CDN when using assetPrefix?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only upload the contents of <code>.next/static/</code> to the CDN. Do NOT upload the rest of the <code>.next/</code> folder as you should not expose your server code and other configuration to the public.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1iIyDq" prefix="r2644" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8741264856033906955"],"question":[0,"Can glob patterns be used in the search field of remotePatterns?"],"answer":[0,"No. If search is specified in a pattern, it must match the full search string exactly (including the leading `?`). Globs are not supported for search."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/images"]]],"topic":[0,"nextjs"],"slug":[0,"can-glob-patterns-be-used-in-the-search-field-of-remotepatterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-glob-patterns-be-used-in-the-search-field-of-remotepatterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-glob-patterns-be-used-in-the-search-field-of-remotepatterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can glob patterns be used in the search field of remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. If search is specified in a pattern, it must match the full search string exactly (including the leading <code>?</code>). Globs are not supported for search.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LhTL0" prefix="r2645" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9105758160640727830"],"question":[0,"What is the actual default minimumCacheTTL according to earlier Next.js versions?"],"answer":[0,"14400 seconds (4 hours). This was the documented default in earlier versions, though recent docs mention 60 seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-actual-default-minimumcachettl-according-to-earlier-next-js-versions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-actual-default-minimumcachettl-according-to-earlier-next-js-versions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-actual-default-minimumcachettl-according-to-earlier-next-js-versions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the actual default minimumCacheTTL according to earlier Next.js versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>14400 seconds (4 hours). This was the documented default in earlier versions, though recent docs mention 60 seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDcv8T" prefix="r2646" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11045905616229841020"],"question":[0,"Can basePath be changed at runtime without rebuilding?"],"answer":[0,"No. The basePath value must be set at build time and cannot be changed without re-building as the value is inlined in the client-side bundles."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/basePath"]]],"topic":[0,"nextjs"],"slug":[0,"can-basepath-be-changed-at-runtime-without-rebuilding"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-basepath-be-changed-at-runtime-without-rebuilding" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-basepath-be-changed-at-runtime-without-rebuilding" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can basePath be changed at runtime without rebuilding?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The basePath value must be set at build time and cannot be changed without re-building as the value is inlined in the client-side bundles.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/basePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13XT68" prefix="r2647" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11636118876797153696"],"question":[0,"When was the static directory deprecated in favor of the public directory?"],"answer":[0,"Starting from Next.js 9.1, the `public` directory was introduced and the `static` directory was deprecated. The static directory continues to work with a deprecation message."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/static-dir-deprecated"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-static-directory-deprecated-in-favor-of-the-public-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-static-directory-deprecated-in-favor-of-the-public-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-static-directory-deprecated-in-favor-of-the-public-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the static directory deprecated in favor of the public directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting from Next.js 9.1, the <code>public</code> directory was introduced and the <code>static</code> directory was deprecated. The static directory continues to work with a deprecation message.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/static-dir-deprecated" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="oCoGv" prefix="r2648" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11875997116786000087"],"question":[0,"What is the default Cache-Control header for immutable assets in _next/static?"],"answer":[0,"`public, max-age=31536000, immutable`. These immutable files contain a SHA-hash in the file name, so they can be safely cached indefinitely. This cannot be overridden."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/27746"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-control-header-for-immutable-assets-in-next-static"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-control-header-for-immutable-assets-in-next-static" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-control-header-for-immutable-assets-in-next-static" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Cache-Control header for immutable assets in _next/static?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>public, max-age=31536000, immutable</code>. These immutable files contain a SHA-hash in the file name, so they can be safely cached indefinitely. This cannot be overridden.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/27746" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lKSkA" prefix="r2649" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11942950007364847829"],"question":[0,"What happens if a static file in the public folder has the same name as a file in the pages directory?"],"answer":[0,"This will result in an error. You must not have a static file with the same name as a file in the pages/ directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-a-static-file-in-the-public-folder-has-the-same-name-as-a-file-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-a-static-file-in-the-public-folder-has-the-same-name-as-a-file-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-a-static-file-in-the-public-folder-has-the-same-name-as-a-file-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if a static file in the public folder has the same name as a file in the pages directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>This will result in an error. You must not have a static file with the same name as a file in the pages/ directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YkuDE" prefix="r2650" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12122501369057905932"],"question":[0,"Does basePath automatically apply to next/image src attributes?"],"answer":[0,"No. When using the next/image component, you need to manually add the basePath in front of the src attribute (e.g., `/docs/me.png`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/basePath"]]],"topic":[0,"nextjs"],"slug":[0,"does-basepath-automatically-apply-to-next-image-src-attributes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-basepath-automatically-apply-to-next-image-src-attributes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-basepath-automatically-apply-to-next-image-src-attributes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does basePath automatically apply to next/image src attributes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When using the next/image component, you need to manually add the basePath in front of the src attribute (e.g., <code>/docs/me.png</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/basePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KTsRx" prefix="r2651" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12454140206393350287"],"question":[0,"What is the default image quality for the Imgix loader?"],"answer":[0,"50"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-quality-for-the-imgix-loader"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-quality-for-the-imgix-loader" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-quality-for-the-imgix-loader" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image quality for the Imgix loader?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>50</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="19cjHh" prefix="r2652" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13085353891906754236"],"question":[0,"Which takes precedence for image cache expiration: minimumCacheTTL or upstream Cache-Control?"],"answer":[0,"The expiration (or Max Age) of the optimized image is defined by either the minimumCacheTTL or the upstream image Cache-Control header, whichever is larger."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"which-takes-precedence-for-image-cache-expiration-minimumcachettl-or-upstream-ca"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-takes-precedence-for-image-cache-expiration-minimumcachettl-or-upstream-ca" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-takes-precedence-for-image-cache-expiration-minimumcachettl-or-upstream-ca" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which takes precedence for image cache expiration: minimumCacheTTL or upstream Cache-Control?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The expiration (or Max Age) of the optimized image is defined by either the minimumCacheTTL or the upstream image Cache-Control header, whichever is larger.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QSPTr" prefix="r2653" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13743110441884806319"],"question":[0,"What is the default image format configuration in Next.js?"],"answer":[0,"`['image/webp']`. Next.js automatically detects the browser's supported image formats via the request's Accept header."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-format-configuration-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-format-configuration-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-format-configuration-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image format configuration in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>['image/webp']</code>. Next.js automatically detects the browser's supported image formats via the request's Accept header.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RywzR" prefix="r2654" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14244733518604721958"],"question":[0,"What is the default contentDispositionType for Next.js images?"],"answer":[0,"`attachment` (as of Next.js 15.0.0). This forces the browser to download the image when visiting directly, providing added security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-contentdispositiontype-for-next-js-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-contentdispositiontype-for-next-js-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-contentdispositiontype-for-next-js-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default contentDispositionType for Next.js images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>attachment</code> (as of Next.js 15.0.0). This forces the browser to download the image when visiting directly, providing added security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1OVlAw" prefix="r2655" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14900810591675997244"],"question":[0,"Does the remotePatterns hostname field match subdomains?"],"answer":[0,"No. Hostname matching is exact and case-sensitive. `example.org` is different from `www.example.org` and `assets.example.org`. Use wildcards if needed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/images"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-remotepatterns-hostname-field-match-subdomains"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-remotepatterns-hostname-field-match-subdomains" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-remotepatterns-hostname-field-match-subdomains" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the remotePatterns hostname field match subdomains?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Hostname matching is exact and case-sensitive. <code>example.org</code> is different from <code>www.example.org</code> and <code>assets.example.org</code>. Use wildcards if needed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="static-exports" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Static Exports</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 36 questions </span> </div> <div class="space-y-4"> <astro-island uid="BRR7T" prefix="r2656" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"494885877882279405"],"question":[0,"Is the built-in i18n (Internationalized Routing) feature supported in static exports?"],"answer":[0,"No. Internationalized Routing does not integrate with `output: 'export'` as it requires the Next.js routing layer and server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-built-in-i18n-internationalized-routing-feature-supported-in-static-expor"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-built-in-i18n-internationalized-routing-feature-supported-in-static-expor" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-built-in-i18n-internationalized-routing-feature-supported-in-static-expor" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the built-in i18n (Internationalized Routing) feature supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Internationalized Routing does not integrate with <code>output: 'export'</code> as it requires the Next.js routing layer and server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1y9V07" prefix="r2657" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1096139834705687144"],"question":[0,"How do you configure a custom image loader for static exports?"],"answer":[0,"Set `loader: 'custom'` and specify a `loaderFile` path in the images configuration in next.config.js. Example: `images: { loader: 'custom', loaderFile: './my-loader.ts' }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/export-image-api"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-custom-image-loader-for-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-custom-image-loader-for-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-custom-image-loader-for-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a custom image loader for static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>loader: 'custom'</code> and specify a <code>loaderFile</code> path in the images configuration in next.config.js. Example: <code>images: { loader: 'custom', loaderFile: './my-loader.ts' }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/export-image-api" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Mo0lQ" prefix="r2658" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1445180170082086953"],"question":[0,"What happens when dynamicParams is set to false?"],"answer":[0,"Dynamic segments not included in generateStaticParams will return a 404."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-set-to-false"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-set-to-false" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-set-to-false" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is set to false?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic segments not included in generateStaticParams will return a 404.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28msT1" prefix="r2659" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1519393360949362881"],"question":[0,"Which getStaticPaths fallback values are supported with static exports?"],"answer":[0,"Only `fallback: false` is supported. The `fallback: true` and `fallback: 'blocking'` options require a server and are not compatible with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"which-getstaticpaths-fallback-values-are-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-getstaticpaths-fallback-values-are-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-getstaticpaths-fallback-values-are-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which getStaticPaths fallback values are supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only <code>fallback: false</code> is supported. The <code>fallback: true</code> and <code>fallback: 'blocking'</code> options require a server and are not compatible with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hYTWO" prefix="r2660" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2286071102349845335"],"question":[0,"What is the default value of the distDir configuration option?"],"answer":[0,"The default value is `.next`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-distdir-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-distdir-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-distdir-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the distDir configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>.next</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lMMXM" prefix="r2661" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2611784113780327258"],"question":[0,"What command generates the static export in Next.js?"],"answer":[0,"Running `next build` generates the static export into the output folder when `output: 'export'` is configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-the-static-export-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-the-static-export-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-the-static-export-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates the static export in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Running <code>next build</code> generates the static export into the output folder when <code>output: 'export'</code> is configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8rzce" prefix="r2662" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3037661377209119954"],"question":[0,"What is the minimum Node.js version required for Next.js 14?"],"answer":[0,"Node.js version 18.17 or higher is required. The minimum was bumped from 16.14 to 18.17."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/upgrading/version-14"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js version 18.17 or higher is required. The minimum was bumped from 16.14 to 18.17.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/upgrading/version-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15W3AJ" prefix="r2663" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3067407230598271315"],"question":[0,"Are dynamic routes without generateStaticParams supported in static exports?"],"answer":[0,"No. Dynamic Routes without generateStaticParams() are not supported in static exports because all paths must be known at build time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-dynamic-routes-without-generatestaticparams-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-dynamic-routes-without-generatestaticparams-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-dynamic-routes-without-generatestaticparams-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are dynamic routes without generateStaticParams supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Dynamic Routes without generateStaticParams() are not supported in static exports because all paths must be known at build time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdWWu4" prefix="r2664" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3326947205038346189"],"question":[0,"Is Image Optimization with the default loader supported in static exports?"],"answer":[0,"No. The default loader relies on the Image Optimization API which is not available for exported applications. You must use a custom image loader."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/export-image-api"]]],"topic":[0,"nextjs"],"slug":[0,"is-image-optimization-with-the-default-loader-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-image-optimization-with-the-default-loader-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-image-optimization-with-the-default-loader-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Image Optimization with the default loader supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The default loader relies on the Image Optimization API which is not available for exported applications. You must use a custom image loader.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/export-image-api" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xJNnJ" prefix="r2665" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3940444722290148988"],"question":[0,"What is the difference between basePath and assetPrefix in static exports?"],"answer":[0,"basePath fixes internal links when hosting on a subpath, while assetPrefix fixes the paths for images, CSS stylesheets, and assets from the _next/ path."],"confidence":[0,0.95],"sources":[1,[[0,"https://wallis.dev/blog/next-js-basepath-and-assetprefix"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-basepath-and-assetprefix-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-basepath-and-assetprefix-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-basepath-and-assetprefix-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between basePath and assetPrefix in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>basePath fixes internal links when hosting on a subpath, while assetPrefix fixes the paths for images, CSS stylesheets, and assets from the _next/ path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://wallis.dev/blog/next-js-basepath-and-assetprefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>wallis.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EbvYu" prefix="r2666" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4150085077909700022"],"question":[0,"When trailingSlash is false in a static export, what file extension does the /about page output?"],"answer":[0,"It outputs `/about.html`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"when-trailingslash-is-false-in-a-static-export-what-file-extension-does-the-abou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-trailingslash-is-false-in-a-static-export-what-file-extension-does-the-abou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-trailingslash-is-false-in-a-static-export-what-file-extension-does-the-abou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When trailingSlash is false in a static export, what file extension does the /about page output?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It outputs <code>/about.html</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2u2dtr" prefix="r2667" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4920359781667923641"],"question":[0,"What does the skipTrailingSlashRedirect configuration option do?"],"answer":[0,"It prevents automatic redirects between URLs with and without trailing slashes, instead preserving the href as written."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-skiptrailingslashredirect-configuration-option-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-skiptrailingslashredirect-configuration-option-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-skiptrailingslashredirect-configuration-option-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the skipTrailingSlashRedirect configuration option do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It prevents automatic redirects between URLs with and without trailing slashes, instead preserving the href as written.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11kCVV" prefix="r2668" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5182810181007455086"],"question":[0,"What is the default value of the trailingSlash configuration option?"],"answer":[0,"The default value is `false`. Next.js will redirect URLs with trailing slashes to their counterpart without a trailing slash."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-trailingslash-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-trailingslash-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-trailingslash-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the trailingSlash configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>false</code>. Next.js will redirect URLs with trailing slashes to their counterpart without a trailing slash.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="iTSCN" prefix="r2669" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5505860852992347414"],"question":[0,"What does dynamic = 'force-dynamic' do?"],"answer":[0,"It forces dynamic rendering where routes are rendered for each user at request time. This is equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-force-dynamic-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-force-dynamic-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-force-dynamic-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic = 'force-dynamic' do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces dynamic rendering where routes are rendered for each user at request time. This is equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15mn6R" prefix="r2670" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5849379786945708839"],"question":[0,"Are Client Components supported with static exports?"],"answer":[0,"Yes. Client Components are also pre-rendered to HTML during next build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-client-components-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-client-components-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-client-components-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Client Components supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Client Components are also pre-rendered to HTML during next build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PbL3D" prefix="r2671" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8197599998127467763"],"question":[0,"Which HTTP methods are supported for Route Handlers in static exports?"],"answer":[0,"Only the GET HTTP verb is supported for Route Handlers in static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"which-http-methods-are-supported-for-route-handlers-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-http-methods-are-supported-for-route-handlers-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-http-methods-are-supported-for-route-handlers-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTTP methods are supported for Route Handlers in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the GET HTTP verb is supported for Route Handlers in static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ihXzI" prefix="r2672" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8760659686650342263"],"question":[0,"Are Server Actions supported in static exports?"],"answer":[0,"No. Server Actions require a Node.js server and are not supported with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-actions-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-actions-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-actions-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Actions supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Actions require a Node.js server and are not supported with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FDUtS" prefix="r2673" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9012785052471560399"],"question":[0,"What is the default value of the dynamic segment config option?"],"answer":[0,"The default value is `'auto'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamic-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamic-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamic-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the dynamic segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>'auto'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Frkjp" prefix="r2674" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10379476298001026328"],"question":[0,"In which Next.js version was the next export command deprecated?"],"answer":[0,"The `next export` command was deprecated in Next.js version 13.3."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@jeffkessie50/next-js-14-has-officially-removed-next-export-53ad76b26920"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-next-export-command-deprecated"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-next-export-command-deprecated" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-next-export-command-deprecated" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the next export command deprecated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>next export</code> command was deprecated in Next.js version 13.3.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@jeffkessie50/next-js-14-has-officially-removed-next-export-53ad76b26920" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Ep2yX" prefix="r2675" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11068131073481927167"],"question":[0,"What happens when dynamicParams is set to true?"],"answer":[0,"Dynamic segments not included in generateStaticParams are generated on demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-set-to-true"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-set-to-true" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-set-to-true" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is set to true?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic segments not included in generateStaticParams are generated on demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6xuWE" prefix="r2676" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11404579947615889557"],"question":[0,"In which Next.js version was the next export command removed?"],"answer":[0,"The `next export` command was removed in Next.js version 14."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-14"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-next-export-command-removed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-next-export-command-removed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-next-export-command-removed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the next export command removed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>next export</code> command was removed in Next.js version 14.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pJkDY" prefix="r2677" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11424499126735164649"],"question":[0,"What is the default value of the dynamicParams segment config option?"],"answer":[0,"The default value is `true`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamicparams-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamicparams-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamicparams-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the dynamicParams segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>true</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="w3E4c" prefix="r2678" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11634165217382907046"],"question":[0,"Are Redirects supported in static exports?"],"answer":[0,"No. Redirects require server-side processing and are not supported with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-redirects-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-redirects-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-redirects-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Redirects supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Redirects require server-side processing and are not supported with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WCX5r" prefix="r2679" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11857115280990935203"],"question":[0,"Are dynamic routes with generateStaticParams supported in static exports?"],"answer":[0,"Yes, but only with dynamicParams: false. All possible paths must be pre-generated through generateStaticParams."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-dynamic-routes-with-generatestaticparams-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-dynamic-routes-with-generatestaticparams-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-dynamic-routes-with-generatestaticparams-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are dynamic routes with generateStaticParams supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but only with dynamicParams: false. All possible paths must be pre-generated through generateStaticParams.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2f81dj" prefix="r2680" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11944285186839369566"],"question":[0,"What configuration setting is required in next.config.js to enable static exports?"],"answer":[0,"Set `output: 'export'` in next.config.js to enable static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-setting-is-required-in-next-config-js-to-enable-static-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-setting-is-required-in-next-config-js-to-enable-static-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-setting-is-required-in-next-config-js-to-enable-static-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration setting is required in next.config.js to enable static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>output: 'export'</code> in next.config.js to enable static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="F3gM5" prefix="r2681" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11966586314020723078"],"question":[0,"What are all possible values for the dynamic segment config option?"],"answer":[0,"The possible values are: 'auto', 'force-dynamic', 'error', and 'force-static'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-possible-values-for-the-dynamic-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-possible-values-for-the-dynamic-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-possible-values-for-the-dynamic-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all possible values for the dynamic segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The possible values are: 'auto', 'force-dynamic', 'error', and 'force-static'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UxJNw" prefix="r2682" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12100208564911901848"],"question":[0,"Are API Routes from the Pages Router supported in static exports?"],"answer":[0,"No. API Routes are not supported in static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/api-routes-static-export"]]],"topic":[0,"nextjs"],"slug":[0,"are-api-routes-from-the-pages-router-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-api-routes-from-the-pages-router-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-api-routes-from-the-pages-router-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are API Routes from the Pages Router supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. API Routes are not supported in static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/api-routes-static-export" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xjaIJ" prefix="r2683" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12560433076765387074"],"question":[0,"Is Incremental Static Regeneration (ISR) supported in static exports?"],"answer":[0,"No. ISR requires a Node.js server to handle regeneration and is not supported with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-incremental-static-regeneration-isr-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-incremental-static-regeneration-isr-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-incremental-static-regeneration-isr-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Incremental Static Regeneration (ISR) supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. ISR requires a Node.js server to handle regeneration and is not supported with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15ckBH" prefix="r2684" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12721187365692232232"],"question":[0,"What does dynamic = 'force-static' do?"],"answer":[0,"It forces static rendering and makes cookies(), headers(), and useSearchParams() return empty values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-force-static-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-force-static-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-force-static-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic = 'force-static' do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and makes cookies(), headers(), and useSearchParams() return empty values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="buuUt" prefix="r2685" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12784173113745113086"],"question":[0,"Are Cookies supported in static exports?"],"answer":[0,"No. Reading cookies requires server-side processing at request time, which is not possible with pre-generated static HTML files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-cookies-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-cookies-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-cookies-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Cookies supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Reading cookies requires server-side processing at request time, which is not possible with pre-generated static HTML files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wr586" prefix="r2686" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13252418367705134502"],"question":[0,"Are Server Components supported with static exports?"],"answer":[0,"Yes. Server Components will run during the build, similar to traditional static-site generation, and be rendered into static HTML."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-components-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-components-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-components-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Components supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Components will run during the build, similar to traditional static-site generation, and be rendered into static HTML.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ozCaz" prefix="r2687" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13654479448304868405"],"question":[0,"Is Draft Mode supported in static exports?"],"answer":[0,"No. Draft Mode requires request-time rendering and is not supported with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-draft-mode-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-draft-mode-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-draft-mode-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Draft Mode supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Draft Mode requires request-time rendering and is not supported with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="TI28w" prefix="r2688" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13880980139513123346"],"question":[0,"Can assetPrefix be changed at runtime with static exports?"],"answer":[0,"No. It's not possible to use an assetPrefix that changes at runtime in conjunction with statically generated pages, as runtime configuration is incompatible with Automatic Static Optimization."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"can-assetprefix-be-changed-at-runtime-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-assetprefix-be-changed-at-runtime-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-assetprefix-be-changed-at-runtime-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can assetPrefix be changed at runtime with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It's not possible to use an assetPrefix that changes at runtime in conjunction with statically generated pages, as runtime configuration is incompatible with Automatic Static Optimization.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Gmw9c" prefix="r2689" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14214848554895454513"],"question":[0,"What is the default output directory name for static exports?"],"answer":[0,"The default output directory is `out`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-output-directory-name-for-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-output-directory-name-for-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-output-directory-name-for-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default output directory name for static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default output directory is <code>out</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1i7pTk" prefix="r2690" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14509929786166382232"],"question":[0,"Are Rewrites supported in static exports?"],"answer":[0,"No. Rewrites require server-side processing and are not supported with static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-rewrites-supported-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-rewrites-supported-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-rewrites-supported-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Rewrites supported in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Rewrites require server-side processing and are not supported with static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHKi4B" prefix="r2691" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14887990865497612459"],"question":[0,"In which Next.js version was static export support added for the App Router?"],"answer":[0,"Static export support for the App Router was added in Next.js 13.3 (April 2023) and was included when the App Router became stable in Next.js 13.4 (May 2023)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-4"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-static-export-support-added-for-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-static-export-support-added-for-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-static-export-support-added-for-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was static export support added for the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Static export support for the App Router was added in Next.js 13.3 (April 2023) and was included when the App Router became stable in Next.js 13.4 (May 2023).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-4" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="routing-user-experience-states" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Routing > User Experience States</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 35 questions </span> </div> <div class="space-y-4"> <astro-island uid="qrPmo" prefix="r2692" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"268782071347639535"],"question":[0,"What happens to Client Component state inside template.js on navigation?"],"answer":[0,"Any Client Component inside the template will reset its state on navigation. Effects like useEffect re-synchronize as the component remounts, and DOM elements inside the template are fully recreated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-client-component-state-inside-template-js-on-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-client-component-state-inside-template-js-on-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-client-component-state-inside-template-js-on-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to Client Component state inside template.js on navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any Client Component inside the template will reset its state on navigation. Effects like useEffect re-synchronize as the component remounts, and DOM elements inside the template are fully recreated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ledpY" prefix="r2693" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"708178886356791753"],"question":[0,"What is the browser buffer size threshold that may delay streaming response visibility?"],"answer":[0,"Some browsers buffer a streaming response. You may not see the streamed response until the response exceeds 1024 bytes. This typically only affects 'hello world' applications, but not real applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-browser-buffer-size-threshold-that-may-delay-streaming-response-visi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-browser-buffer-size-threshold-that-may-delay-streaming-response-visi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-browser-buffer-size-threshold-that-may-delay-streaming-response-visi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the browser buffer size threshold that may delay streaming response visibility?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some browsers buffer a streaming response. You may not see the streamed response until the response exceeds 1024 bytes. This typically only affects 'hello world' applications, but not real applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="81XLb" prefix="r2694" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"751279435362886761"],"question":[0,"What prop does template.js receive?"],"answer":[0,"Template accepts a children prop which represents the nested page or child components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"what-prop-does-template-js-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prop-does-template-js-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prop-does-template-js-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prop does template.js receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Template accepts a children prop which represents the nested page or child components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIvoax" prefix="r2695" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"927184512966411544"],"question":[0,"When does template.js remount?"],"answer":[0,"Templates remount when the segment at their level changes (including dynamic params). They do NOT remount when navigation occurs in deeper segments beyond their level or when search parameters change."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-template-js-remount"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-template-js-remount" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-template-js-remount" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does template.js remount?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Templates remount when the segment at their level changes (including dynamic params). They do NOT remount when navigation occurs in deeper segments beyond their level or when search parameters change.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2i3Tln" prefix="r2696" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1506237761555428949"],"question":[0,"What two props does an error.js component receive?"],"answer":[0,"The error component receives two props: (1) error: An instance of Error & { digest?: string }, and (2) reset: A function of type () => void that attempts recovery by re-rendering the segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-props-does-an-error-js-component-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-props-does-an-error-js-component-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-props-does-an-error-js-component-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two props does an error.js component receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error component receives two props: (1) error: An instance of Error & { digest?: string }, and (2) reset: A function of type () => void that attempts recovery by re-rendering the segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KwEph" prefix="r2697" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3349779946273288036"],"question":[0,"Can global-error.js export metadata or generateMetadata?"],"answer":[0,"No. Global error components cannot export metadata or generateMetadata functions because they must be Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"can-global-error-js-export-metadata-or-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-global-error-js-export-metadata-or-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-global-error-js-export-metadata-or-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can global-error.js export metadata or generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Global error components cannot export metadata or generateMetadata functions because they must be Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZI61W5" prefix="r2698" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3834556603658646898"],"question":[0,"What file convention handles 404 errors in Next.js App Router?"],"answer":[0,"The not-found.js (or not-found.tsx) file is used to render UI when the notFound function is thrown within a route segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-convention-handles-404-errors-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-convention-handles-404-errors-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-convention-handles-404-errors-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file convention handles 404 errors in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The not-found.js (or not-found.tsx) file is used to render UI when the notFound function is thrown within a route segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nafDY" prefix="r2699" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4307974475744163320"],"question":[0,"Do not-found.js components accept any props?"],"answer":[0,"No. not-found.js or global-not-found.js components do not accept any props."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"do-not-found-js-components-accept-any-props"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-not-found-js-components-accept-any-props" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-not-found-js-components-accept-any-props" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do not-found.js components accept any props?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. not-found.js or global-not-found.js components do not accept any props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2splpa" prefix="r2700" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4521520334463030884"],"question":[0,"What is the default component type for loading.js files?"],"answer":[0,"By default, loading.js is a Server Component. It can be converted to a Client Component using the 'use client' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-component-type-for-loading-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-component-type-for-loading-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-component-type-for-loading-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default component type for loading.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, loading.js is a Server Component. It can be converted to a Client Component using the 'use client' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6HQgf" prefix="r2701" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4521565872679581581"],"question":[0,"What file convention creates a component that remounts on navigation?"],"answer":[0,"The template.js file creates templates that remount when their segment changes, resetting state and re-synchronizing effects, unlike layouts which persist across routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-convention-creates-a-component-that-remounts-on-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-convention-creates-a-component-that-remounts-on-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-convention-creates-a-component-that-remounts-on-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file convention creates a component that remounts on navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The template.js file creates templates that remount when their segment changes, resetting state and re-synchronizing effects, unlike layouts which persist across routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16wtqE" prefix="r2702" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4962853945825286916"],"question":[0,"What is the error.digest property used for?"],"answer":[0,"The digest is an automatically generated hash of the error thrown, used to match errors in server-side logs. Server Component errors display generic messages to prevent leaking sensitive details, and the digest serves as an identifier."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-error-digest-property-used-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-error-digest-property-used-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-error-digest-property-used-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the error.digest property used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The digest is an automatically generated hash of the error thrown, used to match errors in server-side logs. Server Component errors display generic messages to prevent leaking sensitive details, and the digest serves as an identifier.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jk86m" prefix="r2703" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5008484787164810523"],"question":[0,"How does prefetch='auto' behave differently for static vs dynamic routes?"],"answer":[0,"For static routes, the full route will be prefetched (including all its data). For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-prefetch-auto-behave-differently-for-static-vs-dynamic-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-prefetch-auto-behave-differently-for-static-vs-dynamic-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-prefetch-auto-behave-differently-for-static-vs-dynamic-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does prefetch='auto' behave differently for static vs dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For static routes, the full route will be prefetched (including all its data). For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1idOxS" prefix="r2704" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5205835086662883046"],"question":[0,"What HTTP status code does not-found.js return for streamed responses?"],"answer":[0,"Next.js returns a 200 HTTP status code for streamed responses, and 404 for non-streamed responses."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-not-found-js-return-for-streamed-responses"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-not-found-js-return-for-streamed-responses" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-not-found-js-return-for-streamed-responses" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does not-found.js return for streamed responses?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js returns a 200 HTTP status code for streamed responses, and 404 for non-streamed responses.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ihtp8" prefix="r2705" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5267027168126426036"],"question":[0,"What special HTML requirements does global-error.js have?"],"answer":[0,"Global error components must define their own <html> and <body> tags since they replace the root layout when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-special-html-requirements-does-global-error-js-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-special-html-requirements-does-global-error-js-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-special-html-requirements-does-global-error-js-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What special HTML requirements does global-error.js have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Global error components must define their own <html> and <body> tags since they replace the root layout when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10gSU1" prefix="r2706" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5277205033120869341"],"question":[0,"In which Next.js version was global-error.js introduced?"],"answer":[0,"global-error.js was introduced in version v13.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-global-error-js-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-global-error-js-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-global-error-js-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was global-error.js introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js was introduced in version v13.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iumwL" prefix="r2707" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5420474059335536929"],"question":[0,"Is loading.js supported with static export deployments?"],"answer":[0,"No. The feature works with Node.js servers, Docker containers, and platform-specific adapters, but not with static export deployments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-loading-js-supported-with-static-export-deployments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-loading-js-supported-with-static-export-deployments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-loading-js-supported-with-static-export-deployments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is loading.js supported with static export deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The feature works with Node.js servers, Docker containers, and platform-specific adapters, but not with static export deployments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sSiGh" prefix="r2708" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5424349171987285757"],"question":[0,"How can you detect navigation loading state in Next.js App Router?"],"answer":[0,"All navigations in the Next.js App Router are built on React Transitions, so you can use the useTransition hook and the isPending flag to understand if a transition is currently in-flight."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/41934"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-detect-navigation-loading-state-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-detect-navigation-loading-state-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-detect-navigation-loading-state-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you detect navigation loading state in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All navigations in the Next.js App Router are built on React Transitions, so you can use the useTransition hook and the isPending flag to understand if a transition is currently in-flight.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/41934" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WWfr5" prefix="r2709" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6903958214557820391"],"question":[0,"Is a Suspense boundary required when using useSearchParams?"],"answer":[0,"Yes. During production builds, static pages calling useSearchParams from Client Components must be wrapped in a Suspense boundary, or the build fails. In development, routes render on-demand so this requirement isn't enforced."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-suspense-boundary-required-when-using-usesearchparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-suspense-boundary-required-when-using-usesearchparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-suspense-boundary-required-when-using-usesearchparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a Suspense boundary required when using useSearchParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. During production builds, static pages calling useSearchParams from Client Components must be wrapped in a Suspense boundary, or the build fails. In development, routes render on-demand so this requirement isn't enforced.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aD8O3" prefix="r2710" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7201285272625344034"],"question":[0,"What happens when useSearchParams is called in a statically rendered route?"],"answer":[0,"When a route uses static rendering, calling useSearchParams causes the Client Component tree up to the closest Suspense boundary to become client-side rendered instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-usesearchparams-is-called-in-a-statically-rendered-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-usesearchparams-is-called-in-a-statically-rendered-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-usesearchparams-is-called-in-a-statically-rendered-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when useSearchParams is called in a statically rendered route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a route uses static rendering, calling useSearchParams causes the Client Component tree up to the closest Suspense boundary to become client-side rendered instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20SCjj" prefix="r2711" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7301778531155383790"],"question":[0,"What Client Component hook returns the current pathname?"],"answer":[0,"The usePathname hook is a Client Component hook that returns a string representing the current URL's pathname (e.g., '/', '/dashboard', '/blog/hello-world'), excluding query parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-pathname"]]],"topic":[0,"nextjs"],"slug":[0,"what-client-component-hook-returns-the-current-pathname"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-client-component-hook-returns-the-current-pathname" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-client-component-hook-returns-the-current-pathname" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Client Component hook returns the current pathname?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The usePathname hook is a Client Component hook that returns a string representing the current URL's pathname (e.g., '/', '/dashboard', '/blog/hello-world'), excluding query parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-pathname" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BwHL5" prefix="r2712" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7711455143815047158"],"question":[0,"What happens if default.js doesn't exist for an unmatched parallel route slot?"],"answer":[0,"If default.js doesn't exist for an unmatched slot, a 404 is rendered instead. This prevents accidentally rendering a parallel route on a page that it was not intended for."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-default-js-doesn-t-exist-for-an-unmatched-parallel-route-slot"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-default-js-doesn-t-exist-for-an-unmatched-parallel-route-slot" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-default-js-doesn-t-exist-for-an-unmatched-parallel-route-slot" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if default.js doesn't exist for an unmatched parallel route slot?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If default.js doesn't exist for an unmatched slot, a 404 is rendered instead. This prevents accidentally rendering a parallel route on a page that it was not intended for.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="r1u07" prefix="r2713" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8665064719729456457"],"question":[0,"What configuration option controls Router Cache durations?"],"answer":[0,"The experimental staleTimes configuration (introduced in v14.2.0) enables customizing cache durations. It has two properties: static (default: 5 minutes) and dynamic (default: 0 seconds in v15+), specified in seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-controls-router-cache-durations"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-controls-router-cache-durations" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-controls-router-cache-durations" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option controls Router Cache durations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The experimental staleTimes configuration (introduced in v14.2.0) enables customizing cache durations. It has two properties: static (default: 5 minutes) and dynamic (default: 0 seconds in v15+), specified in seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NeS6H" prefix="r2714" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9525070971987786227"],"question":[0,"Must error.js be a Server Component or Client Component?"],"answer":[0,"Error boundaries must be Client Components, indicated by the 'use client' directive at the file's top."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-js-be-a-server-component-or-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-js-be-a-server-component-or-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-js-be-a-server-component-or-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.js be a Server Component or Client Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error boundaries must be Client Components, indicated by the 'use client' directive at the file's top.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1cbF0O" prefix="r2715" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10849745035127883899"],"question":[0,"Can usePathname be used in Server Components?"],"answer":[0,"No. usePathname is a Client Component hook that requires the 'use client' directive and cannot be used in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-pathname"]]],"topic":[0,"nextjs"],"slug":[0,"can-usepathname-be-used-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-usepathname-be-used-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-usepathname-be-used-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can usePathname be used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. usePathname is a Client Component hook that requires the 'use client' directive and cannot be used in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-pathname" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZxskeW" prefix="r2716" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10903029611141502887"],"question":[0,"What React component does loading.js automatically create?"],"answer":[0,"The loading.js file will automatically wrap the page.js file and any children below in a <Suspense> boundary when placed in a folder. It is nested inside layout.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-component-does-loading-js-automatically-create"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-component-does-loading-js-automatically-create" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-component-does-loading-js-automatically-create" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React component does loading.js automatically create?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The loading.js file will automatically wrap the page.js file and any children below in a <Suspense> boundary when placed in a folder. It is nested inside layout.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hLO8R" prefix="r2717" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11372708533376431560"],"question":[0,"Why might calling notFound() return a 200 status code instead of 404?"],"answer":[0,"When using loading.tsx or when streaming begins before validation, the response headers are already sent to the client with status 200. Once any HTML is flushed, the status code is locked and cannot be updated. To get 404, call notFound() before any streaming starts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"why-might-calling-notfound-return-a-200-status-code-instead-of-404"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-might-calling-notfound-return-a-200-status-code-instead-of-404" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-might-calling-notfound-return-a-200-status-code-instead-of-404" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why might calling notFound() return a 200 status code instead of 404?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using loading.tsx or when streaming begins before validation, the response headers are already sent to the client with status 200. Once any HTML is flushed, the status code is locked and cannot be updated. To get 404, call notFound() before any streaming starts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EzI4R" prefix="r2718" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11830691964826302678"],"question":[0,"Is prefetching enabled in development mode?"],"answer":[0,"No. Prefetching is only enabled in production. Automatic prefetching runs only in production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"is-prefetching-enabled-in-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-prefetching-enabled-in-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-prefetching-enabled-in-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is prefetching enabled in development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Prefetching is only enabled in production. Automatic prefetching runs only in production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dulYO" prefix="r2719" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12151680396052963948"],"question":[0,"What is the difference between not-found.js and global-not-found.js?"],"answer":[0,"global-not-found.js is used when a requested URL doesn't match any route at all and bypasses the app's normal rendering. It must return a full HTML document including <html> and <body> tags. It's useful for apps with multiple root layouts where a standard root-level not-found.js wouldn't work properly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-not-found-js-and-global-not-found-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-not-found-js-and-global-not-found-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-not-found-js-and-global-not-found-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between not-found.js and global-not-found.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-not-found.js is used when a requested URL doesn't match any route at all and bypasses the app's normal rendering. It must return a full HTML document including <html> and <body> tags. It's useful for apps with multiple root layouts where a standard root-level not-found.js wouldn't work properly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17g80W" prefix="r2720" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12317913487544357217"],"question":[0,"What is the default Router Cache duration for dynamic routes in Next.js 15?"],"answer":[0,"For dynamic routes in Next.js v15.0.0+, the Router Cache duration is 0 seconds (previously 30 seconds in v14.2.0)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-router-cache-duration-for-dynamic-routes-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-router-cache-duration-for-dynamic-routes-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-router-cache-duration-for-dynamic-routes-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Router Cache duration for dynamic routes in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For dynamic routes in Next.js v15.0.0+, the Router Cache duration is 0 seconds (previously 30 seconds in v14.2.0).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11ImR3" prefix="r2721" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12694865340528826442"],"question":[0,"What file handles unmatched slots in Next.js parallel routes?"],"answer":[0,"The default.js file serves as a fallback component for unmatched slots during initial load or full-page reload when Next.js cannot determine active state based on the current URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-handles-unmatched-slots-in-next-js-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-handles-unmatched-slots-in-next-js-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-handles-unmatched-slots-in-next-js-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file handles unmatched slots in Next.js parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default.js file serves as a fallback component for unmatched slots during initial load or full-page reload when Next.js cannot determine active state based on the current URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KthNL" prefix="r2722" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12858293111505397565"],"question":[0,"What does useSearchParams return?"],"answer":[0,"useSearchParams is a Client Component hook that reads the current URL's query string and returns a read-only version of the URLSearchParams interface with methods like get(), has(), getAll(), keys(), values(), entries(), forEach(), and toString()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-usesearchparams-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-usesearchparams-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-usesearchparams-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useSearchParams return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useSearchParams is a Client Component hook that reads the current URL's query string and returns a read-only version of the URLSearchParams interface with methods like get(), has(), getAll(), keys(), values(), entries(), forEach(), and toString().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Wvhwr" prefix="r2723" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13415952884631645139"],"question":[0,"What file convention handles runtime errors in Next.js App Router?"],"answer":[0,"The error.js (or error.tsx) file convention allows you to gracefully handle unexpected runtime errors in nested routes by automatically wrapping a route segment and its nested children in a React Error Boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-convention-handles-runtime-errors-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-convention-handles-runtime-errors-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-convention-handles-runtime-errors-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file convention handles runtime errors in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error.js (or error.tsx) file convention allows you to gracefully handle unexpected runtime errors in nested routes by automatically wrapping a route segment and its nested children in a React Error Boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aSICz" prefix="r2724" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13648957683057575810"],"question":[0,"In which Next.js version was error.js introduced?"],"answer":[0,"error.js was introduced in version v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-error-js-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-error-js-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-error-js-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was error.js introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>error.js was introduced in version v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1AXQaG" prefix="r2725" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13781875892760712588"],"question":[0,"Does loading.js accept any parameters or props?"],"answer":[0,"No. Loading UI components accept no parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"does-loading-js-accept-any-parameters-or-props"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-loading-js-accept-any-parameters-or-props" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-loading-js-accept-any-parameters-or-props" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does loading.js accept any parameters or props?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Loading UI components accept no parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1J20aY" prefix="r2726" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14362833190084398901"],"question":[0,"Is template.js a Server Component or Client Component by default?"],"answer":[0,"By default, templates are Server Components but can be marked with 'use client' to become Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"is-template-js-a-server-component-or-client-component-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-template-js-a-server-component-or-client-component-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-template-js-a-server-component-or-client-component-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is template.js a Server Component or Client Component by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, templates are Server Components but can be marked with 'use client' to become Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="routing-dynamic-data-driven-routing" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Routing > Dynamic & Data-Driven Routing</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 35 questions </span> </div> <div class="space-y-4"> <astro-island uid="2bKJM8" prefix="r2727" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"315648928357064786"],"question":[0,"What happens with fallback: false in getStaticPaths?"],"answer":[0,"Any paths not returned by getStaticPaths will result in a 404 page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-with-fallback-false-in-getstaticpaths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-with-fallback-false-in-getstaticpaths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-with-fallback-false-in-getstaticpaths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens with fallback: false in getStaticPaths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any paths not returned by getStaticPaths will result in a 404 page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rt7bv" prefix="r2728" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2187940955337019232"],"question":[0,"What function replaces getStaticPaths in the App Router?"],"answer":[0,"generateStaticParams"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-replaces-getstaticpaths-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-replaces-getstaticpaths-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-replaces-getstaticpaths-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function replaces getStaticPaths in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateStaticParams</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fymlD" prefix="r2729" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2526727247851361929"],"question":[0,"In Next.js 15+, are params synchronous or asynchronous in App Router pages and layouts?"],"answer":[0,"Params are asynchronous - they are Promises that must be awaited using async/await or React's use() function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-are-params-synchronous-or-asynchronous-in-app-router-pages-and-lay"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-are-params-synchronous-or-asynchronous-in-app-router-pages-and-lay" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-are-params-synchronous-or-asynchronous-in-app-router-pages-and-lay" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15+, are params synchronous or asynchronous in App Router pages and layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Params are asynchronous - they are Promises that must be awaited using async/await or React's use() function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xsjST" prefix="r2730" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2691244997817897216"],"question":[0,"Can revalidatePath be called in Client Components?"],"answer":[0,"No, revalidatePath only works in Server Functions and Route Handlers, not in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"can-revalidatepath-be-called-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-revalidatepath-be-called-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-revalidatepath-be-called-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can revalidatePath be called in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, revalidatePath only works in Server Functions and Route Handlers, not in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nGRsi" prefix="r2731" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3613502280942151772"],"question":[0,"What are the two valid values for the type parameter in revalidatePath?"],"answer":[0,"'page' or 'layout'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-valid-values-for-the-type-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-valid-values-for-the-type-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-valid-values-for-the-type-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two valid values for the type parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'page' or 'layout'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2q0fdF" prefix="r2732" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3926390883006041771"],"question":[0,"Can you generate params for dynamic segments below the current layout or page level?"],"answer":[0,"No, you can generate params for dynamic segments above the current layout or page, but not below."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-generate-params-for-dynamic-segments-below-the-current-layout-or-page-le"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-generate-params-for-dynamic-segments-below-the-current-layout-or-page-le" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-generate-params-for-dynamic-segments-below-the-current-layout-or-page-le" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you generate params for dynamic segments below the current layout or page level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you can generate params for dynamic segments above the current layout or page, but not below.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2aDbtn" prefix="r2733" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4035268136106342637"],"question":[0,"Is fallback: 'blocking' supported when using output: 'export'?"],"answer":[0,"No, fallback: 'blocking' is not supported when using output: 'export'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"is-fallback-blocking-supported-when-using-output-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-fallback-blocking-supported-when-using-output-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-fallback-blocking-supported-when-using-output-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is fallback: 'blocking' supported when using output: 'export'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, fallback: 'blocking' is not supported when using output: 'export'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wMdNk" prefix="r2734" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5293656556310186483"],"question":[0,"Can you export both the metadata object and generateMetadata function from the same route segment?"],"answer":[0,"No, you cannot export both the metadata object and generateMetadata function from the same route segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you export both the metadata object and generateMetadata function from the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot export both the metadata object and generateMetadata function from the same route segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QzBxf" prefix="r2735" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5322120053353507003"],"question":[0,"If you have multiple dynamic segments in a route using generateStaticParams, how many times does the child generateStaticParams function execute?"],"answer":[0,"The child generateStaticParams function is executed once for each set of params the parent generates."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"if-you-have-multiple-dynamic-segments-in-a-route-using-generatestaticparams-how-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="if-you-have-multiple-dynamic-segments-in-a-route-using-generatestaticparams-how-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#if-you-have-multiple-dynamic-segments-in-a-route-using-generatestaticparams-how-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">If you have multiple dynamic segments in a route using generateStaticParams, how many times does the child generateStaticParams function execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The child generateStaticParams function is executed once for each set of params the parent generates.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GDchB" prefix="r2736" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5323153287140343015"],"question":[0,"In getServerSideProps context parameter, which property contains the dynamic route parameters?"],"answer":[0,"params - If the page uses a dynamic route, params contains the route parameters. For example, if the page name is [id].js, then params will look like { id: ... }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"in-getserversideprops-context-parameter-which-property-contains-the-dynamic-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-getserversideprops-context-parameter-which-property-contains-the-dynamic-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-getserversideprops-context-parameter-which-property-contains-the-dynamic-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In getServerSideProps context parameter, which property contains the dynamic route parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>params - If the page uses a dynamic route, params contains the route parameters. For example, if the page name is [id].js, then params will look like { id: ... }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23GTiV" prefix="r2737" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5554613176328586004"],"question":[0,"What TypeScript type does a single dynamic segment [slug] have?"],"answer":[0,"{ slug: string }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-does-a-single-dynamic-segment-slug-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-does-a-single-dynamic-segment-slug-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-does-a-single-dynamic-segment-slug-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type does a single dynamic segment [slug] have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>{ slug: string }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ebgPm" prefix="r2738" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5591345614170421396"],"question":[0,"Can useParams be used in Server Components?"],"answer":[0,"No, useParams is a Client Component hook and cannot be used in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"can-useparams-be-used-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-useparams-be-used-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-useparams-be-used-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can useParams be used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, useParams is a Client Component hook and cannot be used in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z160RHN" prefix="r2739" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7312175074180808632"],"question":[0,"What happens with fallback: true in getStaticPaths?"],"answer":[0,"New paths not returned by getStaticPaths will be server-side rendered on first request with a fallback version initially shown, then the page generates in the background and the browser updates when ready. Subsequent requests serve the pre-rendered version."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-with-fallback-true-in-getstaticpaths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-with-fallback-true-in-getstaticpaths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-with-fallback-true-in-getstaticpaths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens with fallback: true in getStaticPaths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>New paths not returned by getStaticPaths will be server-side rendered on first request with a fallback version initially shown, then the page generates in the background and the browser updates when ready. Subsequent requests serve the pre-rendered version.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vrijA" prefix="r2740" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7619153571780432564"],"question":[0,"What is the route matching priority order in Next.js?"],"answer":[0,"Predefined/static routes take precedence over dynamic routes, dynamic routes take precedence over catch-all routes, and catch-all routes have the lowest priority."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-route-matching-priority-order-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-route-matching-priority-order-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-route-matching-priority-order-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the route matching priority order in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Predefined/static routes take precedence over dynamic routes, dynamic routes take precedence over catch-all routes, and catch-all routes have the lowest priority.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2g9P9G" prefix="r2741" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7862612762880504263"],"question":[0,"What does useParams return when there are no dynamic parameters in the route?"],"answer":[0,"An empty object {}"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useparams-return-when-there-are-no-dynamic-parameters-in-the-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useparams-return-when-there-are-no-dynamic-parameters-in-the-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useparams-return-when-there-are-no-dynamic-parameters-in-the-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useParams return when there are no dynamic parameters in the route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An empty object {}</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UkMGo" prefix="r2742" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8112550402356135414"],"question":[0,"What is the syntax for creating a dynamic route segment in the App Router?"],"answer":[0,"Wrap a folder's name in square brackets: [folderName]. For example, app/blog/[slug]/page.js creates a route matching /blog/a, /blog/b, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-creating-a-dynamic-route-segment-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-creating-a-dynamic-route-segment-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-creating-a-dynamic-route-segment-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for creating a dynamic route segment in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap a folder's name in square brackets: [folderName]. For example, app/blog/[slug]/page.js creates a route matching /blog/a, /blog/b, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qrnRv" prefix="r2743" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8391432717056538659"],"question":[0,"What does generateStaticParams return?"],"answer":[0,"An array of objects where each object represents the populated dynamic segments of a single route. You must always return an array, even if it's empty."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-generatestaticparams-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-generatestaticparams-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-generatestaticparams-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does generateStaticParams return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of objects where each object represents the populated dynamic segments of a single route. You must always return an array, even if it's empty.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18yd7t" prefix="r2744" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9117832057133469090"],"question":[0,"In getStaticProps, which context property provides access to dynamic route parameters?"],"answer":[0,"params - It contains the route parameters for pages using dynamic routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"in-getstaticprops-which-context-property-provides-access-to-dynamic-route-parame"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-getstaticprops-which-context-property-provides-access-to-dynamic-route-parame" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-getstaticprops-which-context-property-provides-access-to-dynamic-route-parame" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In getStaticProps, which context property provides access to dynamic route parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>params - It contains the route parameters for pages using dynamic routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2a0Lzf" prefix="r2745" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9276830117517367301"],"question":[0,"In the Pages Router, can you use a URL object with pathname and query properties for Link href?"],"answer":[0,"Yes, Link can receive a URL object like { pathname: '/blog/[slug]', query: { slug: 'my-post' } } to automatically format the URL string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"in-the-pages-router-can-you-use-a-url-object-with-pathname-and-query-properties-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-the-pages-router-can-you-use-a-url-object-with-pathname-and-query-properties-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-the-pages-router-can-you-use-a-url-object-with-pathname-and-query-properties-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In the Pages Router, can you use a URL object with pathname and query properties for Link href?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Link can receive a URL object like { pathname: '/blog/[slug]', query: { slug: 'my-post' } } to automatically format the URL string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQyWR1" prefix="r2746" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9508181001488944804"],"question":[0,"What is the maximum character limit for the path parameter in revalidatePath?"],"answer":[0,"1024 characters"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-limit-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-limit-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-limit-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character limit for the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 characters</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29MmP7" prefix="r2747" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10010442054189777892"],"question":[0,"In the Pages Router with getStaticPaths, what are the three possible values for the fallback option?"],"answer":[0,"false, true, and 'blocking'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"in-the-pages-router-with-getstaticpaths-what-are-the-three-possible-values-for-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-the-pages-router-with-getstaticpaths-what-are-the-three-possible-values-for-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-the-pages-router-with-getstaticpaths-what-are-the-three-possible-values-for-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In the Pages Router with getStaticPaths, what are the three possible values for the fallback option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false, true, and 'blocking'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMp9Ed" prefix="r2748" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10279552380012673841"],"question":[0,"What is the default value of the dynamic route segment config option?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the dynamic route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAH2rM" prefix="r2749" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10650127714786207835"],"question":[0,"What value do params have for an optional catch-all route when no segment is provided in the URL?"],"answer":[0,"{ slug: undefined }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-do-params-have-for-an-optional-catch-all-route-when-no-segment-is-pro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-do-params-have-for-an-optional-catch-all-route-when-no-segment-is-pro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-do-params-have-for-an-optional-catch-all-route-when-no-segment-is-pro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value do params have for an optional catch-all route when no segment is provided in the URL?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>{ slug: undefined }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GEhNA" prefix="r2750" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10732777436682850969"],"question":[0,"What codemod is available to migrate params to async/await in Next.js 15?"],"answer":[0,"next-async-request-api"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-is-available-to-migrate-params-to-async-await-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-is-available-to-migrate-params-to-async-await-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-is-available-to-migrate-params-to-async-await-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod is available to migrate params to async/await in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next-async-request-api</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgPCQi" prefix="r2751" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11765916850017637797"],"question":[0,"What TypeScript type does a catch-all segment [...slug] have?"],"answer":[0,"{ slug: string[] }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-does-a-catch-all-segment-slug-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-does-a-catch-all-segment-slug-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-does-a-catch-all-segment-slug-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type does a catch-all segment [...slug] have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>{ slug: string[] }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1FP5jv" prefix="r2752" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12198694902619496772"],"question":[0,"Is generateMetadata supported in Client Components?"],"answer":[0,"No, generateMetadata is only supported in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"is-generatemetadata-supported-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-generatemetadata-supported-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-generatemetadata-supported-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is generateMetadata supported in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, generateMetadata is only supported in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WmD1K" prefix="r2753" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12551661520533767036"],"question":[0,"What parameters does the generateMetadata function receive?"],"answer":[0,"A props object containing params (Promise of dynamic route parameters) and searchParams (Promise of search params, only in page.js), and a parent parameter (Promise resolving to parent route segment metadata)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-generatemetadata-function-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-generatemetadata-function-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-generatemetadata-function-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the generateMetadata function receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A props object containing params (Promise of dynamic route parameters) and searchParams (Promise of search params, only in page.js), and a parent parameter (Promise resolving to parent route segment metadata).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1w1dOG" prefix="r2754" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12609272963499413999"],"question":[0,"In the App Router, how should you construct Link href for dynamic routes?"],"answer":[0,"Use string interpolation: <Link href={`/blog/${encodeURIComponent(post.slug)}`}>. The App Router does not support dynamic href objects with pathname and query properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/app-dir-dynamic-href"]]],"topic":[0,"nextjs"],"slug":[0,"in-the-app-router-how-should-you-construct-link-href-for-dynamic-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-the-app-router-how-should-you-construct-link-href-for-dynamic-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-the-app-router-how-should-you-construct-link-href-for-dynamic-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In the App Router, how should you construct Link href for dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use string interpolation: <Link href={<code>/blog/${encodeURIComponent(post.slug)}</code>}>. The App Router does not support dynamic href objects with pathname and query properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/app-dir-dynamic-href" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13WpHC" prefix="r2755" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12628060259302233930"],"question":[0,"What is the syntax for creating a catch-all route segment?"],"answer":[0,"Add an ellipsis inside brackets [...folderName]. For example, app/shop/[...slug]/page.js matches /shop/clothes, /shop/clothes/tops, /shop/clothes/tops/t-shirts, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-creating-a-catch-all-route-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-creating-a-catch-all-route-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-creating-a-catch-all-route-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for creating a catch-all route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add an ellipsis inside brackets [...folderName]. For example, app/shop/[...slug]/page.js matches /shop/clothes, /shop/clothes/tops, /shop/clothes/tops/t-shirts, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1fKx9t" prefix="r2756" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12646445514267569508"],"question":[0,"How do you access dynamic route params in App Router Client Components?"],"answer":[0,"Use the useParams hook from 'next/navigation', or use React's use() function on the params prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-access-dynamic-route-params-in-app-router-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-access-dynamic-route-params-in-app-router-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-access-dynamic-route-params-in-app-router-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you access dynamic route params in App Router Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the useParams hook from 'next/navigation', or use React's use() function on the params prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="orJm3" prefix="r2757" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12806678478501963968"],"question":[0,"How do you access dynamic route params in the Pages Router using a hook?"],"answer":[0,"Import useRouter from 'next/router' and access parameters via router.query. For example, router.query.slug."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-access-dynamic-route-params-in-the-pages-router-using-a-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-access-dynamic-route-params-in-the-pages-router-using-a-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-access-dynamic-route-params-in-the-pages-router-using-a-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you access dynamic route params in the Pages Router using a hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import useRouter from 'next/router' and access parameters via router.query. For example, router.query.slug.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1P4YtV" prefix="r2758" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13090544487328923171"],"question":[0,"In parallel routes, if one slot has a dynamic segment, what constraint applies to other slots at that level?"],"answer":[0,"If one slot is dynamic, all slots at that level must be dynamic."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"in-parallel-routes-if-one-slot-has-a-dynamic-segment-what-constraint-applies-to-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-parallel-routes-if-one-slot-has-a-dynamic-segment-what-constraint-applies-to-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-parallel-routes-if-one-slot-has-a-dynamic-segment-what-constraint-applies-to-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In parallel routes, if one slot has a dynamic segment, what constraint applies to other slots at that level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If one slot is dynamic, all slots at that level must be dynamic.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UcSyw" prefix="r2759" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13205529513083368963"],"question":[0,"What does revalidatePath return?"],"answer":[0,"void (it does not return anything)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatepath-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatepath-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatepath-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidatePath return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>void (it does not return anything)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JNPnX" prefix="r2760" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13222904854795304931"],"question":[0,"For an optional catch-all route in Pages Router getStaticPaths, what values can be used to render the root-most route?"],"answer":[0,"null, [], undefined, or false. For example, if you supply slug: false for pages/[[...slug]], Next.js will statically generate the page /."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"for-an-optional-catch-all-route-in-pages-router-getstaticpaths-what-values-can-b"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-an-optional-catch-all-route-in-pages-router-getstaticpaths-what-values-can-b" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-an-optional-catch-all-route-in-pages-router-getstaticpaths-what-values-can-b" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For an optional catch-all route in Pages Router getStaticPaths, what values can be used to render the root-most route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>null, [], undefined, or false. For example, if you supply slug: false for pages/[[...slug]], Next.js will statically generate the page /.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sE7lA" prefix="r2761" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13830665917830722342"],"question":[0,"Are fetch requests automatically memoized in generateStaticParams?"],"answer":[0,"Yes, fetch requests are automatically memoized across generateStaticParams, generateMetadata, Layouts, Pages, and Server Components for the same data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"are-fetch-requests-automatically-memoized-in-generatestaticparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-fetch-requests-automatically-memoized-in-generatestaticparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-fetch-requests-automatically-memoized-in-generatestaticparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are fetch requests automatically memoized in generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, fetch requests are automatically memoized across generateStaticParams, generateMetadata, Layouts, Pages, and Server Components for the same data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-image-source-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Image Source Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 34 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z9Ec60" prefix="r2762" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"181228478885828402"],"question":[0,"When was the images.domains configuration deprecated in Next.js?"],"answer":[0,"The images.domains configuration was deprecated starting with Next.js 12.3.0, and formally deprecated in Next.js 14 in favor of the more flexible and secure images.remotePatterns."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/57747"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-images-domains-configuration-deprecated-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-images-domains-configuration-deprecated-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-images-domains-configuration-deprecated-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the images.domains configuration deprecated in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The images.domains configuration was deprecated starting with Next.js 12.3.0, and formally deprecated in Next.js 14 in favor of the more flexible and secure images.remotePatterns.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/57747" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZUBoEU" prefix="r2763" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"224887219013820667"],"question":[0,"What is required when using a custom loader with the App Router?"],"answer":[0,"Customizing the image loader file requires using Client Components to serialize the provided function. You need to add 'use client' at the top of your loader file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-when-using-a-custom-loader-with-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-when-using-a-custom-loader-with-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-when-using-a-custom-loader-with-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required when using a custom loader with the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Customizing the image loader file requires using Client Components to serialize the provided function. You need to add 'use client' at the top of your loader file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MC9kP" prefix="r2764" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"970663006196019673"],"question":[0,"What properties are available in localPatterns configuration?"],"answer":[0,"localPatterns supports pathname (e.g., '/assets/images/**') and search properties for matching local image paths and query strings."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-localpatterns-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-localpatterns-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-localpatterns-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in localPatterns configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>localPatterns supports pathname (e.g., '/assets/images/**') and search properties for matching local image paths and query strings.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jPRz6" prefix="r2765" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1231272816652947002"],"question":[0,"What is the default quality value for Next.js image optimization?"],"answer":[0,"The default quality value is 75."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-value-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-value-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-value-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality value for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default quality value is 75.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BUVKE" prefix="r2766" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1863522954934067741"],"question":[0,"What three parameters does a custom loader function receive?"],"answer":[0,"A custom loader function receives three parameters: src (the image source), width (desired image width), and quality (optimization quality, defaults to 75)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-parameters-does-a-custom-loader-function-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-parameters-does-a-custom-loader-function-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-parameters-does-a-custom-loader-function-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three parameters does a custom loader function receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A custom loader function receives three parameters: src (the image source), width (desired image width), and quality (optimization quality, defaults to 75).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMa9WC" prefix="r2767" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2036231417537891893"],"question":[0,"How does Next.js handle the search property in remotePatterns?"],"answer":[0,"If search is specified in a pattern, it must match the full search string exactly (including the leading ?). Globs are not supported for search."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-the-search-property-in-remotepatterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-the-search-property-in-remotepatterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-the-search-property-in-remotepatterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle the search property in remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If search is specified in a pattern, it must match the full search string exactly (including the leading ?). Globs are not supported for search.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ztap4Q" prefix="r2768" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2277537824619120858"],"question":[0,"What is the purpose of localPatterns configuration?"],"answer":[0,"localPatterns allows you to allow images from specific local paths to be optimized and block all others, improving security by restricting which local images can be served."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-localpatterns-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-localpatterns-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-localpatterns-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of localPatterns configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>localPatterns allows you to allow images from specific local paths to be optimized and block all others, improving security by restricting which local images can be served.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMCLpe" prefix="r2769" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3155156427319848843"],"question":[0,"What configuration is strongly recommended when using dangerouslyAllowSVG?"],"answer":[0,"When using dangerouslyAllowSVG, it is strongly recommended to also set contentDispositionType to 'attachment' and contentSecurityPolicy to \"default-src 'self'; script-src 'none'; sandbox;\" to prevent scripts embedded in the image from executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-strongly-recommended-when-using-dangerouslyallowsvg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-strongly-recommended-when-using-dangerouslyallowsvg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-strongly-recommended-when-using-dangerouslyallowsvg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is strongly recommended when using dangerouslyAllowSVG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using dangerouslyAllowSVG, it is strongly recommended to also set contentDispositionType to 'attachment' and contentSecurityPolicy to "default-src 'self'; script-src 'none'; sandbox;" to prevent scripts embedded in the image from executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lwCsw" prefix="r2770" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3430380987768534338"],"question":[0,"What must a custom loader function return?"],"answer":[0,"A custom loader function must return a URL string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-a-custom-loader-function-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-a-custom-loader-function-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-a-custom-loader-function-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must a custom loader function return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A custom loader function must return a URL string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sp5HG" prefix="r2771" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4654317435456545535"],"question":[0,"How do you configure a custom image loader globally in next.config.js?"],"answer":[0,"Set loader: 'custom' and loaderFile: './my/image/loader.js' in the images configuration. The loader file must export a default function that accepts {src, width, quality} and returns a URL string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-custom-image-loader-globally-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-custom-image-loader-globally-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-custom-image-loader-globally-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a custom image loader globally in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set loader: 'custom' and loaderFile: './my/image/loader.js' in the images configuration. The loader file must export a default function that accepts {src, width, quality} and returns a URL string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vRsLc" prefix="r2772" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4707233499822655359"],"question":[0,"What wildcard patterns are supported in remotePatterns for hostname and pathname?"],"answer":[0,"* matches a single path segment or subdomain, while ** matches any number of path segments at the end or subdomains at the beginning. The ** syntax does not work in the middle of the pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"what-wildcard-patterns-are-supported-in-remotepatterns-for-hostname-and-pathname"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-wildcard-patterns-are-supported-in-remotepatterns-for-hostname-and-pathname" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-wildcard-patterns-are-supported-in-remotepatterns-for-hostname-and-pathname" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What wildcard patterns are supported in remotePatterns for hostname and pathname?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ul> <li>matches a single path segment or subdomain, while ** matches any number of path segments at the end or subdomains at the beginning. The ** syntax does not work in the middle of the pattern.</li> </ul> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eS2wg" prefix="r2773" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5189938418026135882"],"question":[0,"Does Next.js automatically detect SVG images and disable optimization?"],"answer":[0,"Yes, Next.js automatically sets the unoptimized property when the src prop ends with \".svg\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/53041"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-detect-svg-images-and-disable-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-detect-svg-images-and-disable-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-detect-svg-images-and-disable-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically detect SVG images and disable optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js automatically sets the unoptimized property when the src prop ends with ".svg".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/53041" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2oTJAX" prefix="r2774" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6081893650876176027"],"question":[0,"When should you use the fill property instead of width and height?"],"answer":[0,"Use the fill property when the image dimensions are unknown. The fill property is a boolean that causes the image to expand to the size of the parent element."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"when-should-you-use-the-fill-property-instead-of-width-and-height"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-should-you-use-the-fill-property-instead-of-width-and-height" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-should-you-use-the-fill-property-instead-of-width-and-height" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When should you use the fill property instead of width and height?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the fill property when the image dimensions are unknown. The fill property is a boolean that causes the image to expand to the size of the parent element.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YmyyP" prefix="r2775" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6300610042619454326"],"question":[0,"Are width and height properties required for remote images in Next.js?"],"answer":[0,"Yes, you must set both width and height properties for remote images unless the image is statically imported or you use the fill property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"are-width-and-height-properties-required-for-remote-images-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-width-and-height-properties-required-for-remote-images-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-width-and-height-properties-required-for-remote-images-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are width and height properties required for remote images in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you must set both width and height properties for remote images unless the image is statically imported or you use the fill property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrD3zk" prefix="r2776" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6501765388844896280"],"question":[0,"What happens when you omit optional properties like protocol, port, pathname, or search in remotePatterns?"],"answer":[0,"When omitting these properties, the wildcard ** is implied, which is not recommended because it may allow malicious actors to optimize URLs you did not intend."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-omit-optional-properties-like-protocol-port-pathname-or-se"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-omit-optional-properties-like-protocol-port-pathname-or-se" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-omit-optional-properties-like-protocol-port-pathname-or-se" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you omit optional properties like protocol, port, pathname, or search in remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When omitting these properties, the wildcard ** is implied, which is not recommended because it may allow malicious actors to optimize URLs you did not intend.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IWn0A" prefix="r2777" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7351837859344260131"],"question":[0,"Can you set unoptimized globally for all images in next.config.js?"],"answer":[0,"Yes, since Next.js 12.3.0, the unoptimized prop can be assigned to all images by updating next.config.js with images: { unoptimized: true }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-unoptimized-globally-for-all-images-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-unoptimized-globally-for-all-images-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-unoptimized-globally-for-all-images-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set unoptimized globally for all images in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, since Next.js 12.3.0, the unoptimized prop can be assigned to all images by updating next.config.js with images: { unoptimized: true }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z68o96" prefix="r2778" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7411499718344114955"],"question":[0,"What is the valid range for the quality parameter in Next.js images?"],"answer":[0,"The quality parameter accepts an integer between 1 and 100, where 1 is the lowest quality and 100 is the highest quality."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-valid-range-for-the-quality-parameter-in-next-js-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-valid-range-for-the-quality-parameter-in-next-js-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-valid-range-for-the-quality-parameter-in-next-js-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the valid range for the quality parameter in Next.js images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The quality parameter accepts an integer between 1 and 100, where 1 is the lowest quality and 100 is the highest quality.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHRXdN" prefix="r2779" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8691500533958270076"],"question":[0,"What parent element style is required when using the fill property on Next.js Image?"],"answer":[0,"The parent element must assign position: \"relative\", \"fixed\", or \"absolute\". The image element itself uses position: \"absolute\" by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-parent-element-style-is-required-when-using-the-fill-property-on-next-js-im"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parent-element-style-is-required-when-using-the-fill-property-on-next-js-im" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parent-element-style-is-required-when-using-the-fill-property-on-next-js-im" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parent element style is required when using the fill property on Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The parent element must assign position: "relative", "fixed", or "absolute". The image element itself uses position: "absolute" by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15K0DM" prefix="r2780" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8824168924234514215"],"question":[0,"What is the default image format for Next.js image optimization?"],"answer":[0,"The default format is WebP, configured as formats: ['image/webp']."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/optimizing/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-format-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-format-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-format-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image format for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default format is WebP, configured as formats: ['image/webp'].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/optimizing/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vLRtP" prefix="r2781" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8957739170351139642"],"question":[0,"Can you use a single asterisk (*) as the entire hostname value in remotePatterns?"],"answer":[0,"No, using * as a wildcard for the entire hostname (e.g., hostname: '*') is not allowed due to security reasons."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-a-single-asterisk-as-the-entire-hostname-value-in-remotepatterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-a-single-asterisk-as-the-entire-hostname-value-in-remotepatterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-a-single-asterisk-as-the-entire-hostname-value-in-remotepatterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use a single asterisk (*) as the entire hostname value in remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, using * as a wildcard for the entire hostname (e.g., hostname: '*') is not allowed due to security reasons.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mCETj" prefix="r2782" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9126108888365745691"],"question":[0,"What does the loaderFile path need to be relative to?"],"answer":[0,"The loaderFile must reference a file relative to the root of your Next.js application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-loaderfile-path-need-to-be-relative-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-loaderfile-path-need-to-be-relative-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-loaderfile-path-need-to-be-relative-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the loaderFile path need to be relative to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The loaderFile must reference a file relative to the root of your Next.js application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15Qrf7" prefix="r2783" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9661438108487211961"],"question":[0,"What are the three types of values that the Next.js Image component's src property accepts?"],"answer":[0,"The src property accepts: 1) An internal path string (e.g., '/profile.png' for images in the public folder), 2) An absolute external URL (must be configured with remotePatterns), and 3) A static import (e.g., import profile from './profile.png')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-types-of-values-that-the-next-js-image-component-s-src-proper"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-types-of-values-that-the-next-js-image-component-s-src-proper" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-types-of-values-that-the-next-js-image-component-s-src-proper" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three types of values that the Next.js Image component's src property accepts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The src property accepts: 1) An internal path string (e.g., '/profile.png' for images in the public folder), 2) An absolute external URL (must be configured with remotePatterns), and 3) A static import (e.g., import profile from './profile.png').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="XRdNj" prefix="r2784" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9784056229666496018"],"question":[0,"How does Next.js determine which format to serve when multiple formats are configured?"],"answer":[0,"When the Accept header matches more than one configured format, the first match in the array is used, so the array order matters. For example, with formats: ['image/avif', 'image/webp'], browsers supporting AVIF will receive AVIF first."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/optimizing/images"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-determine-which-format-to-serve-when-multiple-formats-are-confi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-determine-which-format-to-serve-when-multiple-formats-are-confi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-determine-which-format-to-serve-when-multiple-formats-are-confi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js determine which format to serve when multiple formats are configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When the Accept header matches more than one configured format, the first match in the array is used, so the array order matters. For example, with formats: ['image/avif', 'image/webp'], browsers supporting AVIF will receive AVIF first.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/optimizing/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JbOd5" prefix="r2785" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10350896889913439172"],"question":[0,"What happens when an image path doesn't match the localPatterns configuration?"],"answer":[0,"Attempting to optimize any path outside the specified patterns will respond with 400 Bad Request error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-an-image-path-doesn-t-match-the-localpatterns-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-an-image-path-doesn-t-match-the-localpatterns-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-an-image-path-doesn-t-match-the-localpatterns-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when an image path doesn't match the localPatterns configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Attempting to optimize any path outside the specified patterns will respond with 400 Bad Request error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UqlJa" prefix="r2786" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11413183366926607933"],"question":[0,"What is the performance trade-off between AVIF and WebP formats?"],"answer":[0,"AVIF generally takes 50% longer to encode but compresses 20% smaller compared to WebP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/optimizing/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-performance-trade-off-between-avif-and-webp-formats"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-performance-trade-off-between-avif-and-webp-formats" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-performance-trade-off-between-avif-and-webp-formats" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the performance trade-off between AVIF and WebP formats?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AVIF generally takes 50% longer to encode but compresses 20% smaller compared to WebP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/optimizing/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2sKKyY" prefix="r2787" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11602087952904331231"],"question":[0,"Does the Next.js Image Optimization API forward headers when fetching remote images?"],"answer":[0,"No, for security reasons, the Image Optimization API using the default loader will not forward headers when fetching the src image. If your image requires authentication, use the unoptimized property instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-next-js-image-optimization-api-forward-headers-when-fetching-remote-ima"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-next-js-image-optimization-api-forward-headers-when-fetching-remote-ima" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-next-js-image-optimization-api-forward-headers-when-fetching-remote-ima" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Next.js Image Optimization API forward headers when fetching remote images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, for security reasons, the Image Optimization API using the default loader will not forward headers when fetching the src image. If your image requires authentication, use the unoptimized property instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmqBxe" prefix="r2788" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11810650481624637004"],"question":[0,"What is the key security limitation of the deprecated domains configuration compared to remotePatterns?"],"answer":[0,"The domains property does not support wildcard pattern matching, nor can it restrict protocol, port, and pathname, so any route of a provided hostname can be used for external images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-key-security-limitation-of-the-deprecated-domains-configuration-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-key-security-limitation-of-the-deprecated-domains-configuration-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-key-security-limitation-of-the-deprecated-domains-configuration-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the key security limitation of the deprecated domains configuration compared to remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The domains property does not support wildcard pattern matching, nor can it restrict protocol, port, and pathname, so any route of a provided hostname can be used for external images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDYpfD" prefix="r2789" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12315258291981708331"],"question":[0,"Does the protocol in remotePatterns need to match exactly?"],"answer":[0,"Yes, the protocol (http vs https) must match exactly. To support both HTTP and HTTPS images from the same domain, you need to define separate patterns for each protocol."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-protocol-in-remotepatterns-need-to-match-exactly"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-protocol-in-remotepatterns-need-to-match-exactly" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-protocol-in-remotepatterns-need-to-match-exactly" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the protocol in remotePatterns need to match exactly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the protocol (http vs https) must match exactly. To support both HTTP and HTTPS images from the same domain, you need to define separate patterns for each protocol.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1wxnXu" prefix="r2790" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12615476268895887884"],"question":[0,"Why do props passed to the loader function require Client Components?"],"answer":[0,"Using props like loader which accept a function requires using Client Components because props passed from Server to Client components must be serializable by React, and functions are not serializable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"why-do-props-passed-to-the-loader-function-require-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-do-props-passed-to-the-loader-function-require-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-do-props-passed-to-the-loader-function-require-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why do props passed to the loader function require Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using props like loader which accept a function requires using Client Components because props passed from Server to Client components must be serializable by React, and functions are not serializable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1c4K8X" prefix="r2791" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13186633978282370851"],"question":[0,"Which property in remotePatterns is required and which are optional?"],"answer":[0,"Only hostname is required. The protocol, port, pathname, and search properties are all optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-host"]]],"topic":[0,"nextjs"],"slug":[0,"which-property-in-remotepatterns-is-required-and-which-are-optional"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-property-in-remotepatterns-is-required-and-which-are-optional" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-property-in-remotepatterns-is-required-and-which-are-optional" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which property in remotePatterns is required and which are optional?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only hostname is required. The protocol, port, pathname, and search properties are all optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-host" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCOB0D" prefix="r2792" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13828440157867608366"],"question":[0,"What values are automatically inferred when using static image imports?"],"answer":[0,"Next.js automatically generates width, height, and blurDataURL values for statically imported images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-values-are-automatically-inferred-when-using-static-image-imports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-values-are-automatically-inferred-when-using-static-image-imports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-values-are-automatically-inferred-when-using-static-image-imports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What values are automatically inferred when using static image imports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically generates width, height, and blurDataURL values for statically imported images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zFNDq" prefix="r2793" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14588827571145400571"],"question":[0,"What is the default value for contentSecurityPolicy in Next.js image configuration?"],"answer":[0,"The default value is: \"script-src 'none'; frame-src 'none'; sandbox;\""],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/image-config.ts"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-contentsecuritypolicy-in-next-js-image-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-contentsecuritypolicy-in-next-js-image-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-contentsecuritypolicy-in-next-js-image-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for contentSecurityPolicy in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is: "script-src 'none'; frame-src 'none'; sandbox;"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/image-config.ts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MyWCC" prefix="r2794" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14638657525577240569"],"question":[0,"Is the alt property required for Next.js Image components?"],"answer":[0,"Yes, the alt property is required and mandatory for all Next.js Image components since Next.js 13. For decorative images, use an empty string (alt=\"\")."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-alt-property-required-for-next-js-image-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-alt-property-required-for-next-js-image-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-alt-property-required-for-next-js-image-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the alt property required for Next.js Image components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the alt property is required and mandatory for all Next.js Image components since Next.js 13. For decorative images, use an empty string (alt="").</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="10bMb" prefix="r2795" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14877348164236872710"],"question":[0,"What is recommended for the search property in localPatterns to prevent security issues?"],"answer":[0,"Omitting the search property allows all search parameters which could allow malicious actors to optimize URLs you did not intend. Try using a specific value like search: '?v=2' to ensure an exact match, or use an empty string search: '' to disallow query strings."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-recommended-for-the-search-property-in-localpatterns-to-prevent-security"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-recommended-for-the-search-property-in-localpatterns-to-prevent-security" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-recommended-for-the-search-property-in-localpatterns-to-prevent-security" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is recommended for the search property in localPatterns to prevent security issues?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Omitting the search property allows all search parameters which could allow malicious actors to optimize URLs you did not intend. Try using a specific value like search: '?v=2' to ensure an exact match, or use an empty string search: '' to disallow query strings.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-handlers-response-generation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Handlers > Response Generation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 34 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1Ts5M" prefix="r2796" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"383112314753011857"],"question":[0,"What special Route Handlers remain static by default in Next.js 15?"],"answer":[0,"Special Route Handlers like sitemap.ts, opengraph-image.tsx, icon.tsx, and other metadata files remain static by default unless they use dynamic functions or dynamic config options."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-special-route-handlers-remain-static-by-default-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-special-route-handlers-remain-static-by-default-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-special-route-handlers-remain-static-by-default-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What special Route Handlers remain static by default in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Special Route Handlers like sitemap.ts, opengraph-image.tsx, icon.tsx, and other metadata files remain static by default unless they use dynamic functions or dynamic config options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gUHvP" prefix="r2797" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"475154156693828616"],"question":[0,"What is the default status code for NextResponse.redirect()?"],"answer":[0,"NextResponse.redirect() uses status code 307 (temporary redirect) by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/33505"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-status-code-for-nextresponse-redirect"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-status-code-for-nextresponse-redirect" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-status-code-for-nextresponse-redirect" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default status code for NextResponse.redirect()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.redirect() uses status code 307 (temporary redirect) by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/33505" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vbXwB" prefix="r2798" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"805200109731200813"],"question":[0,"What type does the request parameter have in a Route Handler?"],"answer":[0,"The request parameter is typed as NextRequest, which extends the Web Request API and provides additional convenience methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-does-the-request-parameter-have-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-does-the-request-parameter-have-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-does-the-request-parameter-have-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type does the request parameter have in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The request parameter is typed as NextRequest, which extends the Web Request API and provides additional convenience methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoMtiE" prefix="r2799" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"854897276012423491"],"question":[0,"What HTTP methods can be cached in Next.js Route Handlers?"],"answer":[0,"Only GET methods can be cached. Other supported HTTP methods (POST, PUT, PATCH, DELETE, HEAD, OPTIONS) are not cached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-can-be-cached-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-can-be-cached-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-can-be-cached-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods can be cached in Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only GET methods can be cached. Other supported HTTP methods (POST, PUT, PATCH, DELETE, HEAD, OPTIONS) are not cached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cv4Fh" prefix="r2800" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"958030402953839577"],"question":[0,"When does Next.js stop prerendering a GET Route Handler?"],"answer":[0,"Prerendering stops if the GET handler accesses runtime APIs like cookies(), headers(), connection(), or performs non-deterministic operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-next-js-stop-prerendering-a-get-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-next-js-stop-prerendering-a-get-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-next-js-stop-prerendering-a-get-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does Next.js stop prerendering a GET Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prerendering stops if the GET handler accesses runtime APIs like cookies(), headers(), connection(), or performs non-deterministic operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15y2NJ" prefix="r2801" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1079660392400627714"],"question":[0,"What happens if OPTIONS method is not explicitly defined in a Route Handler?"],"answer":[0,"Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-options-method-is-not-explicitly-defined-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-options-method-is-not-explicitly-defined-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-options-method-is-not-explicitly-defined-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if OPTIONS method is not explicitly defined in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOcvqA" prefix="r2802" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1084002373309393071"],"question":[0,"What status codes does Next.js use for temporary vs permanent redirects?"],"answer":[0,"Next.js uses 307 for temporary redirects (default) and 308 for permanent redirects to preserve the request method."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"what-status-codes-does-next-js-use-for-temporary-vs-permanent-redirects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-status-codes-does-next-js-use-for-temporary-vs-permanent-redirects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-status-codes-does-next-js-use-for-temporary-vs-permanent-redirects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What status codes does Next.js use for temporary vs permanent redirects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses 307 for temporary redirects (default) and 308 for permanent redirects to preserve the request method.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="x88tp" prefix="r2803" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1397987834241759271"],"question":[0,"What does cookies().delete(name) return?"],"answer":[0,"It returns true if the cookie was deleted, false if nothing was deleted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-cookies-delete-name-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-cookies-delete-name-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-cookies-delete-name-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does cookies().delete(name) return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It returns true if the cookie was deleted, false if nothing was deleted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27vQn0" prefix="r2804" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2210629389454940878"],"question":[0,"What happens if an unsupported HTTP method is called on a Next.js Route Handler?"],"answer":[0,"Next.js will return a 405 Method Not Allowed response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-an-unsupported-http-method-is-called-on-a-next-js-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-an-unsupported-http-method-is-called-on-a-next-js-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-an-unsupported-http-method-is-called-on-a-next-js-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if an unsupported HTTP method is called on a Next.js Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will return a 405 Method Not Allowed response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2k0Ipx" prefix="r2805" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3043624163945496895"],"question":[0,"What Web API methods can you use to read the request body in Route Handlers?"],"answer":[0,"You can use request.json(), request.formData(), and request.text() to read JSON, form data, and plain text respectively."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-web-api-methods-can-you-use-to-read-the-request-body-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-web-api-methods-can-you-use-to-read-the-request-body-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-web-api-methods-can-you-use-to-read-the-request-body-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Web API methods can you use to read the request body in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use request.json(), request.formData(), and request.text() to read JSON, form data, and plain text respectively.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UTkjk" prefix="r2806" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3543867123320013516"],"question":[0,"What does 'export const dynamic = \"force-static\"' do in a Route Handler?"],"answer":[0,"It forces static rendering and caches the data of the Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-force-static-do-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-force-static-do-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-force-static-do-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'export const dynamic = "force-static"' do in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and caches the data of the Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JeU5H" prefix="r2807" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3804357386700961417"],"question":[0,"What is the default maximum body size for middleware and proxy in Next.js?"],"answer":[0,"The default maximum body size is 10MB. This can be configured using middlewareClientMaxBodySize or proxyClientMaxBodySize in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/proxyClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-body-size-for-middleware-and-proxy-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-body-size-for-middleware-and-proxy-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-body-size-for-middleware-and-proxy-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum body size for middleware and proxy in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default maximum body size is 10MB. This can be configured using middlewareClientMaxBodySize or proxyClientMaxBodySize in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/proxyClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIgulc" prefix="r2808" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3855538502650063699"],"question":[0,"Is the params context parameter synchronous or asynchronous in Next.js 15 Route Handlers?"],"answer":[0,"In Next.js 15, params is a Promise that must be awaited: const { slug } = await params"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-params-context-parameter-synchronous-or-asynchronous-in-next-js-15-route-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-params-context-parameter-synchronous-or-asynchronous-in-next-js-15-route-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-params-context-parameter-synchronous-or-asynchronous-in-next-js-15-route-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the params context parameter synchronous or asynchronous in Next.js 15 Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, params is a Promise that must be awaited: const { slug } = await params</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kDWhy" prefix="r2809" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3912136397733294214"],"question":[0,"Can you set cookies after streaming starts in a Route Handler?"],"answer":[0,"No, HTTP does not allow setting cookies after streaming starts. Cookie modifications must occur before streaming begins."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-cookies-after-streaming-starts-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-cookies-after-streaming-starts-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-cookies-after-streaming-starts-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set cookies after streaming starts in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, HTTP does not allow setting cookies after streaming starts. Cookie modifications must occur before streaming begins.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1S4s7B" prefix="r2810" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4867228713800909766"],"question":[0,"Can you configure request body size limits for Route Handlers in the App Router?"],"answer":[0,"No, it is not possible to set body size limits for Route Handlers in the App Router. You might want to use Server Actions with bodySizeLimit instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/57501"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-configure-request-body-size-limits-for-route-handlers-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-configure-request-body-size-limits-for-route-handlers-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-configure-request-body-size-limits-for-route-handlers-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you configure request body size limits for Route Handlers in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, it is not possible to set body size limits for Route Handlers in the App Router. You might want to use Server Actions with bodySizeLimit instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/57501" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CJsGD" prefix="r2811" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4913007093905587755"],"question":[0,"What methods are available on the cookies() API in Route Handlers?"],"answer":[0,"The cookies() API provides: get(name), getAll(), has(name), set(name, value, options), delete(name), and toString()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-cookies-api-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-cookies-api-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-cookies-api-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the cookies() API in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies() API provides: get(name), getAll(), has(name), set(name, value, options), delete(name), and toString().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GcJxL" prefix="r2812" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5175741407856191921"],"question":[0,"What does 'export const revalidate = 0' do in a Route Handler?"],"answer":[0,"It ensures the Route Handler is always dynamically rendered even if no Dynamic APIs or uncached data fetches are discovered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-revalidate-0-do-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-revalidate-0-do-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-revalidate-0-do-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'export const revalidate = 0' do in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures the Route Handler is always dynamically rendered even if no Dynamic APIs or uncached data fetches are discovered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1naurd" prefix="r2813" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5743957677334657055"],"question":[0,"How do you access URL search parameters in a Route Handler using the standard Request object?"],"answer":[0,"Use new URL(request.url): const { searchParams } = new URL(request.url); const my_param = searchParams.get('my_param');"],"confidence":[0,0.95],"sources":[1,[[0,"https://www.slingacademy.com/article/next-js-how-to-access-search-params-in-route-handlers/"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-access-url-search-parameters-in-a-route-handler-using-the-standard-re"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-access-url-search-parameters-in-a-route-handler-using-the-standard-re" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-access-url-search-parameters-in-a-route-handler-using-the-standard-re" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you access URL search parameters in a Route Handler using the standard Request object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use new URL(request.url): const { searchParams } = new URL(request.url); const my_param = searchParams.get('my_param');</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.slingacademy.com/article/next-js-how-to-access-search-params-in-route-handlers/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>slingacademy.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gYi8F" prefix="r2814" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6241696366628998243"],"question":[0,"What is the default status code when using NextResponse.json() without specifying a status?"],"answer":[0,"The default status code is 200."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-status-code-when-using-nextresponse-json-without-specifying-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-status-code-when-using-nextresponse-json-without-specifying-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-status-code-when-using-nextresponse-json-without-specifying-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default status code when using NextResponse.json() without specifying a status?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default status code is 200.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15c99L" prefix="r2815" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6685942829895677437"],"question":[0,"What are the three call signatures for cookies().set()?"],"answer":[0,"1) cookieStore.set('name', 'value'), 2) cookieStore.set('name', 'value', { secure: true }), 3) cookieStore.set({ name: 'name', value: 'value', httpOnly: true, path: '/' })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-call-signatures-for-cookies-set"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-call-signatures-for-cookies-set" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-call-signatures-for-cookies-set" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three call signatures for cookies().set()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>cookieStore.set('name', 'value'), 2) cookieStore.set('name', 'value', { secure: true }), 3) cookieStore.set({ name: 'name', value: 'value', httpOnly: true, path: '/' })</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vAaR8" prefix="r2816" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7527528758770871950"],"question":[0,"What does NextResponse.redirect() do compared to NextResponse.rewrite()?"],"answer":[0,"NextResponse.redirect() produces a redirect response that changes the URL visible in the browser, while NextResponse.rewrite() proxies the given URL while preserving the original URL in the browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-redirect-do-compared-to-nextresponse-rewrite"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-redirect-do-compared-to-nextresponse-rewrite" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-redirect-do-compared-to-nextresponse-rewrite" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.redirect() do compared to NextResponse.rewrite()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.redirect() produces a redirect response that changes the URL visible in the browser, while NextResponse.rewrite() proxies the given URL while preserving the original URL in the browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cjmnB" prefix="r2817" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7558852114548512660"],"question":[0,"Are GET Route Handlers cached by default in Next.js 15?"],"answer":[0,"No, GET Route Handlers are not cached by default in Next.js 15. This changed from Next.js 14 where GET methods were cached by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"are-get-route-handlers-cached-by-default-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-get-route-handlers-cached-by-default-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-get-route-handlers-cached-by-default-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are GET Route Handlers cached by default in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, GET Route Handlers are not cached by default in Next.js 15. This changed from Next.js 14 where GET methods were cached by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="QDeCh" prefix="r2818" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8668892493219414872"],"question":[0,"How do you access URL search parameters in a Route Handler using NextRequest?"],"answer":[0,"Use request.nextUrl.searchParams: const searchParams = request.nextUrl.searchParams; const query = searchParams.get('query');"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-access-url-search-parameters-in-a-route-handler-using-nextrequest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-access-url-search-parameters-in-a-route-handler-using-nextrequest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-access-url-search-parameters-in-a-route-handler-using-nextrequest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you access URL search parameters in a Route Handler using NextRequest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use request.nextUrl.searchParams: const searchParams = request.nextUrl.searchParams; const query = searchParams.get('query');</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1II5v1" prefix="r2819" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9520923795697899023"],"question":[0,"What is the difference between Response.json() and NextResponse.json()?"],"answer":[0,"Both can create JSON responses, but NextResponse extends Web Response API with additional methods for cookies (cookies.set(), cookies.get(), cookies.delete()), redirects, rewrites, and NextResponse.next() for middleware."],"confidence":[0,0.95],"sources":[1,[[0,"https://tigerabrodi.blog/nextresponse-vs-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-response-json-and-nextresponse-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-response-json-and-nextresponse-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-response-json-and-nextresponse-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between Response.json() and NextResponse.json()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both can create JSON responses, but NextResponse extends Web Response API with additional methods for cookies (cookies.set(), cookies.get(), cookies.delete()), redirects, rewrites, and NextResponse.next() for middleware.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tigerabrodi.blog/nextresponse-vs-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tigerabrodi.blog</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZO68iK" prefix="r2820" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9755498878718300337"],"question":[0,"Why does Next.js use 307/308 instead of 302/301 for redirects?"],"answer":[0,"Many browsers changed the request method from POST to GET when using 302, regardless of the original request method. Status codes 307/308 explicitly preserve the request method used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"why-does-next-js-use-307-308-instead-of-302-301-for-redirects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-does-next-js-use-307-308-instead-of-302-301-for-redirects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-does-next-js-use-307-308-instead-of-302-301-for-redirects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why does Next.js use 307/308 instead of 302/301 for redirects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Many browsers changed the request method from POST to GET when using 302, regardless of the original request method. Status codes 307/308 explicitly preserve the request method used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1O9qvd" prefix="r2821" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10285397610039295486"],"question":[0,"How do you create a streaming response in a Next.js Route Handler?"],"answer":[0,"Create a ReadableStream with a controller, use TextEncoder to encode chunks, call controller.enqueue(chunk) to add data, and controller.close() when done, then return new Response(stream)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-streaming-response-in-a-next-js-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-streaming-response-in-a-next-js-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-streaming-response-in-a-next-js-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a streaming response in a Next.js Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a ReadableStream with a controller, use TextEncoder to encode chunks, call controller.enqueue(chunk) to add data, and controller.close() when done, then return new Response(stream).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nlGY5" prefix="r2822" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10344338413327747160"],"question":[0,"What route segment config options control caching behavior in Route Handlers?"],"answer":[0,"The 'dynamic' option (values: 'auto', 'force-dynamic', 'force-static') and 'revalidate' option (number in seconds or 0 for always dynamic)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-route-segment-config-options-control-caching-behavior-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-route-segment-config-options-control-caching-behavior-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-route-segment-config-options-control-caching-behavior-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What route segment config options control caching behavior in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'dynamic' option (values: 'auto', 'force-dynamic', 'force-static') and 'revalidate' option (number in seconds or 0 for always dynamic).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28b8Ne" prefix="r2823" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11451427713046515676"],"question":[0,"What is the default Content-Type header for Response.json() and NextResponse.json()?"],"answer":[0,"The default Content-Type is 'application/json' without the charset specification."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-content-type-header-for-response-json-and-nextresponse-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-content-type-header-for-response-json-and-nextresponse-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-content-type-header-for-response-json-and-nextresponse-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Content-Type header for Response.json() and NextResponse.json()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default Content-Type is 'application/json' without the charset specification.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28v6Bq" prefix="r2824" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11678787139275779643"],"question":[0,"How do you opt into caching for GET Route Handlers in Next.js 15?"],"answer":[0,"Use a route config option such as 'export const dynamic = \"force-static\"' in your Route Handler file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-opt-into-caching-for-get-route-handlers-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-opt-into-caching-for-get-route-handlers-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-opt-into-caching-for-get-route-handlers-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you opt into caching for GET Route Handlers in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use a route config option such as 'export const dynamic = "force-static"' in your Route Handler file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LTBQc" prefix="r2825" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11982950145908769581"],"question":[0,"Are the cookies() and headers() functions asynchronous in Next.js 15?"],"answer":[0,"Yes, in Next.js 15, cookies() and headers() are asynchronous functions that return promises and must be awaited. In version 14 and earlier, they were synchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"are-the-cookies-and-headers-functions-asynchronous-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-the-cookies-and-headers-functions-asynchronous-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-the-cookies-and-headers-functions-asynchronous-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are the cookies() and headers() functions asynchronous in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, in Next.js 15, cookies() and headers() are asynchronous functions that return promises and must be awaited. In version 14 and earlier, they were synchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2m8f10" prefix="r2826" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12090402131252134748"],"question":[0,"Does the automatic OPTIONS implementation handle CORS preflight requests properly?"],"answer":[0,"No, while Next.js automatically implements OPTIONS, you need to explicitly define your own OPTIONS handler with appropriate CORS headers to properly handle preflight requests for cross-origin requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-automatic-options-implementation-handle-cors-preflight-requests-properl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-automatic-options-implementation-handle-cors-preflight-requests-properl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-automatic-options-implementation-handle-cors-preflight-requests-properl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the automatic OPTIONS implementation handle CORS preflight requests properly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, while Next.js automatically implements OPTIONS, you need to explicitly define your own OPTIONS handler with appropriate CORS headers to properly handle preflight requests for cross-origin requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOC80v" prefix="r2827" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13340430064165506649"],"question":[0,"What does 'export const dynamic = \"force-dynamic\"' do in a Route Handler?"],"answer":[0,"It forces dynamic rendering, which results in the route being rendered for each user at request time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-force-dynamic-do-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-force-dynamic-do-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-force-dynamic-do-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'export const dynamic = "force-dynamic"' do in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces dynamic rendering, which results in the route being rendered for each user at request time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1f2Bxy" prefix="r2828" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13998742219796115143"],"question":[0,"What does NextResponse.json() return when called with data and options?"],"answer":[0,"It returns a Response object with a JSON body, accepting an optional second parameter for status code and headers: NextResponse.json({ error: 'Internal Server Error' }, { status: 500 })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-json-return-when-called-with-data-and-options"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-json-return-when-called-with-data-and-options" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-json-return-when-called-with-data-and-options" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.json() return when called with data and options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It returns a Response object with a JSON body, accepting an optional second parameter for status code and headers: NextResponse.json({ error: 'Internal Server Error' }, { status: 500 })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zp1t7E" prefix="r2829" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14139607490759752750"],"question":[0,"What convenience methods does NextRequest provide over the standard Request object?"],"answer":[0,"NextRequest provides easier access to cookies (request.cookies) and an extended, parsed URL object (request.nextUrl) with searchParams for handling query parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-convenience-methods-does-nextrequest-provide-over-the-standard-request-obje"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-convenience-methods-does-nextrequest-provide-over-the-standard-request-obje" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-convenience-methods-does-nextrequest-provide-over-the-standard-request-obje" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What convenience methods does NextRequest provide over the standard Request object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextRequest provides easier access to cookies (request.cookies) and an extended, parsed URL object (request.nextUrl) with searchParams for handling query parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="authentication-security-best-practices" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Authentication > Security Best Practices</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 34 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZoFEq9" prefix="r2830" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"407755406821594672"],"question":[0,"What is the default maximum request body size limit for Next.js Server Actions?"],"answer":[0,"The default bodySizeLimit is 1MB to prevent the consumption of excessive server resources and protect against DDoS attacks. This can be configured in next.config.js under experimental.serverActions.bodySizeLimit using formats like '2mb' or '500kb'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-request-body-size-limit-for-next-js-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-request-body-size-limit-for-next-js-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-request-body-size-limit-for-next-js-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum request body size limit for Next.js Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default bodySizeLimit is 1MB to prevent the consumption of excessive server resources and protect against DDoS attacks. This can be configured in next.config.js under experimental.serverActions.bodySizeLimit using formats like '2mb' or '500kb'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xFRxR" prefix="r2831" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"641447286476124666"],"question":[0,"What is the default value for the cookie Path attribute in Next.js?"],"answer":[0,"The path attribute is the only cookie option with a default value in Next.js. You should explicitly set other security attributes like httpOnly, secure, and sameSite."],"confidence":[0,0.95],"sources":[1,[[0,"https://maxschmitt.me/posts/next-js-http-only-cookie-auth-tokens"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-cookie-path-attribute-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-cookie-path-attribute-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-cookie-path-attribute-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the cookie Path attribute in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The path attribute is the only cookie option with a default value in Next.js. You should explicitly set other security attributes like httpOnly, secure, and sameSite.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://maxschmitt.me/posts/next-js-http-only-cookie-auth-tokens" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>maxschmitt.me</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YLsJF" prefix="r2832" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1859514303919819583"],"question":[0,"What data should be stored in session cookies according to Next.js security best practices?"],"answer":[0,"Store 'minimum, unique user data' like user ID and role. Do NOT include personally identifiable information, sensitive data like passwords, phone numbers, or complete user objects."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-data-should-be-stored-in-session-cookies-according-to-next-js-security-best"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-data-should-be-stored-in-session-cookies-according-to-next-js-security-best" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-data-should-be-stored-in-session-cookies-according-to-next-js-security-best" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What data should be stored in session cookies according to Next.js security best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Store 'minimum, unique user data' like user ID and role. Do NOT include personally identifiable information, sensitive data like passwords, phone numbers, or complete user objects.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KrB1H" prefix="r2833" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1985853896877478391"],"question":[0,"What middleware matcher pattern excludes Next.js internals and static files while protecting all other routes?"],"answer":[0,"Use matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'] which uses negative lookahead regex to exclude Next.js internal routes, static assets, and favicon while matching everything else."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/session-management/protecting"]]],"topic":[0,"nextjs"],"slug":[0,"what-middleware-matcher-pattern-excludes-next-js-internals-and-static-files-whil"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-middleware-matcher-pattern-excludes-next-js-internals-and-static-files-whil" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-middleware-matcher-pattern-excludes-next-js-internals-and-static-files-whil" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What middleware matcher pattern excludes Next.js internals and static files while protecting all other routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'] which uses negative lookahead regex to exclude Next.js internal routes, static assets, and favicon while matching everything else.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/session-management/protecting" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZP2bTf" prefix="r2834" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2851785442544548292"],"question":[0,"What are the two types of authorization checks recommended in Next.js applications?"],"answer":[0,"1) Optimistic checks via middleware for quick UI operations using cookie-stored session data, and 2) Secure checks against databases in the Data Access Layer for sensitive operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-types-of-authorization-checks-recommended-in-next-js-applicatio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-types-of-authorization-checks-recommended-in-next-js-applicatio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-types-of-authorization-checks-recommended-in-next-js-applicatio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two types of authorization checks recommended in Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Optimistic checks via middleware for quick UI operations using cookie-stored session data, and 2) Secure checks against databases in the Data Access Layer for sensitive operations.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1a1MNm" prefix="r2835" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3114888595134766544"],"question":[0,"Where should authorization checks be performed in Next.js applications for maximum security?"],"answer":[0,"Authorization logic should be verified 'as close as possible to your data source' within the Data Access Layer (DAL), not just in UI components or middleware. This ensures security even with Next.js's multiple entry points and partial rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-authorization-checks-be-performed-in-next-js-applications-for-maxim"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-authorization-checks-be-performed-in-next-js-applications-for-maxim" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-authorization-checks-be-performed-in-next-js-applications-for-maxim" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should authorization checks be performed in Next.js applications for maximum security?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Authorization logic should be verified 'as close as possible to your data source' within the Data Access Layer (DAL), not just in UI components or middleware. This ensures security even with Next.js's multiple entry points and partial rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQhgp6" prefix="r2836" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3281872747480084278"],"question":[0,"What experimental Next.js config option enables the React taint APIs for preventing sensitive data exposure?"],"answer":[0,"Set experimental.taint: true in next.config.js to enable experimental_taintObjectReference and experimental_taintUniqueValue functions, though this should not be your only mechanism to prevent exposing sensitive data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-next-js-config-option-enables-the-react-taint-apis-for-prevent"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-next-js-config-option-enables-the-react-taint-apis-for-prevent" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-next-js-config-option-enables-the-react-taint-apis-for-prevent" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental Next.js config option enables the React taint APIs for preventing sensitive data exposure?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set experimental.taint: true in next.config.js to enable experimental_taintObjectReference and experimental_taintUniqueValue functions, though this should not be your only mechanism to prevent exposing sensitive data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15ESRF" prefix="r2837" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3332655494500732550"],"question":[0,"Can mutations be triggered as rendering side effects in Next.js Server Components?"],"answer":[0,"No. Never trigger mutations (like cookie deletion or database updates) as rendering side effects. Server Actions must exclusively handle state modifications, never within component render methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"can-mutations-be-triggered-as-rendering-side-effects-in-next-js-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-mutations-be-triggered-as-rendering-side-effects-in-next-js-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-mutations-be-triggered-as-rendering-side-effects-in-next-js-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can mutations be triggered as rendering side effects in Next.js Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Never trigger mutations (like cookie deletion or database updates) as rendering side effects. Server Actions must exclusively handle state modifications, never within component render methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1R2SaU" prefix="r2838" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3717989599288526996"],"question":[0,"What is the default maxAge for NextAuth.js session cookies and JWT tokens?"],"answer":[0,"By default, NextAuth sets a maxAge of 30 days for both JWT tokens (jwt.maxAge) and session cookies. NextAuth rotates the session expiry whenever the client contacts the backend, creating a rolling session pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/nextauthjs/next-auth/issues/2534"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxage-for-nextauth-js-session-cookies-and-jwt-tokens"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxage-for-nextauth-js-session-cookies-and-jwt-tokens" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxage-for-nextauth-js-session-cookies-and-jwt-tokens" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxAge for NextAuth.js session cookies and JWT tokens?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, NextAuth sets a maxAge of 30 days for both JWT tokens (jwt.maxAge) and session cookies. NextAuth rotates the session expiry whenever the client contacts the backend, creating a rolling session pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/nextauthjs/next-auth/issues/2534" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgNjgt" prefix="r2839" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4034546067349034218"],"question":[0,"What is the recommended approach for role-based access control (RBAC) in Next.js?"],"answer":[0,"In the frontend, toggle features/components per permissions but don't enforce permissions (as browser state can be changed). In the backend, decouple policy configuration from code to an external policy-based authorization service. Always perform server-side role verification for sensitive operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.permit.io/blog/how-to-add-rbac-in-nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-role-based-access-control-rbac-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-role-based-access-control-rbac-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-role-based-access-control-rbac-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for role-based access control (RBAC) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the frontend, toggle features/components per permissions but don't enforce permissions (as browser state can be changed). In the backend, decouple policy configuration from code to an external policy-based authorization service. Always perform server-side role verification for sensitive operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.permit.io/blog/how-to-add-rbac-in-nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>permit.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YUChu" prefix="r2840" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4392959224550349266"],"question":[0,"Is AUTH_SECRET required in production for NextAuth.js?"],"answer":[0,"Yes, AUTH_SECRET is a required environment variable in production. If not set, NextAuth.js will throw an error. It is used to encrypt the NextAuth.js JWT and to hash email verification tokens."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"is-auth-secret-required-in-production-for-nextauth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-auth-secret-required-in-production-for-nextauth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-auth-secret-required-in-production-for-nextauth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is AUTH_SECRET required in production for NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, AUTH_SECRET is a required environment variable in production. If not set, NextAuth.js will throw an error. It is used to encrypt the NextAuth.js JWT and to hash email verification tokens.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18LE87" prefix="r2841" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6010431123569887426"],"question":[0,"Why should bcrypt be used in a separate file in Next.js applications?"],"answer":[0,"bcrypt relies on Node.js APIs not available in Next.js middleware (the Proxy), so it needs to be in a separate file to avoid compatibility issues."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-should-bcrypt-be-used-in-a-separate-file-in-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-should-bcrypt-be-used-in-a-separate-file-in-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-should-bcrypt-be-used-in-a-separate-file-in-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why should bcrypt be used in a separate file in Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>bcrypt relies on Node.js APIs not available in Next.js middleware (the Proxy), so it needs to be in a separate file to avoid compatibility issues.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1orwze" prefix="r2842" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6591419502299262648"],"question":[0,"What command generates the AUTH_SECRET environment variable for NextAuth.js?"],"answer":[0,"Run 'npx auth secret' which will autogenerate a random value and put it in your .env.local file. Alternatively, use 'openssl rand -base64 32' or visit https://generate-secret.vercel.app/32."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-the-auth-secret-environment-variable-for-nextauth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-the-auth-secret-environment-variable-for-nextauth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-the-auth-secret-environment-variable-for-nextauth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates the AUTH_SECRET environment variable for NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run 'npx auth secret' which will autogenerate a random value and put it in your .env.local file. Alternatively, use 'openssl rand -base64 32' or visit <a href="https://generate-secret.vercel.app/32">https://generate-secret.vercel.app/32</a>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ufg4F" prefix="r2843" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7550819517112764568"],"question":[0,"What configuration option allows Server Actions to be invoked from additional trusted domains in Next.js?"],"answer":[0,"Use experimental.serverActions.allowedOrigins in next.config.js, which accepts an array of domain strings supporting wildcards (e.g., ['my-proxy.com', '*.my-proxy.com']). This is needed for reverse proxies or multi-layered backend architectures."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-allows-server-actions-to-be-invoked-from-additional-tr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-allows-server-actions-to-be-invoked-from-additional-tr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-allows-server-actions-to-be-invoked-from-additional-tr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option allows Server Actions to be invoked from additional trusted domains in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use experimental.serverActions.allowedOrigins in next.config.js, which accepts an array of domain strings supporting wildcards (e.g., ['my-proxy.com', '*.my-proxy.com']). This is needed for reverse proxies or multi-layered backend architectures.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tERB5" prefix="r2844" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7614757316202198182"],"question":[0,"What is the recommended session management library for stateless sessions using JWTs in Next.js?"],"answer":[0,"Jose is recommended for working with JSON Web Tokens (JWTs) and is compatible with the Edge Runtime for encrypting and decrypting session data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-session-management-library-for-stateless-sessions-using-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-session-management-library-for-stateless-sessions-using-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-session-management-library-for-stateless-sessions-using-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended session management library for stateless sessions using JWTs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Jose is recommended for working with JSON Web Tokens (JWTs) and is compatible with the Edge Runtime for encrypting and decrypting session data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QIamO" prefix="r2845" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8099270726601828275"],"question":[0,"What is the recommended number of salt rounds when using bcrypt.hash() in Next.js applications?"],"answer":[0,"The recommended value is 10 salt rounds, as shown in the official Next.js documentation using bcrypt.hash(password, 10). This equals 2^10 (1024) rounds and processes approximately 10 hashes per second."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-number-of-salt-rounds-when-using-bcrypt-hash-in-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-number-of-salt-rounds-when-using-bcrypt-hash-in-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-number-of-salt-rounds-when-using-bcrypt-hash-in-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended number of salt rounds when using bcrypt.hash() in Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended value is 10 salt rounds, as shown in the official Next.js documentation using bcrypt.hash(password, 10). This equals 2^10 (1024) rounds and processes approximately 10 hashes per second.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2w0U5F" prefix="r2846" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8312180273483171861"],"question":[0,"How often are Next.js Server Action IDs regenerated by default?"],"answer":[0,"Server Action IDs are encrypted, non-deterministic IDs that are regenerated with each build or when the build cache is invalidated. A new private key is generated for each action every time a Next.js application is built."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-often-are-next-js-server-action-ids-regenerated-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-often-are-next-js-server-action-ids-regenerated-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-often-are-next-js-server-action-ids-regenerated-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How often are Next.js Server Action IDs regenerated by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Action IDs are encrypted, non-deterministic IDs that are regenerated with each build or when the build cache is invalidated. A new private key is generated for each action every time a Next.js application is built.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1gnF0u" prefix="r2847" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9764978955093417388"],"question":[0,"What validation should be performed on all Server Action inputs in Next.js?"],"answer":[0,"Validate all data originating from the client—form submissions, URL parameters, headers, and search parameters. Never trust client-supplied values like searchParams for authorization decisions. Always ensure users are authorized to perform the action."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-validation-should-be-performed-on-all-server-action-inputs-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-validation-should-be-performed-on-all-server-action-inputs-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-validation-should-be-performed-on-all-server-action-inputs-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What validation should be performed on all Server Action inputs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Validate all data originating from the client—form submissions, URL parameters, headers, and search parameters. Never trust client-supplied values like searchParams for authorization decisions. Always ensure users are authorized to perform the action.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pWPQh" prefix="r2848" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10163723777600976830"],"question":[0,"What is the minimum password length required by iron-session for encrypting session cookies in Next.js?"],"answer":[0,"The password parameter used to encrypt cookies must be at least 32 characters long. This is a hard requirement enforced by iron-session to ensure adequate cryptographic strength."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/iron-session"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-password-length-required-by-iron-session-for-encrypting-sess"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-password-length-required-by-iron-session-for-encrypting-sess" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-password-length-required-by-iron-session-for-encrypting-sess" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum password length required by iron-session for encrypting session cookies in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The password parameter used to encrypt cookies must be at least 32 characters long. This is a hard requirement enforced by iron-session to ensure adequate cryptographic strength.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/iron-session" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="224nUA" prefix="r2849" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11000044258519046973"],"question":[0,"Should you rely solely on middleware for data protection in Next.js?"],"answer":[0,"No. While middleware is useful for initial checks and enhances performance, it should not be your only line of defense. The majority of security checks should be performed as close as possible to your data source in the Data Access Layer."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-rely-solely-on-middleware-for-data-protection-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-rely-solely-on-middleware-for-data-protection-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-rely-solely-on-middleware-for-data-protection-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you rely solely on middleware for data protection in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. While middleware is useful for initial checks and enhances performance, it should not be your only line of defense. The majority of security checks should be performed as close as possible to your data source in the Data Access Layer.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z204W9B" prefix="r2850" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11346077925265353814"],"question":[0,"What is the default SameSite value for cookies if not explicitly set in Next.js?"],"answer":[0,"If the SameSite attribute isn't set, browsers will treat the cookie as if it were set to 'Lax', which balances security and usability."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/blog/understanding-the-samesite-cookie-attribute"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-samesite-value-for-cookies-if-not-explicitly-set-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-samesite-value-for-cookies-if-not-explicitly-set-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-samesite-value-for-cookies-if-not-explicitly-set-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default SameSite value for cookies if not explicitly set in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If the SameSite attribute isn't set, browsers will treat the cookie as if it were set to 'Lax', which balances security and usability.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/blog/understanding-the-samesite-cookie-attribute" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fw0iB" prefix="r2851" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11506659149193070541"],"question":[0,"Are variables captured in Server Action closures automatically encrypted by Next.js?"],"answer":[0,"Yes, variables captured in Server Action closures are automatically encrypted to prevent client-side exposure. However, you should not rely solely on encryption—filter sensitive data in your Data Access Layer before rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"are-variables-captured-in-server-action-closures-automatically-encrypted-by-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-variables-captured-in-server-action-closures-automatically-encrypted-by-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-variables-captured-in-server-action-closures-automatically-encrypted-by-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are variables captured in Server Action closures automatically encrypted by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, variables captured in Server Action closures are automatically encrypted to prevent client-side exposure. However, you should not rely solely on encryption—filter sensitive data in your Data Access Layer before rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="JwjF2" prefix="r2852" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11883500412481745522"],"question":[0,"How does Next.js protect Server Actions against CSRF attacks beyond the POST-only restriction?"],"answer":[0,"Next.js compares the Origin header to the Host header (or X-Forwarded-Host), and if these don't match, the request will be aborted. This means Server Actions can only be invoked on the same host as the page that hosts it, unless allowedOrigins is configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-protect-server-actions-against-csrf-attacks-beyond-the-post-onl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-protect-server-actions-against-csrf-attacks-beyond-the-post-onl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-protect-server-actions-against-csrf-attacks-beyond-the-post-onl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js protect Server Actions against CSRF attacks beyond the POST-only restriction?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js compares the Origin header to the Host header (or X-Forwarded-Host), and if these don't match, the request will be aborted. This means Server Actions can only be invoked on the same host as the page that hosts it, unless allowedOrigins is configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zg3hXj" prefix="r2853" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12248559303732055799"],"question":[0,"Why is returning null in a layout component insufficient for protecting routes in Next.js?"],"answer":[0,"Next.js applications have multiple entry points, so this pattern will not prevent nested route segments and Server Actions from being accessed. Authorization checks must occur close to data sources or within components that will be conditionally rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-returning-null-in-a-layout-component-insufficient-for-protecting-routes-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-returning-null-in-a-layout-component-insufficient-for-protecting-routes-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-returning-null-in-a-layout-component-insufficient-for-protecting-routes-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is returning null in a layout component insufficient for protecting routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js applications have multiple entry points, so this pattern will not prevent nested route segments and Server Actions from being accessed. Authorization checks must occur close to data sources or within components that will be conditionally rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11v5qy" prefix="r2854" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13685153578831117372"],"question":[0,"What HTTP method(s) are allowed to invoke Next.js Server Actions?"],"answer":[0,"Only the POST method is allowed to invoke Server Actions. This restriction prevents most CSRF vulnerabilities in modern browsers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-s-are-allowed-to-invoke-next-js-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-s-are-allowed-to-invoke-next-js-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-s-are-allowed-to-invoke-next-js-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method(s) are allowed to invoke Next.js Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the POST method is allowed to invoke Server Actions. This restriction prevents most CSRF vulnerabilities in modern browsers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Y7GqV" prefix="r2855" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13776409966110039369"],"question":[0,"How can you protect all nested routes under /dashboard using Next.js middleware matcher?"],"answer":[0,"Use matcher: '/dashboard/:path*' in the middleware config export. The :path* pattern matches all sub-pages like /dashboard/settings and /dashboard/profile."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@turingvang/how-to-use-matcher-in-next-js-middleware-cf18f441d52a"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-protect-all-nested-routes-under-dashboard-using-next-js-middleware-m"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-protect-all-nested-routes-under-dashboard-using-next-js-middleware-m" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-protect-all-nested-routes-under-dashboard-using-next-js-middleware-m" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you protect all nested routes under /dashboard using Next.js middleware matcher?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use matcher: '/dashboard/:path*' in the middleware config export. The :path* pattern matches all sub-pages like /dashboard/settings and /dashboard/profile.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@turingvang/how-to-use-matcher-in-next-js-middleware-cf18f441d52a" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJarRM" prefix="r2856" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13861665156210551153"],"question":[0,"What is the security limitation of the React taint API in Next.js?"],"answer":[0,"Tainting can only track objects by reference—copying an object creates an untainted version. Tainting also cannot track data derived from a tainted value. Do not rely on taint API as your only mechanism to prevent exposing sensitive data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-security-limitation-of-the-react-taint-api-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-security-limitation-of-the-react-taint-api-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-security-limitation-of-the-react-taint-api-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the security limitation of the React taint API in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tainting can only track objects by reference—copying an object creates an untainted version. Tainting also cannot track data derived from a tainted value. Do not rely on taint API as your only mechanism to prevent exposing sensitive data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YpwKC" prefix="r2857" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13876343986216860512"],"question":[0,"Should Next.js Server Actions be treated as public or private endpoints from a security perspective?"],"answer":[0,"Server Actions should be treated like public HTTP endpoints with the same security considerations, even if not imported elsewhere in your code. They create public HTTP endpoints and require proper authentication and authorization checks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"should-next-js-server-actions-be-treated-as-public-or-private-endpoints-from-a-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-next-js-server-actions-be-treated-as-public-or-private-endpoints-from-a-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-next-js-server-actions-be-treated-as-public-or-private-endpoints-from-a-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should Next.js Server Actions be treated as public or private endpoints from a security perspective?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions should be treated like public HTTP endpoints with the same security considerations, even if not imported elsewhere in your code. They create public HTTP endpoints and require proper authentication and authorization checks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21uHxN" prefix="r2858" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13905728060595443949"],"question":[0,"What package should be imported to prevent server-only code from being accidentally executed on the client in Next.js?"],"answer":[0,"Import 'server-only' at the top of a module. If someone tries to import that module into a client component, the build process will throw an error, preventing the leak of server-side code to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-should-be-imported-to-prevent-server-only-code-from-being-accidenta"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-should-be-imported-to-prevent-server-only-code-from-being-accidenta" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-should-be-imported-to-prevent-server-only-code-from-being-accidenta" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package should be imported to prevent server-only code from being accidentally executed on the client in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import 'server-only' at the top of a module. If someone tries to import that module into a client component, the build process will throw an error, preventing the leak of server-side code to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24L1Oc" prefix="r2859" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14655066604963517674"],"question":[0,"What is the recommended minimum password length validation in the official Next.js authentication tutorial?"],"answer":[0,"The tutorial uses z.string().min(6) with Zod schema validation, enforcing a minimum of 6 characters for passwords."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/adding-authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-minimum-password-length-validation-in-the-official-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-minimum-password-length-validation-in-the-official-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-minimum-password-length-validation-in-the-official-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended minimum password length validation in the official Next.js authentication tutorial?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The tutorial uses z.string().min(6) with Zod schema validation, enforcing a minimum of 6 characters for passwords.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/adding-authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEN6Ud" prefix="r2860" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14827061762730086140"],"question":[0,"What additional requirement must be met when setting a cookie's SameSite attribute to 'None' in Next.js?"],"answer":[0,"When using SameSite=None, the cookie must also be marked as Secure=true, meaning it can only be transported over HTTPS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-additional-requirement-must-be-met-when-setting-a-cookie-s-samesite-attribu"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-additional-requirement-must-be-met-when-setting-a-cookie-s-samesite-attribu" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-additional-requirement-must-be-met-when-setting-a-cookie-s-samesite-attribu" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What additional requirement must be met when setting a cookie's SameSite attribute to 'None' in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using SameSite=None, the cookie must also be marked as Secure=true, meaning it can only be transported over HTTPS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nq1od" prefix="r2861" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14921522458180303514"],"question":[0,"What happens to unused Server Actions in Next.js builds?"],"answer":[0,"Unused Server Actions undergo dead code elimination (tree shaking), preventing public access to unreferenced endpoints and removing them from the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-unused-server-actions-in-next-js-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-unused-server-actions-in-next-js-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-unused-server-actions-in-next-js-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to unused Server Actions in Next.js builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unused Server Actions undergo dead code elimination (tree shaking), preventing public access to unreferenced endpoints and removing them from the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jHV7W" prefix="r2862" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14948002246164521626"],"question":[0,"What React Cache API function should be used with Data Access Layers (DAL) in Next.js to memoize database queries?"],"answer":[0,"Use the React cache() function to wrap data access functions. This allows you to memoize the return value and call the same function multiple times while only executing it once per request, even when using ORMs or databases directly instead of fetch."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-cache-api-function-should-be-used-with-data-access-layers-dal-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-cache-api-function-should-be-used-with-data-access-layers-dal-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-cache-api-function-should-be-used-with-data-access-layers-dal-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React Cache API function should be used with Data Access Layers (DAL) in Next.js to memoize database queries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the React cache() function to wrap data access functions. This allows you to memoize the return value and call the same function multiple times while only executing it once per request, even when using ORMs or databases directly instead of fetch.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yBtmt" prefix="r2863" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14989295718552756051"],"question":[0,"Can React Context be used reliably in Next.js Server Components for authentication?"],"answer":[0,"No. React context cannot be used reliably in Server Components. Alternative approaches like taintUniqueValue or the Data Access Layer pattern are required for sensitive data protection in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"can-react-context-be-used-reliably-in-next-js-server-components-for-authenticati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-react-context-be-used-reliably-in-next-js-server-components-for-authenticati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-react-context-be-used-reliably-in-next-js-server-components-for-authenticati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can React Context be used reliably in Next.js Server Components for authentication?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. React context cannot be used reliably in Server Components. Alternative approaches like taintUniqueValue or the Data Access Layer pattern are required for sensitive data protection in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="prefetching" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Prefetching</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 34 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1hYNJo" prefix="r2864" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"415392201351581132"],"question":[0,"What is the order of Next.js's prefetch task queue priority?"],"answer":[0,"1. Links in the viewport, 2. Links showing user intent (hover or touch), 3. Newer links replace older ones, 4. Links scrolled off-screen are discarded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-order-of-next-js-s-prefetch-task-queue-priority"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-order-of-next-js-s-prefetch-task-queue-priority" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-order-of-next-js-s-prefetch-task-queue-priority" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the order of Next.js's prefetch task queue priority?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Links in the viewport, 2. Links showing user intent (hover or touch), 3. Newer links replace older ones, 4. Links scrolled off-screen are discarded.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="S11Dq" prefix="r2865" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"539015632083182503"],"question":[0,"What does prefetch={false} do on the Link component in the Pages Router?"],"answer":[0,"Prefetching is disabled when entering the viewport but still occurs on hover. To completely eliminate hover-based fetching, use a standard <a> tag or migrate to the App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-prefetch-false-do-on-the-link-component-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-prefetch-false-do-on-the-link-component-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-prefetch-false-do-on-the-link-component-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does prefetch={false} do on the Link component in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching is disabled when entering the viewport but still occurs on hover. To completely eliminate hover-based fetching, use a standard <a> tag or migrate to the App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2aTd9U" prefix="r2866" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"803504774754143573"],"question":[0,"What is the default value for staleTimes.static configuration?"],"answer":[0,"300 seconds (5 minutes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-staletimes-static-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-staletimes-static-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-staletimes-static-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for staleTimes.static configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>300 seconds (5 minutes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1V8hAQ" prefix="r2867" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"805086884794769062"],"question":[0,"How many times is the onInvalidate callback called per prefetch request?"],"answer":[0,"At most once per prefetch request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-is-the-oninvalidate-callback-called-per-prefetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-is-the-oninvalidate-callback-called-per-prefetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-is-the-oninvalidate-callback-called-per-prefetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times is the onInvalidate callback called per prefetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At most once per prefetch request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1heB9r" prefix="r2868" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2066336295545429351"],"question":[0,"For dynamic routes without a loading.js boundary, what gets prefetched with default prefetch behavior?"],"answer":[0,"Nothing is prefetched by default for dynamic routes without a loading.js boundary in the App Router with prefetch=\"auto\" or null."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"for-dynamic-routes-without-a-loading-js-boundary-what-gets-prefetched-with-defau"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-dynamic-routes-without-a-loading-js-boundary-what-gets-prefetched-with-defau" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-dynamic-routes-without-a-loading-js-boundary-what-gets-prefetched-with-defau" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For dynamic routes without a loading.js boundary, what gets prefetched with default prefetch behavior?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Nothing is prefetched by default for dynamic routes without a loading.js boundary in the App Router with prefetch="auto" or null.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPqt9D" prefix="r2869" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2157528880302487698"],"question":[0,"What is the default value of the prefetch prop on the Link component in the Pages Router?"],"answer":[0,"The default value is true, meaning the full route and its data will be prefetched automatically."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-page"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-page" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-page" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the prefetch prop on the Link component in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is true, meaning the full route and its data will be prefetched automatically.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHypGg" prefix="r2870" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2646250694449697636"],"question":[0,"Is the staleTimes configuration recommended for production use?"],"answer":[0,"No. The feature remains experimental and subject to change, and is not recommended for production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-staletimes-configuration-recommended-for-production-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-staletimes-configuration-recommended-for-production-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-staletimes-configuration-recommended-for-production-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the staleTimes configuration recommended for production use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The feature remains experimental and subject to change, and is not recommended for production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18Dy5J" prefix="r2871" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3441833453818661531"],"question":[0,"When are links re-prefetched in Next.js 16?"],"answer":[0,"Links re-prefetch automatically when their data becomes invalidated, and when re-entering the viewport or on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-links-re-prefetched-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-links-re-prefetched-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-links-re-prefetched-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are links re-prefetched in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Links re-prefetch automatically when their data becomes invalidated, and when re-entering the viewport or on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13AA8L" prefix="r2872" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3881603322695574721"],"question":[0,"What priority do prefetch requests have compared to fetch() or XHR requests?"],"answer":[0,"Prefetch requests have low-priority and yield to fetch() or XHR requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-priority-do-prefetch-requests-have-compared-to-fetch-or-xhr-requests"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-priority-do-prefetch-requests-have-compared-to-fetch-or-xhr-requests" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-priority-do-prefetch-requests-have-compared-to-fetch-or-xhr-requests" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What priority do prefetch requests have compared to fetch() or XHR requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetch requests have low-priority and yield to fetch() or XHR requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZLltxF" prefix="r2873" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4175329526466594508"],"question":[0,"What browser API does Next.js use to detect when links enter the viewport?"],"answer":[0,"Intersection Observer."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-browser-api-does-next-js-use-to-detect-when-links-enter-the-viewport"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browser-api-does-next-js-use-to-detect-when-links-enter-the-viewport" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browser-api-does-next-js-use-to-detect-when-links-enter-the-viewport" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browser API does Next.js use to detect when links enter the viewport?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Intersection Observer.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFycUV" prefix="r2874" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6997404815525054033"],"question":[0,"When is the Router Cache cleared?"],"answer":[0,"The cache persists across navigation but is cleared on page refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-router-cache-cleared"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-router-cache-cleared" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-router-cache-cleared" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the Router Cache cleared?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cache persists across navigation but is cleared on page refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgvsUs" prefix="r2875" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7096752214113520596"],"question":[0,"Are shared layouts refetched on every navigation?"],"answer":[0,"No. Shared layout data won't be refetched from the server to continue to support partial rendering. Server Component payloads reuse parent layouts when navigating between sibling routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"are-shared-layouts-refetched-on-every-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-shared-layouts-refetched-on-every-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-shared-layouts-refetched-on-every-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are shared layouts refetched on every navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Shared layout data won't be refetched from the server to continue to support partial rendering. Server Component payloads reuse parent layouts when navigating between sibling routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ueG8j" prefix="r2876" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7265518503686143085"],"question":[0,"How does prefetch=\"auto\" differ for static vs dynamic routes in the App Router?"],"answer":[0,"For static routes, the full route will be prefetched (including all its data). For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-prefetch-auto-differ-for-static-vs-dynamic-routes-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-prefetch-auto-differ-for-static-vs-dynamic-routes-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-prefetch-auto-differ-for-static-vs-dynamic-routes-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does prefetch="auto" differ for static vs dynamic routes in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For static routes, the full route will be prefetched (including all its data). For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Qt8Ev" prefix="r2877" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7416036571240125519"],"question":[0,"Does the Form component in Next.js 15 support prefetching?"],"answer":[0,"Yes. When the form is in view, the layout and loading UI are prefetched, making navigation fast."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-form-component-in-next-js-15-support-prefetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-form-component-in-next-js-15-support-prefetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-form-component-in-next-js-15-support-prefetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Form component in Next.js 15 support prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. When the form is in view, the layout and loading UI are prefetched, making navigation fast.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zd7coK" prefix="r2878" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7813871069948666353"],"question":[0,"In which version was the onInvalidate callback parameter introduced?"],"answer":[0,"Version 15.4.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-was-the-oninvalidate-callback-parameter-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-was-the-oninvalidate-callback-parameter-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-was-the-oninvalidate-callback-parameter-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version was the onInvalidate callback parameter introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.4.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2iiCE5" prefix="r2879" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7815252666031813347"],"question":[0,"What is incremental prefetching in Next.js 16?"],"answer":[0,"Rather than fetching entire pages, Next.js now only prefetches parts not already in cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-incremental-prefetching-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-incremental-prefetching-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-incremental-prefetching-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is incremental prefetching in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Rather than fetching entire pages, Next.js now only prefetches parts not already in cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGsJoN" prefix="r2880" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7965214770002317597"],"question":[0,"Does prefetch={true} prefetch the full route for dynamic routes?"],"answer":[0,"Yes. The full route will be prefetched for both static and dynamic routes when prefetch={true}."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"does-prefetch-true-prefetch-the-full-route-for-dynamic-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-prefetch-true-prefetch-the-full-route-for-dynamic-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-prefetch-true-prefetch-the-full-route-for-dynamic-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does prefetch={true} prefetch the full route for dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The full route will be prefetched for both static and dynamic routes when prefetch={true}.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LfgEX" prefix="r2881" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8108215926886202694"],"question":[0,"Is prefetching enabled in Next.js development mode?"],"answer":[0,"No. Prefetching is only enabled in production. In development mode, automatic prefetching is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"is-prefetching-enabled-in-next-js-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-prefetching-enabled-in-next-js-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-prefetching-enabled-in-next-js-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is prefetching enabled in Next.js development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Prefetching is only enabled in production. In development mode, automatic prefetching is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kl79A" prefix="r2882" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8423179528599840485"],"question":[0,"In which version was the staleTimes configuration introduced?"],"answer":[0,"v14.2.0 as an experimental feature."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-was-the-staletimes-configuration-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-was-the-staletimes-configuration-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-was-the-staletimes-configuration-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version was the staleTimes configuration introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v14.2.0 as an experimental feature.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z120SQN" prefix="r2883" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8485738348201498291"],"question":[0,"How long are routes without loading.js cached in the prefetch cache?"],"answer":[0,"Until app reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-are-routes-without-loading-js-cached-in-the-prefetch-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-are-routes-without-loading-js-cached-in-the-prefetch-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-are-routes-without-loading-js-cached-in-the-prefetch-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long are routes without loading.js cached in the prefetch cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Until app reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IGaL" prefix="r2884" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8490599097835098373"],"question":[0,"What is the default staleTime for Page segments in Next.js 15?"],"answer":[0,"0 seconds (not cached). This changed from the previous default in Next.js 14."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-page-segments-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-page-segments-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-page-segments-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for Page segments in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 seconds (not cached). This changed from the previous default in Next.js 14.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28QIsH" prefix="r2885" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8511932580106655938"],"question":[0,"What does prefetch={false} do on the Link component in the App Router?"],"answer":[0,"Prefetching will never happen both on entering the viewport and on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-prefetch-false-do-on-the-link-component-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-prefetch-false-do-on-the-link-component-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-prefetch-false-do-on-the-link-component-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does prefetch={false} do on the Link component in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching will never happen both on entering the viewport and on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mmvA9" prefix="r2886" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8601229960469368095"],"question":[0,"What is the default staleTime for loading.js boundaries in Next.js 15?"],"answer":[0,"5 minutes (or the value of the staleTimes.static configuration)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-loading-js-boundaries-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-loading-js-boundaries-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-loading-js-boundaries-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for loading.js boundaries in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes (or the value of the staleTimes.static configuration).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24yTQu" prefix="r2887" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9582525890416502652"],"question":[0,"Does Next.js prefetch when the user has data-saver enabled?"],"answer":[0,"No. Next.js will avoid automatically prefetching if the user has data-saver enabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-prefetch-when-the-user-has-data-saver-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-prefetch-when-the-user-has-data-saver-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-prefetch-when-the-user-has-data-saver-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js prefetch when the user has data-saver enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js will avoid automatically prefetching if the user has data-saver enabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xdGje" prefix="r2888" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9741083404294696413"],"question":[0,"What cache duration applies to loading.js boundaries?"],"answer":[0,"30 seconds (configurable via staleTimes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-cache-duration-applies-to-loading-js-boundaries"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cache-duration-applies-to-loading-js-boundaries" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cache-duration-applies-to-loading-js-boundaries" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cache duration applies to loading.js boundaries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds (configurable via staleTimes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6B4bc" prefix="r2889" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10081151332634288791"],"question":[0,"When does automatic prefetching occur for Link components?"],"answer":[0,"Prefetching happens when a <Link /> component enters the user's viewport (initially or through scroll)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-automatic-prefetching-occur-for-link-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-automatic-prefetching-occur-for-link-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-automatic-prefetching-occur-for-link-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does automatic prefetching occur for Link components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching happens when a <Link /> component enters the user's viewport (initially or through scroll).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHpeOi" prefix="r2890" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10284484397896464335"],"question":[0,"In Next.js 16, what happens to prefetch requests when a link leaves the viewport?"],"answer":[0,"Requests are cancelled when the link leaves the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-16-what-happens-to-prefetch-requests-when-a-link-leaves-the-viewport"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-16-what-happens-to-prefetch-requests-when-a-link-leaves-the-viewport" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-16-what-happens-to-prefetch-requests-when-a-link-leaves-the-viewport" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 16, what happens to prefetch requests when a link leaves the viewport?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Requests are cancelled when the link leaves the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2htN1Y" prefix="r2891" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10307278007754917171"],"question":[0,"What is the Router Cache duration when using prefetch={true} or router.prefetch()?"],"answer":[0,"5 minutes for both static and dynamic pages when using full prefetching (prefetch={true} or router.prefetch)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-router-cache-duration-when-using-prefetch-true-or-router-prefetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-router-cache-duration-when-using-prefetch-true-or-router-prefetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-router-cache-duration-when-using-prefetch-true-or-router-prefetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Router Cache duration when using prefetch={true} or router.prefetch()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes for both static and dynamic pages when using full prefetching (prefetch={true} or router.prefetch).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WhJAE" prefix="r2892" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10780564079779336900"],"question":[0,"What is the method signature for router.prefetch() in the App Router?"],"answer":[0,"router.prefetch(href: string, options?: { onInvalidate?: () => void })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-method-signature-for-router-prefetch-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-method-signature-for-router-prefetch-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-method-signature-for-router-prefetch-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the method signature for router.prefetch() in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.prefetch(href: string, options?: { onInvalidate?: () => void })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="VyHF" prefix="r2893" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12074491368746339165"],"question":[0,"Does back/forward navigation use the Router Cache?"],"answer":[0,"Yes. Back/forward navigation will still restore from cache to ensure the browser can restore scroll position."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"does-back-forward-navigation-use-the-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-back-forward-navigation-use-the-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-back-forward-navigation-use-the-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does back/forward navigation use the Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Back/forward navigation will still restore from cache to ensure the browser can restore scroll position.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgPnqJ" prefix="r2894" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12862319748466655450"],"question":[0,"Does revalidateTag invalidate the Router Cache when used in Route Handlers?"],"answer":[0,"No. When used in Route Handlers, revalidateTag will not invalidate the Router Cache immediately as the Route Handler isn't tied to a specific route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-revalidatetag-invalidate-the-router-cache-when-used-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-revalidatetag-invalidate-the-router-cache-when-used-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-revalidatetag-invalidate-the-router-cache-when-used-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does revalidateTag invalidate the Router Cache when used in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When used in Route Handlers, revalidateTag will not invalidate the Router Cache immediately as the Route Handler isn't tied to a specific route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GMtlF" prefix="r2895" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14004789066808585377"],"question":[0,"What is the Router Cache duration for dynamic pages with default prefetching in Next.js 15?"],"answer":[0,"Dynamic pages are not cached (0 seconds) when using default prefetching (prefetch={null} or unspecified)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-router-cache-duration-for-dynamic-pages-with-default-prefetching-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-router-cache-duration-for-dynamic-pages-with-default-prefetching-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-router-cache-duration-for-dynamic-pages-with-default-prefetching-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Router Cache duration for dynamic pages with default prefetching in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic pages are not cached (0 seconds) when using default prefetching (prefetch={null} or unspecified).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CDq2v" prefix="r2896" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14169091093970095165"],"question":[0,"How does Next.js 16 handle layout deduplication during prefetching?"],"answer":[0,"When multiple URLs share layouts, the layout downloads once instead of separately. For example, a page with 50 product links now downloads the shared layout once instead of 50 times."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-16-handle-layout-deduplication-during-prefetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-16-handle-layout-deduplication-during-prefetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-16-handle-layout-deduplication-during-prefetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js 16 handle layout deduplication during prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When multiple URLs share layouts, the layout downloads once instead of separately. For example, a page with 50 product links now downloads the shared layout once instead of 50 times.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Eo80y" prefix="r2897" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14923634431942119492"],"question":[0,"What is the default value for staleTimes.dynamic configuration in Next.js 15?"],"answer":[0,"0 seconds (not cached). This changed from 30 seconds in v15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-staletimes-dynamic-configuration-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-staletimes-dynamic-configuration-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-staletimes-dynamic-configuration-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for staleTimes.dynamic configuration in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 seconds (not cached). This changed from 30 seconds in v15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="middleware-setup-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Middleware > Setup & Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 34 questions </span> </div> <div class="space-y-4"> <astro-island uid="1RbdC9" prefix="r2898" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"735617483504729951"],"question":[0,"What happens if no matcher is configured in the middleware config export?"],"answer":[0,"If no matcher is defined, the middleware will be invoked for every route in your project by default. This can lead to performance issues, which is why using matchers to target specific routes is recommended."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-no-matcher-is-configured-in-the-middleware-config-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-no-matcher-is-configured-in-the-middleware-config-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-no-matcher-is-configured-in-the-middleware-config-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if no matcher is configured in the middleware config export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If no matcher is defined, the middleware will be invoked for every route in your project by default. This can lead to performance issues, which is why using matchers to target specific routes is recommended.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zofos3" prefix="r2899" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"884012804717334133"],"question":[0,"What happens to named parameters without modifiers in middleware matchers?"],"answer":[0,"Named parameters without modifiers match exactly one path segment. For example, `/about/:path` matches `/about/a` and `/about/b` but NOT `/about/a/c`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-named-parameters-without-modifiers-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-named-parameters-without-modifiers-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-named-parameters-without-modifiers-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to named parameters without modifiers in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Named parameters without modifiers match exactly one path segment. For example, <code>/about/:path</code> matches <code>/about/a</code> and <code>/about/b</code> but NOT <code>/about/a/c</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zebcre" prefix="r2900" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1359800540819912584"],"question":[0,"What is the required function signature for Next.js middleware?"],"answer":[0,"The middleware function must accept a single parameter of type `NextRequest` and return a `NextResponse`. Example: `export function middleware(request: NextRequest) { return NextResponse.next() }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-function-signature-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-function-signature-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-function-signature-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required function signature for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware function must accept a single parameter of type <code>NextRequest</code> and return a <code>NextResponse</code>. Example: <code>export function middleware(request: NextRequest) { return NextResponse.next() }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWhcxD" prefix="r2901" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1954952774049521727"],"question":[0,"How do you configure middleware to skip execution when specific cookies exist?"],"answer":[0,"Use the `missing` array in the matcher config: `{ source: '/api/*', missing: [{ type: 'cookie', key: 'session' }] }`. The middleware only runs if all `missing` conditions are NOT present."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-middleware-to-skip-execution-when-specific-cookies-exist"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-middleware-to-skip-execution-when-specific-cookies-exist" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-middleware-to-skip-execution-when-specific-cookies-exist" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure middleware to skip execution when specific cookies exist?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>missing</code> array in the matcher config: <code>{ source: '/api/*', missing: [{ type: 'cookie', key: 'session' }] }</code>. The middleware only runs if all <code>missing</code> conditions are NOT present.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="twLFX" prefix="r2902" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2250960711105201088"],"question":[0,"Can middleware matchers use regex patterns?"],"answer":[0,"Yes. Regular expressions can be enclosed in parentheses. For example, `/about/(.*)` is equivalent to `/about/:path*`. Full regex syntax including negative lookaheads is supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-middleware-matchers-use-regex-patterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-middleware-matchers-use-regex-patterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-middleware-matchers-use-regex-patterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can middleware matchers use regex patterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Regular expressions can be enclosed in parentheses. For example, <code>/about/(.*)</code> is equivalent to <code>/about/:path*</code>. Full regex syntax including negative lookaheads is supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SPvxf" prefix="r2903" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2383965146586050544"],"question":[0,"In which Next.js version did middleware first become available?"],"answer":[0,"Middleware was introduced as a beta feature in Next.js 12.0 (released October 26, 2021) using the file `pages/_middleware.js`. It became stable in Next.js 12.2 (released June 28, 2022) with the new `middleware.ts` convention."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-12-2"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-middleware-first-become-available"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-middleware-first-become-available" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-middleware-first-become-available" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did middleware first become available?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware was introduced as a beta feature in Next.js 12.0 (released October 26, 2021) using the file <code>pages/_middleware.js</code>. It became stable in Next.js 12.2 (released June 28, 2022) with the new <code>middleware.ts</code> convention.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-12-2" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2o0kQa" prefix="r2904" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2396202203461154147"],"question":[0,"What HTTP error can occur if middleware sets very large headers?"],"answer":[0,"Setting large headers in middleware can cause a 431 Request Header Fields Too Large error, depending on your backend web server configuration. Avoid setting excessively large headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-error-can-occur-if-middleware-sets-very-large-headers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-error-can-occur-if-middleware-sets-very-large-headers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-error-can-occur-if-middleware-sets-very-large-headers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP error can occur if middleware sets very large headers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting large headers in middleware can cause a 431 Request Header Fields Too Large error, depending on your backend web server configuration. Avoid setting excessively large headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SeB97" prefix="r2905" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2815817415049447130"],"question":[0,"What are the three types of conditions supported in config.has and config.missing?"],"answer":[0,"The three types are: `header` (check request headers), `query` (check URL query parameters), and `cookie` (check cookies). Each requires `type` and `key` properties, with an optional `value` property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-types-of-conditions-supported-in-config-has-and-config-missin"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-types-of-conditions-supported-in-config-has-and-config-missin" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-types-of-conditions-supported-in-config-has-and-config-missin" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three types of conditions supported in config.has and config.missing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three types are: <code>header</code> (check request headers), <code>query</code> (check URL query parameters), and <code>cookie</code> (check cookies). Each requires <code>type</code> and <code>key</code> properties, with an optional <code>value</code> property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZyyvpC" prefix="r2906" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2956104086870386551"],"question":[0,"What must a Next.js middleware function return?"],"answer":[0,"Middleware must return a `NextResponse` object. Use `NextResponse.next()` to continue, `NextResponse.redirect()` to redirect, `NextResponse.rewrite()` to rewrite, or return a custom response. Never return void or undefined."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-a-next-js-middleware-function-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-a-next-js-middleware-function-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-a-next-js-middleware-function-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must a Next.js middleware function return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware must return a <code>NextResponse</code> object. Use <code>NextResponse.next()</code> to continue, <code>NextResponse.redirect()</code> to redirect, <code>NextResponse.rewrite()</code> to rewrite, or return a custom response. Never return void or undefined.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1MXlP4" prefix="r2907" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2987086949194014002"],"question":[0,"What does the `?` modifier mean in middleware matcher paths?"],"answer":[0,"The `?` modifier means zero or one path segment. For example, `/about/:path?` matches `/about` and `/about/a`, but not `/about/a/b`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-modifier-mean-in-middleware-matcher-paths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-modifier-mean-in-middleware-matcher-paths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-modifier-mean-in-middleware-matcher-paths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the `?` modifier mean in middleware matcher paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>?</code> modifier means zero or one path segment. For example, <code>/about/:path?</code> matches <code>/about</code> and <code>/about/a</code>, but not <code>/about/a/b</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1rgB5D" prefix="r2908" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3021201798263369208"],"question":[0,"Can you use `node_modules` packages in Next.js middleware?"],"answer":[0,"Yes, but only if they implement ES Modules and do not use native Node.js APIs. Packages that depend on Node.js-specific modules will throw runtime errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-node-modules-packages-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-node-modules-packages-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-node-modules-packages-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `node_modules` packages in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but only if they implement ES Modules and do not use native Node.js APIs. Packages that depend on Node.js-specific modules will throw runtime errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRGeaQ" prefix="r2909" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3377062448082790192"],"question":[0,"What is the recommended regex pattern to exclude Next.js internal paths and static files from middleware?"],"answer":[0,"The recommended pattern is: `'/((?!api|_next/static|_next/image|favicon.ico).*)'`. This negative lookahead regex excludes API routes, static files, image optimization files, and favicon."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-regex-pattern-to-exclude-next-js-internal-paths-and-stat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-regex-pattern-to-exclude-next-js-internal-paths-and-stat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-regex-pattern-to-exclude-next-js-internal-paths-and-stat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended regex pattern to exclude Next.js internal paths and static files from middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended pattern is: <code>'/((?!api|_next/static|_next/image|favicon.ico).*)'</code>. This negative lookahead regex excludes API routes, static files, image optimization files, and favicon.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6afOy" prefix="r2910" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4170007801352861375"],"question":[0,"Can you have middleware files in both the project root and src directory?"],"answer":[0,"No. You can only have one middleware file per project. If both `src/middleware.ts` and `./middleware.ts` exist, Next.js will use one and ignore the other (typically prioritizing the root)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-have-middleware-files-in-both-the-project-root-and-src-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-have-middleware-files-in-both-the-project-root-and-src-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-have-middleware-files-in-both-the-project-root-and-src-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you have middleware files in both the project root and src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You can only have one middleware file per project. If both <code>src/middleware.ts</code> and <code>./middleware.ts</code> exist, Next.js will use one and ignore the other (typically prioritizing the root).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="o3upi" prefix="r2911" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4636157210210436816"],"question":[0,"What is the exact execution order of Next.js middleware relative to next.config.js settings?"],"answer":[0,"The execution order is: 1) headers from next.config.js, 2) redirects from next.config.js, 3) Middleware, 4) beforeFiles/afterFiles/fallback rewrites from next.config.js, 5) filesystem routes, 6) dynamic routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-execution-order-of-next-js-middleware-relative-to-next-config-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-execution-order-of-next-js-middleware-relative-to-next-config-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-execution-order-of-next-js-middleware-relative-to-next-config-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact execution order of Next.js middleware relative to next.config.js settings?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The execution order is: 1) headers from next.config.js, 2) redirects from next.config.js, 3) Middleware, 4) beforeFiles/afterFiles/fallback rewrites from next.config.js, 5) filesystem routes, 6) dynamic routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7XuiO" prefix="r2912" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5254368985378133976"],"question":[0,"How do you configure a custom maximum request body size for middleware?"],"answer":[0,"Set `experimental.middlewareClientMaxBodySize` in next.config.js. Example: `experimental: { middlewareClientMaxBodySize: '1mb' }` or as bytes: `experimental: { middlewareClientMaxBodySize: 1000000 }`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/middlewareClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-custom-maximum-request-body-size-for-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-custom-maximum-request-body-size-for-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-custom-maximum-request-body-size-for-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a custom maximum request body size for middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>experimental.middlewareClientMaxBodySize</code> in next.config.js. Example: <code>experimental: { middlewareClientMaxBodySize: '1mb' }</code> or as bytes: <code>experimental: { middlewareClientMaxBodySize: 1000000 }</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/middlewareClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18p9z2" prefix="r2913" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6321325275681217032"],"question":[0,"What is the default Node.js HTTP header size limit that can cause 431 errors?"],"answer":[0,"Since Node.js v13.13.0, the default maximum HTTP header size is 16KB (16000 bytes). Prior to that, in Node v11.6.0-v13.12.0, it was reduced to 8KB for security reasons (CVE-2018-12121)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-node-js-http-header-size-limit-that-can-cause-431-errors"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-node-js-http-header-size-limit-that-can-cause-431-errors" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-node-js-http-header-size-limit-that-can-cause-431-errors" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Node.js HTTP header size limit that can cause 431 errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since Node.js v13.13.0, the default maximum HTTP header size is 16KB (16000 bytes). Prior to that, in Node v11.6.0-v13.12.0, it was reduced to 8KB for security reasons (CVE-2018-12121).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1uCK3S" prefix="r2914" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6951594807289555554"],"question":[0,"What breaking change occurred to middleware between Next.js 12.0 and 12.2?"],"answer":[0,"The file location and naming convention changed. In 12.0 (beta), middleware used `pages/_middleware.js` (underscore prefix, inside pages). In 12.2 (stable), it changed to `middleware.ts` at the project root without the underscore prefix."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-upgrade-guide"]]],"topic":[0,"nextjs"],"slug":[0,"what-breaking-change-occurred-to-middleware-between-next-js-12-0-and-12-2"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-breaking-change-occurred-to-middleware-between-next-js-12-0-and-12-2" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-breaking-change-occurred-to-middleware-between-next-js-12-0-and-12-2" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What breaking change occurred to middleware between Next.js 12.0 and 12.2?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The file location and naming convention changed. In 12.0 (beta), middleware used <code>pages/_middleware.js</code> (underscore prefix, inside pages). In 12.2 (stable), it changed to <code>middleware.ts</code> at the project root without the underscore prefix.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-upgrade-guide" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CyWev" prefix="r2915" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7865039541096365454"],"question":[0,"What happens to the middleware filename if you customize `pageExtensions` in next.config.js?"],"answer":[0,"If you customize `pageExtensions` (e.g., to `['page.tsx', 'page.ts']`), you must rename your middleware file to match the pattern (e.g., `middleware.page.ts`). This also applies to other special files like `instrumentation.ts` and `_app.ts`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-middleware-filename-if-you-customize-pageextensions-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-middleware-filename-if-you-customize-pageextensions-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-middleware-filename-if-you-customize-pageextensions-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the middleware filename if you customize `pageExtensions` in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you customize <code>pageExtensions</code> (e.g., to <code>['page.tsx', 'page.ts']</code>), you must rename your middleware file to match the pattern (e.g., <code>middleware.page.ts</code>). This also applies to other special files like <code>instrumentation.ts</code> and <code>_app.ts</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WncVt" prefix="r2916" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7994869277895082405"],"question":[0,"What is the syntax for exporting a matcher configuration in Next.js middleware?"],"answer":[0,"Export a `config` object with a `matcher` property: `export const config = { matcher: '/about/:path*' }`. The matcher can be a single string or an array of strings/objects."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-exporting-a-matcher-configuration-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-exporting-a-matcher-configuration-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-exporting-a-matcher-configuration-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for exporting a matcher configuration in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a <code>config</code> object with a <code>matcher</code> property: <code>export const config = { matcher: '/about/:path*' }</code>. The matcher can be a single string or an array of strings/objects.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WdC7t" prefix="r2917" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9330860387451311791"],"question":[0,"What is the exact file name and location for Next.js middleware in versions before Next.js 16?"],"answer":[0,"The file must be named `middleware.ts` or `middleware.js` and placed in the root of your project at the same level as `pages` or `app`, or inside the `src` directory if applicable (e.g., `src/middleware.ts`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-file-name-and-location-for-next-js-middleware-in-versions-befo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-file-name-and-location-for-next-js-middleware-in-versions-befo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-file-name-and-location-for-next-js-middleware-in-versions-befo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact file name and location for Next.js middleware in versions before Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The file must be named <code>middleware.ts</code> or <code>middleware.js</code> and placed in the root of your project at the same level as <code>pages</code> or <code>app</code>, or inside the <code>src</code> directory if applicable (e.g., <code>src/middleware.ts</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xFkQ8" prefix="r2918" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9693375551343628629"],"question":[0,"What are the properties supported in the middleware config object besides `matcher`?"],"answer":[0,"The config object supports: `matcher` (paths where middleware runs), `locale` (boolean to control locale-based routing), `has` (conditions for presence of headers/query/cookies), and `missing` (conditions for absence of request elements)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-properties-supported-in-the-middleware-config-object-besides-matche"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-properties-supported-in-the-middleware-config-object-besides-matche" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-properties-supported-in-the-middleware-config-object-besides-matche" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the properties supported in the middleware config object besides `matcher`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The config object supports: <code>matcher</code> (paths where middleware runs), <code>locale</code> (boolean to control locale-based routing), <code>has</code> (conditions for presence of headers/query/cookies), and <code>missing</code> (conditions for absence of request elements).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1FToAK" prefix="r2919" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9721193147159236737"],"question":[0,"Can you use `require()` in Next.js middleware?"],"answer":[0,"No. Calling `require` directly is not allowed in Edge Runtime. You must use ES Modules with `import` statements instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `require()` in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Calling <code>require</code> directly is not allowed in Edge Runtime. You must use ES Modules with <code>import</code> statements instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZyR4jj" prefix="r2920" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10170979755200226066"],"question":[0,"How many middleware files can you have in a Next.js project?"],"answer":[0,"You can only have one middleware file per Next.js project. Multiple middleware files are not supported. The file must be located at the project root level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-middleware-files-can-you-have-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-middleware-files-can-you-have-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-middleware-files-can-you-have-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many middleware files can you have in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can only have one middleware file per Next.js project. Multiple middleware files are not supported. The file must be located at the project root level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kXFYT" prefix="r2921" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11023957286216149156"],"question":[0,"How can you increase the Node.js header size limit for Next.js middleware?"],"answer":[0,"Use the NODE_OPTIONS environment variable: `NODE_OPTIONS='--max-http-header-size=24000' npm run dev`. Alternatively, for App Router, set `reactMaxHeadersLength` in next.config.js (default is 6000 bytes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-increase-the-node-js-header-size-limit-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-increase-the-node-js-header-size-limit-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-increase-the-node-js-header-size-limit-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you increase the Node.js header size limit for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the NODE_OPTIONS environment variable: <code>NODE_OPTIONS='--max-http-header-size=24000' npm run dev</code>. Alternatively, for App Router, set <code>reactMaxHeadersLength</code> in next.config.js (default is 6000 bytes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2baDDs" prefix="r2922" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11447473372387256951"],"question":[0,"How does Next.js treat `/public` routes in middleware matchers?"],"answer":[0,"For backward compatibility, Next.js always considers `/public` as `/public/index`. Therefore, a matcher of `/public/:path` will match requests to `/public`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-treat-public-routes-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-treat-public-routes-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-treat-public-routes-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js treat `/public` routes in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For backward compatibility, Next.js always considers <code>/public</code> as <code>/public/index</code>. Therefore, a matcher of <code>/public/:path</code> will match requests to <code>/public</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2aBAfm" prefix="r2923" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11792381911824145980"],"question":[0,"What is the new file name for middleware starting in Next.js 16?"],"answer":[0,"Starting in Next.js 16, the middleware file convention has been renamed from `middleware.ts` to `proxy.ts` (or `.js`). The location remains the same: project root or inside `src` at the same level as `pages` or `app`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-to-proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-new-file-name-for-middleware-starting-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-new-file-name-for-middleware-starting-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-new-file-name-for-middleware-starting-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the new file name for middleware starting in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting in Next.js 16, the middleware file convention has been renamed from <code>middleware.ts</code> to <code>proxy.ts</code> (or <code>.js</code>). The location remains the same: project root or inside <code>src</code> at the same level as <code>pages</code> or <code>app</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-to-proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ibUvb" prefix="r2924" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11901429387674359359"],"question":[0,"What is the mandatory rule for all matcher path patterns?"],"answer":[0,"All matcher values MUST start with `/`. Patterns like `about/:path` without a leading slash are invalid."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-mandatory-rule-for-all-matcher-path-patterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-mandatory-rule-for-all-matcher-path-patterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-mandatory-rule-for-all-matcher-path-patterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the mandatory rule for all matcher path patterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All matcher values MUST start with <code>/</code>. Patterns like <code>about/:path</code> without a leading slash are invalid.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1x2FQR" prefix="r2925" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12372168294798677903"],"question":[0,"What is the default maximum request body size buffered by middleware?"],"answer":[0,"The default maximum body size is 10MB. When middleware is used, Next.js automatically buffers the request body in memory up to this limit to enable multiple reads."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/middlewareClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-request-body-size-buffered-by-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-request-body-size-buffered-by-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-request-body-size-buffered-by-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum request body size buffered by middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default maximum body size is 10MB. When middleware is used, Next.js automatically buffers the request body in memory up to this limit to enable multiple reads.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/middlewareClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z34dwy" prefix="r2926" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12767223245550349068"],"question":[0,"Is Next.js middleware supported in static export deployments?"],"answer":[0,"No. Middleware is not supported when using `output: 'export'` for static exports because it requires a server runtime. Setting static export with middleware will cause build errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-next-js-middleware-supported-in-static-export-deployments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-next-js-middleware-supported-in-static-export-deployments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-next-js-middleware-supported-in-static-export-deployments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Next.js middleware supported in static export deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Middleware is not supported when using <code>output: 'export'</code> for static exports because it requires a server runtime. Setting static export with middleware will cause build errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZduyAz" prefix="r2927" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13351401803270602456"],"question":[0,"Can matcher values use dynamic variables?"],"answer":[0,"No. Matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-matcher-values-use-dynamic-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-matcher-values-use-dynamic-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-matcher-values-use-dynamic-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can matcher values use dynamic variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2viBKR" prefix="r2928" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13517215434310957018"],"question":[0,"How do you configure middleware to run only when specific headers are present?"],"answer":[0,"Use the `has` array in the matcher config: `{ source: '/api/*', has: [{ type: 'header', key: 'Authorization', value: 'Bearer Token' }] }`. The middleware only runs if all `has` conditions match."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-middleware-to-run-only-when-specific-headers-are-present"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-middleware-to-run-only-when-specific-headers-are-present" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-middleware-to-run-only-when-specific-headers-are-present" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure middleware to run only when specific headers are present?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>has</code> array in the matcher config: <code>{ source: '/api/*', has: [{ type: 'header', key: 'Authorization', value: 'Bearer Token' }] }</code>. The middleware only runs if all <code>has</code> conditions match.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQL5zq" prefix="r2929" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14412857868961850406"],"question":[0,"What error occurs if you don't export a middleware function properly?"],"answer":[0,"You'll get an error like: 'The Middleware \"/middleware\" must export a `middleware` or a `default` function'. The file must export either a default function or a named export called `middleware`."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/77525"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-occurs-if-you-don-t-export-a-middleware-function-properly"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-occurs-if-you-don-t-export-a-middleware-function-properly" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-occurs-if-you-don-t-export-a-middleware-function-properly" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error occurs if you don't export a middleware function properly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You'll get an error like: 'The Middleware "/middleware" must export a <code>middleware</code> or a <code>default</code> function'. The file must export either a default function or a named export called <code>middleware</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/77525" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kgYR" prefix="r2930" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14802367990264140528"],"question":[0,"How do you specify multiple paths in a middleware matcher?"],"answer":[0,"Use an array syntax: `export const config = { matcher: ['/about/:path*', '/dashboard/:path*'] }`. Each string in the array is treated as a separate matcher pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-specify-multiple-paths-in-a-middleware-matcher"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-specify-multiple-paths-in-a-middleware-matcher" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-specify-multiple-paths-in-a-middleware-matcher" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you specify multiple paths in a middleware matcher?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use an array syntax: <code>export const config = { matcher: ['/about/:path*', '/dashboard/:path*'] }</code>. Each string in the array is treated as a separate matcher pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZvVi8T" prefix="r2931" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14956440387414535119"],"question":[0,"What does the `*` modifier mean in middleware matcher paths?"],"answer":[0,"The `*` modifier means zero or more path segments. For example, `/about/:path*` matches `/about`, `/about/a`, and `/about/a/b/c`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-modifier-mean-in-middleware-matcher-paths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-modifier-mean-in-middleware-matcher-paths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-modifier-mean-in-middleware-matcher-paths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the `*` modifier mean in middleware matcher paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>*</code> modifier means zero or more path segments. For example, <code>/about/:path*</code> matches <code>/about</code>, <code>/about/a</code>, and <code>/about/a/b/c</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="configuration-type-safety-code-quality" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Configuration > Type Safety & Code Quality</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 34 questions </span> </div> <div class="space-y-4"> <astro-island uid="2s3hV6" prefix="r2932" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1216800100961526909"],"question":[0,"What happens if you change isolatedModules to false in tsconfig.json when using Next.js?"],"answer":[0,"Next.js will automatically rewrite it back to true the next time you run the dev server. This is required because Next.js uses Babel for transpilation, which operates on single files."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/7959"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-change-isolatedmodules-to-false-in-tsconfig-json-when-using-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-change-isolatedmodules-to-false-in-tsconfig-json-when-using-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-change-isolatedmodules-to-false-in-tsconfig-json-when-using-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you change isolatedModules to false in tsconfig.json when using Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will automatically rewrite it back to true the next time you run the dev server. This is required because Next.js uses Babel for transpilation, which operates on single files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/7959" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UB9kH" prefix="r2933" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2355446320928801031"],"question":[0,"What two React Hooks rules are included in eslint-config-next?"],"answer":[0,"rules-of-hooks (validates components and hooks follow the Rules of Hooks) and exhaustive-deps (validates dependency arrays contain all necessary dependencies)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-react-hooks-rules-are-included-in-eslint-config-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-react-hooks-rules-are-included-in-eslint-config-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-react-hooks-rules-are-included-in-eslint-config-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two React Hooks rules are included in eslint-config-next?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>rules-of-hooks (validates components and hooks follow the Rules of Hooks) and exhaustive-deps (validates dependency arrays contain all necessary dependencies).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17JA4g" prefix="r2934" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2386340249647582881"],"question":[0,"What is the purpose of the rootDir setting in Next.js ESLint configuration?"],"answer":[0,"It specifies the Next.js application location for monorepo scenarios. The rootDir option accepts relative/absolute paths, globs, or arrays and is set in the settings property of the ESLint configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-rootdir-setting-in-next-js-eslint-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-rootdir-setting-in-next-js-eslint-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-rootdir-setting-in-next-js-eslint-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the rootDir setting in Next.js ESLint configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It specifies the Next.js application location for monorepo scenarios. The rootDir option accepts relative/absolute paths, globs, or arrays and is set in the settings property of the ESLint configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jmATp" prefix="r2935" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2982384747094097973"],"question":[0,"What is the default value of the typescript.ignoreBuildErrors option in next.config.js?"],"answer":[0,"false. By default, Next.js fails production builds when TypeScript errors are present in your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typescript-ignorebuilderrors-option-in-next-con"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typescript-ignorebuilderrors-option-in-next-con" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typescript-ignorebuilderrors-option-in-next-con" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the typescript.ignoreBuildErrors option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false. By default, Next.js fails production builds when TypeScript errors are present in your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z137ytG" prefix="r2936" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3029441968842136375"],"question":[0,"How do you configure the Next.js TypeScript plugin in tsconfig.json?"],"answer":[0,"Add \"plugins\": [{ \"name\": \"next\" }] to the compilerOptions section. This plugin provides advanced type-checking and auto-completion in VSCode and other editors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-the-next-js-typescript-plugin-in-tsconfig-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-the-next-js-typescript-plugin-in-tsconfig-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-the-next-js-typescript-plugin-in-tsconfig-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure the Next.js TypeScript plugin in tsconfig.json?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add "plugins": [{ "name": "next" }] to the compilerOptions section. This plugin provides advanced type-checking and auto-completion in VSCode and other editors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qjYMo" prefix="r2937" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3517086180454615142"],"question":[0,"Which directories does Next.js ESLint lint by default during production builds?"],"answer":[0,"pages/, app/, components/, lib/, and src/ directories. These can be customized using the dirs option in the eslint config in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"which-directories-does-next-js-eslint-lint-by-default-during-production-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-directories-does-next-js-eslint-lint-by-default-during-production-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-directories-does-next-js-eslint-lint-by-default-during-production-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which directories does Next.js ESLint lint by default during production builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>pages/, app/, components/, lib/, and src/ directories. These can be customized using the dirs option in the eslint config in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="iqI2f" prefix="r2938" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3581260615824476069"],"question":[0,"What is the default value of the typedRoutes option in next.config.js?"],"answer":[0,"false (disabled by default). To enable statically typed links, you must explicitly set typedRoutes: true and use TypeScript in your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typedroutes-option-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typedroutes-option-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typedroutes-option-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the typedRoutes option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false (disabled by default). To enable statically typed links, you must explicitly set typedRoutes: true and use TypeScript in your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1z894q" prefix="r2939" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3756834050164482676"],"question":[0,"Where does Next.js generate type definition files when typedRoutes is enabled?"],"answer":[0,"In the .next/types directory. Next.js generates a link definition file containing information about all existing routes in your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-next-js-generate-type-definition-files-when-typedroutes-is-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-next-js-generate-type-definition-files-when-typedroutes-is-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-next-js-generate-type-definition-files-when-typedroutes-is-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does Next.js generate type definition files when typedRoutes is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the .next/types directory. Next.js generates a link definition file containing information about all existing routes in your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bk7Wi" prefix="r2940" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4050925983998479609"],"question":[0,"What is the default value of the noEmit compiler option in Next.js tsconfig.json?"],"answer":[0,"true. This is required because Next.js handles its own compilation and build process—TypeScript is only used for type-checking, not for emitting JavaScript files."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-noemit-compiler-option-in-next-js-tsconfig-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-noemit-compiler-option-in-next-js-tsconfig-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-noemit-compiler-option-in-next-js-tsconfig-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the noEmit compiler option in Next.js tsconfig.json?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. This is required because Next.js handles its own compilation and build process—TypeScript is only used for type-checking, not for emitting JavaScript files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gFLwX" prefix="r2941" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4184372920337593140"],"question":[0,"What must be added to the tsconfig.json include array to use generated Next.js types?"],"answer":[0,".next/types/**/*.ts. This is necessary if you set up your project without create-next-app to ensure the generated Next.js types are included."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-be-added-to-the-tsconfig-json-include-array-to-use-generated-next-js-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-be-added-to-the-tsconfig-json-include-array-to-use-generated-next-js-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-be-added-to-the-tsconfig-json-include-array-to-use-generated-next-js-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must be added to the tsconfig.json include array to use generated Next.js types?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.next/types/**/*.ts. This is necessary if you set up your project without create-next-app to ensure the generated Next.js types are included.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="12lifa" prefix="r2942" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4748632876149217719"],"question":[0,"What must you do to apply changes after editing a file specified by typescript.tsconfigPath during development?"],"answer":[0,"You must restart the dev server. In development, only tsconfig.json is watched for changes, so changes to alternate config files require a manual restart."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-you-do-to-apply-changes-after-editing-a-file-specified-by-typescript-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-you-do-to-apply-changes-after-editing-a-file-specified-by-typescript-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-you-do-to-apply-changes-after-editing-a-file-specified-by-typescript-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must you do to apply changes after editing a file specified by typescript.tsconfigPath during development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must restart the dev server. In development, only tsconfig.json is watched for changes, so changes to alternate config files require a manual restart.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PlDRb" prefix="r2943" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4784600617001092931"],"question":[0,"What three key features does the Next.js TypeScript plugin provide?"],"answer":[0,"1) Showing available options and in-context documentation, 2) Ensuring the 'use client' directive is used correctly, and 3) Ensuring client hooks (like useState) are only used in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-key-features-does-the-next-js-typescript-plugin-provide"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-key-features-does-the-next-js-typescript-plugin-provide" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-key-features-does-the-next-js-typescript-plugin-provide" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three key features does the Next.js TypeScript plugin provide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Showing available options and in-context documentation, 2) Ensuring the 'use client' directive is used correctly, and 3) Ensuring client hooks (like useState) are only used in Client Components.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuFecO" prefix="r2944" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5217722879360474499"],"question":[0,"What is the consequence of setting typescript.ignoreBuildErrors to true in next.config.js?"],"answer":[0,"Next.js will dangerously produce production code even when your application has TypeScript errors. You must ensure type checks run as part of your build or deploy process elsewhere."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-consequence-of-setting-typescript-ignorebuilderrors-to-true-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-consequence-of-setting-typescript-ignorebuilderrors-to-true-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-consequence-of-setting-typescript-ignorebuilderrors-to-true-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the consequence of setting typescript.ignoreBuildErrors to true in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will dangerously produce production code even when your application has TypeScript errors. You must ensure type checks run as part of your build or deploy process elsewhere.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2iKdqx" prefix="r2945" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6005660804082447421"],"question":[0,"What three rule-sets does eslint-config-next include?"],"answer":[0,"eslint-plugin-react, eslint-plugin-react-hooks, and @next/eslint-plugin-next. These provide recommended rules for React, React Hooks, and Next.js-specific patterns."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-rule-sets-does-eslint-config-next-include"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-rule-sets-does-eslint-config-next-include" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-rule-sets-does-eslint-config-next-include" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three rule-sets does eslint-config-next include?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-plugin-react, eslint-plugin-react-hooks, and @next/eslint-plugin-next. These provide recommended rules for React, React Hooks, and Next.js-specific patterns.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1s5N2w" prefix="r2946" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6140789753947328602"],"question":[0,"Which TypeScript configuration option in next.config.js allows using a different tsconfig file for builds?"],"answer":[0,"typescript.tsconfigPath. Common use cases include using tsconfig.build.json for production builds while maintaining stricter settings in tsconfig.json for development, or handling monorepo scenarios."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"which-typescript-configuration-option-in-next-config-js-allows-using-a-different"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-typescript-configuration-option-in-next-config-js-allows-using-a-different" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-typescript-configuration-option-in-next-config-js-allows-using-a-different" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which TypeScript configuration option in next.config.js allows using a different tsconfig file for builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>typescript.tsconfigPath. Common use cases include using tsconfig.build.json for production builds while maintaining stricter settings in tsconfig.json for development, or handling monorepo scenarios.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JJdrB" prefix="r2947" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7262037098137974906"],"question":[0,"What two specific rules does eslint-config-next/core-web-vitals upgrade to errors?"],"answer":[0,"1) Not using <img> (must use <Image> instead), and 2) Not using the HTML <a> tag for navigation (must use Link from next/link instead)."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/24900"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-specific-rules-does-eslint-config-next-core-web-vitals-upgrade-to-error"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-specific-rules-does-eslint-config-next-core-web-vitals-upgrade-to-error" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-specific-rules-does-eslint-config-next-core-web-vitals-upgrade-to-error" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two specific rules does eslint-config-next/core-web-vitals upgrade to errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Not using <img> (must use <Image> instead), and 2) Not using the HTML <a> tag for navigation (must use Link from next/link instead).</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/24900" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dW6Tv" prefix="r2948" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7312540742163601910"],"question":[0,"What is the difference between eslint-config-next and eslint-config-next/core-web-vitals?"],"answer":[0,"eslint-config-next/core-web-vitals includes everything from the base config, plus upgrades rules that impact Core Web Vitals from warnings to errors. The base config sets most rules as warnings."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between eslint-config-next and eslint-config-next/core-web-vitals?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-config-next/core-web-vitals includes everything from the base config, plus upgrades rules that impact Core Web Vitals from warnings to errors. The base config sets most rules as warnings.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1X9SnT" prefix="r2949" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7377391116717465472"],"question":[0,"What is the default value of the typescript.tsconfigPath option in next.config.js?"],"answer":[0,"'tsconfig.json'. This option specifies the path to the TypeScript configuration file used during next dev, next build, and next typegen."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typescript-tsconfigpath-option-in-next-config-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typescript-tsconfigpath-option-in-next-config-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typescript-tsconfigpath-option-in-next-config-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the typescript.tsconfigPath option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'tsconfig.json'. This option specifies the path to the TypeScript configuration file used during next dev, next build, and next typegen.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wL1bw" prefix="r2950" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7406597514655638600"],"question":[0,"What files/directories does eslint-config-next automatically ignore?"],"answer":[0,".next/**, out/**, build/**, and next-env.d.ts. These can be overridden using globalIgnores() in your ESLint configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-files-directories-does-eslint-config-next-automatically-ignore"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-files-directories-does-eslint-config-next-automatically-ignore" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-files-directories-does-eslint-config-next-automatically-ignore" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What files/directories does eslint-config-next automatically ignore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.next/<strong>, out/</strong>, build/**, and next-env.d.ts. These can be overridden using globalIgnores() in your ESLint configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zko9bI" prefix="r2951" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7827878059954695985"],"question":[0,"What command can be used to opt-out of ESLint caching in Next.js?"],"answer":[0,"next lint --no-cache. By default, Next.js enables ESLint caching to improve performance, storing cache in .next/cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-can-be-used-to-opt-out-of-eslint-caching-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-can-be-used-to-opt-out-of-eslint-caching-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-can-be-used-to-opt-out-of-eslint-caching-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command can be used to opt-out of ESLint caching in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next lint --no-cache. By default, Next.js enables ESLint caching to improve performance, storing cache in .next/cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sPRng" prefix="r2952" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9081250178042662247"],"question":[0,"What is the default value of the skipLibCheck compiler option in Next.js tsconfig.json?"],"answer":[0,"true. This is included in the official Next.js TypeScript configuration to improve build performance by skipping type-checking of all .d.ts declaration files."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-skiplibcheck-compiler-option-in-next-js-tsconfi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-skiplibcheck-compiler-option-in-next-js-tsconfi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-skiplibcheck-compiler-option-in-next-js-tsconfi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the skipLibCheck compiler option in Next.js tsconfig.json?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. This is included in the official Next.js TypeScript configuration to improve build performance by skipping type-checking of all .d.ts declaration files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gKORf" prefix="r2953" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9455806638144898185"],"question":[0,"What happens during a Next.js build if ESLint errors are present and ignoreDuringBuilds is false?"],"answer":[0,"The build will fail. This is the default behavior to ensure code quality. Setting ignoreDuringBuilds: true allows builds to complete despite ESLint errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-during-a-next-js-build-if-eslint-errors-are-present-and-ignoredurin"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-during-a-next-js-build-if-eslint-errors-are-present-and-ignoredurin" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-during-a-next-js-build-if-eslint-errors-are-present-and-ignoredurin" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens during a Next.js build if ESLint errors are present and ignoreDuringBuilds is false?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The build will fail. This is the default behavior to ensure code quality. Setting ignoreDuringBuilds: true allows builds to complete despite ESLint errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qw55O" prefix="r2954" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9950153650229884653"],"question":[0,"How do you specify custom directories for ESLint to lint in next.config.js?"],"answer":[0,"Use the dirs option in the eslint config: eslint: { dirs: ['pages', 'utils'] }. This specifies which directories to lint during production builds (next build)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-specify-custom-directories-for-eslint-to-lint-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-specify-custom-directories-for-eslint-to-lint-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-specify-custom-directories-for-eslint-to-lint-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you specify custom directories for ESLint to lint in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the dirs option in the eslint config: eslint: { dirs: ['pages', 'utils'] }. This specifies which directories to lint during production builds (next build).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gFQvo" prefix="r2955" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10385644840302761547"],"question":[0,"What happens if you enable typedRoutes but are not using TypeScript?"],"answer":[0,"The feature will not work. typedRoutes requires using TypeScript in your project to enable statically typed links."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-enable-typedroutes-but-are-not-using-typescript"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-enable-typedroutes-but-are-not-using-typescript" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-enable-typedroutes-but-are-not-using-typescript" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you enable typedRoutes but are not using TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The feature will not work. typedRoutes requires using TypeScript in your project to enable statically typed links.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dpK37" prefix="r2956" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11708622856019971372"],"question":[0,"What is the recommended ESLint configuration for new Next.js applications?"],"answer":[0,"eslint-config-next/core-web-vitals. This is automatically included for new applications built with Create Next App and provides stricter Core Web Vitals rule enforcement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-eslint-configuration-for-new-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-eslint-configuration-for-new-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-eslint-configuration-for-new-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended ESLint configuration for new Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-config-next/core-web-vitals. This is automatically included for new applications built with Create Next App and provides stricter Core Web Vitals rule enforcement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zour4Q" prefix="r2957" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12326706749801334804"],"question":[0,"When are Next.js TypeScript type definition files generated?"],"answer":[0,"During next dev, next build, or next typegen. This includes next-env.d.ts and files in .next/types/."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-next-js-typescript-type-definition-files-generated"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-next-js-typescript-type-definition-files-generated" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-next-js-typescript-type-definition-files-generated" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are Next.js TypeScript type definition files generated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During next dev, next build, or next typegen. This includes next-env.d.ts and files in .next/types/.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tmM5x" prefix="r2958" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12402608818216680775"],"question":[0,"What warning does the Next.js TypeScript plugin provide regarding client-side features?"],"answer":[0,"It prevents importing client hooks like useState from React when the 'use client' directive is not present, ensuring client hooks are only used in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/franciscomoretti/avoiding-mistakes-in-nextjs-using-the-typescript-plugin-4b5h"]]],"topic":[0,"nextjs"],"slug":[0,"what-warning-does-the-next-js-typescript-plugin-provide-regarding-client-side-fe"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-warning-does-the-next-js-typescript-plugin-provide-regarding-client-side-fe" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-warning-does-the-next-js-typescript-plugin-provide-regarding-client-side-fe" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What warning does the Next.js TypeScript plugin provide regarding client-side features?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It prevents importing client hooks like useState from React when the 'use client' directive is not present, ensuring client hooks are only used in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/franciscomoretti/avoiding-mistakes-in-nextjs-using-the-typescript-plugin-4b5h" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Gh2i0" prefix="r2959" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12627875192064070003"],"question":[0,"What value must the jsx compiler option be set to in tsconfig.json for Next.js?"],"answer":[0,"\"preserve\". Next.js enforces this setting because it implements its own optimized jsx transform. Next.js will automatically reset this value if changed."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/19155"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-must-the-jsx-compiler-option-be-set-to-in-tsconfig-json-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-must-the-jsx-compiler-option-be-set-to-in-tsconfig-json-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-must-the-jsx-compiler-option-be-set-to-in-tsconfig-json-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value must the jsx compiler option be set to in tsconfig.json for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"preserve". Next.js enforces this setting because it implements its own optimized jsx transform. Next.js will automatically reset this value if changed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/19155" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="es9NU" prefix="r2960" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12962105903242997686"],"question":[0,"What is the experimental.typedEnv configuration option and what does it generate?"],"answer":[0,"It generates IntelliSense for environment variables by creating a .d.ts file in .next/types. Types are generated based on environment variables loaded at development runtime, excluding variables from .env.production* files by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-experimental-typedenv-configuration-option-and-what-does-it-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-experimental-typedenv-configuration-option-and-what-does-it-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-experimental-typedenv-configuration-option-and-what-does-it-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the experimental.typedEnv configuration option and what does it generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It generates IntelliSense for environment variables by creating a .d.ts file in .next/types. Types are generated based on environment variables loaded at development runtime, excluding variables from .env.production* files by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1rUHK" prefix="r2961" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13109587472876776833"],"question":[0,"What value must the isolatedModules compiler option be set to in tsconfig.json for Next.js?"],"answer":[0,"true. Next.js requires isolatedModules: true because it uses Babel for transpilation, which only operates on a single file at a time. Next.js will automatically reset this to true if changed."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/7959"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-must-the-isolatedmodules-compiler-option-be-set-to-in-tsconfig-json-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-must-the-isolatedmodules-compiler-option-be-set-to-in-tsconfig-json-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-must-the-isolatedmodules-compiler-option-be-set-to-in-tsconfig-json-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value must the isolatedModules compiler option be set to in tsconfig.json for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. Next.js requires isolatedModules: true because it uses Babel for transpilation, which only operates on a single file at a time. Next.js will automatically reset this to true if changed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/7959" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFu4x7" prefix="r2962" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13587879625853546167"],"question":[0,"What configuration format does Next.js ESLint use as of Next.js 16?"],"answer":[0,"eslint.config.mjs (flat config format). The .eslintrc.json configuration is deprecated, and the next lint command was removed in favor of the ESLint CLI."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-format-does-next-js-eslint-use-as-of-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-format-does-next-js-eslint-use-as-of-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-format-does-next-js-eslint-use-as-of-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration format does Next.js ESLint use as of Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint.config.mjs (flat config format). The .eslintrc.json configuration is deprecated, and the next lint command was removed in favor of the ESLint CLI.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QWvTy" prefix="r2963" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13718465606087500219"],"question":[0,"What is the default value of the strict compiler option in Next.js tsconfig.json?"],"answer":[0,"true. Next.js includes strict: true in its default TypeScript configuration to enable all strict type-checking options."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-strict-compiler-option-in-next-js-tsconfig-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-strict-compiler-option-in-next-js-tsconfig-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-strict-compiler-option-in-next-js-tsconfig-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the strict compiler option in Next.js tsconfig.json?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. Next.js includes strict: true in its default TypeScript configuration to enable all strict type-checking options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1am6cV" prefix="r2964" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14018564893819783043"],"question":[0,"What is the default value of the eslint.ignoreDuringBuilds option in next.config.js?"],"answer":[0,"false. By default, Next.js runs ESLint during production builds and the build will fail if ESLint errors are present."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-eslint-ignoreduringbuilds-option-in-next-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-eslint-ignoreduringbuilds-option-in-next-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-eslint-ignoreduringbuilds-option-in-next-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the eslint.ignoreDuringBuilds option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false. By default, Next.js runs ESLint during production builds and the build will fail if ESLint errors are present.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fBagz" prefix="r2965" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14147850200722533973"],"question":[0,"What command line flags can be used with next lint to lint specific directories and files?"],"answer":[0,"--dir and --file flags. Example: next lint --dir pages --dir utils --file bar.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-line-flags-can-be-used-with-next-lint-to-lint-specific-directories-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-line-flags-can-be-used-with-next-lint-to-lint-specific-directories-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-line-flags-can-be-used-with-next-lint-to-lint-specific-directories-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command line flags can be used with next lint to lint specific directories and files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--dir and --file flags. Example: next lint --dir pages --dir utils --file bar.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="progressive-web-apps" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Progressive Web Apps</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 33 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1FS9jx" prefix="r2966" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6535230129391255"],"question":[0,"What format should the lang property use in a Next.js manifest?"],"answer":[0,"A language tag string (e.g., 'en', 'en-US'). If not specified, the language is treated as unknown."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-should-the-lang-property-use-in-a-next-js-manifest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-should-the-lang-property-use-in-a-next-js-manifest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-should-the-lang-property-use-in-a-next-js-manifest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format should the lang property use in a Next.js manifest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A language tag string (e.g., 'en', 'en-US'). If not specified, the language is treated as unknown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tqQBp" prefix="r2967" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"600561107635593163"],"question":[0,"What is the default value for the register option in next-pwa?"],"answer":[0,"true (next-pwa automatically registers the service worker by default)"],"confidence":[0,0.95],"sources":[1,[[0,"https://ducanh-next-pwa.vercel.app/docs/next-pwa/configuring"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-register-option-in-next-pwa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-register-option-in-next-pwa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-register-option-in-next-pwa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the register option in next-pwa?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true (next-pwa automatically registers the service worker by default)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://ducanh-next-pwa.vercel.app/docs/next-pwa/configuring" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>ducanh-next-pwa.vercel.app</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GlPhc" prefix="r2968" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"735978848352912465"],"question":[0,"What is the minimum Safari version for Web Push on macOS?"],"answer":[0,"Safari 16 on macOS 13+"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-safari-version-for-web-push-on-macos"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-safari-version-for-web-push-on-macos" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-safari-version-for-web-push-on-macos" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Safari version for Web Push on macOS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Safari 16 on macOS 13+</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1H5Mq9" prefix="r2969" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1912174200638807523"],"question":[0,"What does updateViaCache: 'none' mean for service worker registration?"],"answer":[0,"The HTTP cache is never consulted for updates to the service worker script or imported scripts."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-updateviacache-none-mean-for-service-worker-registration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-updateviacache-none-mean-for-service-worker-registration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-updateviacache-none-mean-for-service-worker-registration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does updateViaCache: 'none' mean for service worker registration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The HTTP cache is never consulted for updates to the service worker script or imported scripts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28HLKb" prefix="r2970" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2133970961387760836"],"question":[0,"What are the default service worker registration options shown in the Next.js PWA guide?"],"answer":[0,"scope: '/' and updateViaCache: 'none'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-service-worker-registration-options-shown-in-the-next-js-pw"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-service-worker-registration-options-shown-in-the-next-js-pw" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-service-worker-registration-options-shown-in-the-next-js-pw" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default service worker registration options shown in the Next.js PWA guide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>scope: '/' and updateViaCache: 'none'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Ajq5O" prefix="r2971" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2809592000637862012"],"question":[0,"How does next-pwa determine whether to use GenerateSW or InjectManifest plugin?"],"answer":[0,"If swSrc is specified, InjectManifest plugin is used; otherwise GenerateSW is used to generate the service worker."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/shadowwalker/next-pwa"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-pwa-determine-whether-to-use-generatesw-or-injectmanifest-plugin"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-pwa-determine-whether-to-use-generatesw-or-injectmanifest-plugin" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-pwa-determine-whether-to-use-generatesw-or-injectmanifest-plugin" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does next-pwa determine whether to use GenerateSW or InjectManifest plugin?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If swSrc is specified, InjectManifest plugin is used; otherwise GenerateSW is used to generate the service worker.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/shadowwalker/next-pwa" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1AHvOb" prefix="r2972" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2836710957846425712"],"question":[0,"What configuration properties does @serwist/next commonly use for swSrc and swDest?"],"answer":[0,"swSrc is typically set to 'app/sw.ts' (for App Router) and swDest to 'public/sw.js'."],"confidence":[0,0.95],"sources":[1,[[0,"https://serwist.pages.dev/docs/next/getting-started"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-properties-does-serwist-next-commonly-use-for-swsrc-and-swdes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-properties-does-serwist-next-commonly-use-for-swsrc-and-swdes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-properties-does-serwist-next-commonly-use-for-swsrc-and-swdes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration properties does @serwist/next commonly use for swSrc and swDest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>swSrc is typically set to 'app/sw.ts' (for App Router) and swDest to 'public/sw.js'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://serwist.pages.dev/docs/next/getting-started" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>serwist.pages.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BMC95" prefix="r2973" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2932299197862388869"],"question":[0,"What command enables HTTPS for Next.js local development for PWA testing?"],"answer":[0,"next dev --experimental-https"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-enables-https-for-next-js-local-development-for-pwa-testing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-enables-https-for-next-js-local-development-for-pwa-testing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-enables-https-for-next-js-local-development-for-pwa-testing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command enables HTTPS for Next.js local development for PWA testing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next dev --experimental-https</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DjkFI" prefix="r2974" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2967599602788164469"],"question":[0,"What is the default value for the disable option in next-pwa?"],"answer":[0,"false (PWA is enabled by default)"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/shadowwalker/next-pwa"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-disable-option-in-next-pwa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-disable-option-in-next-pwa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-disable-option-in-next-pwa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the disable option in next-pwa?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false (PWA is enabled by default)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/shadowwalker/next-pwa" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13i73x" prefix="r2975" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3284203455988421935"],"question":[0,"What is the minimum Next.js version required for the --experimental-https flag?"],"answer":[0,"Next.js 13.5 or above."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.amitmerchant.com/local-https-for-nextjs-13/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-next-js-version-required-for-the-experimental-https-flag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-next-js-version-required-for-the-experimental-https-flag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-next-js-version-required-for-the-experimental-https-flag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Next.js version required for the --experimental-https flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.5 or above.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.amitmerchant.com/local-https-for-nextjs-13/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>amitmerchant.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpV1GB" prefix="r2976" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3307494479884730799"],"question":[0,"What is the default caching behavior for manifest.js in Next.js?"],"answer":[0,"manifest.js is cached by default unless it uses a Dynamic API or dynamic config option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-manifest-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-manifest-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-manifest-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for manifest.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>manifest.js is cached by default unless it uses a Dynamic API or dynamic config option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tOrcV" prefix="r2977" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3522010244685494209"],"question":[0,"What is the fallback chain for display modes in a web app manifest?"],"answer":[0,"fullscreen → standalone → minimal-ui → browser. If a browser doesn't support a mode, it falls back to the next in the chain."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/display"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-fallback-chain-for-display-modes-in-a-web-app-manifest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-fallback-chain-for-display-modes-in-a-web-app-manifest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-fallback-chain-for-display-modes-in-a-web-app-manifest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the fallback chain for display modes in a web app manifest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fullscreen → standalone → minimal-ui → browser. If a browser doesn't support a mode, it falls back to the next in the chain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/display" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zh2yeh" prefix="r2978" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4197169770658569931"],"question":[0,"What are the valid file names for creating a web app manifest in Next.js App Router?"],"answer":[0,"manifest.json, manifest.webmanifest, manifest.js, or manifest.ts - all placed in the root of the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-file-names-for-creating-a-web-app-manifest-in-next-js-app-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-file-names-for-creating-a-web-app-manifest-in-next-js-app-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-file-names-for-creating-a-web-app-manifest-in-next-js-app-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid file names for creating a web app manifest in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>manifest.json, manifest.webmanifest, manifest.js, or manifest.ts - all placed in the root of the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGSEC6" prefix="r2979" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5088841610476571691"],"question":[0,"Why is using purpose 'any maskable' for a single icon discouraged?"],"answer":[0,"It is likely to look incorrect on some platforms due to too much or too little padding. It's very hard to get one image to render optimally everywhere."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/progressier/why-a-pwa-app-icon-shouldnt-have-a-purpose-set-to-any-maskable-4c78"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-using-purpose-any-maskable-for-a-single-icon-discouraged"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-using-purpose-any-maskable-for-a-single-icon-discouraged" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-using-purpose-any-maskable-for-a-single-icon-discouraged" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is using purpose 'any maskable' for a single icon discouraged?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is likely to look incorrect on some platforms due to too much or too little padding. It's very hard to get one image to render optimally everywhere.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/progressier/why-a-pwa-app-icon-shouldnt-have-a-purpose-set-to-any-maskable-4c78" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2lHHKk" prefix="r2980" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5218014540608721776"],"question":[0,"What are the minimum recommended icon sizes for a Next.js PWA according to Lighthouse?"],"answer":[0,"At least 192x192 pixels (required) and 512x512 pixels (recommended)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-minimum-recommended-icon-sizes-for-a-next-js-pwa-according-to-light"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-minimum-recommended-icon-sizes-for-a-next-js-pwa-according-to-light" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-minimum-recommended-icon-sizes-for-a-next-js-pwa-according-to-light" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the minimum recommended icon sizes for a Next.js PWA according to Lighthouse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At least 192x192 pixels (required) and 512x512 pixels (recommended).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5BkKz" prefix="r2981" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6758113589602376694"],"question":[0,"How can you customize SSL certificates when using --experimental-https in Next.js?"],"answer":[0,"Provide all three arguments: next dev --experimental-https --experimental-https-key ./certificates/com.example.key --experimental-https-cert ./certificates/com.example.crt"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/57916"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-customize-ssl-certificates-when-using-experimental-https-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-customize-ssl-certificates-when-using-experimental-https-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-customize-ssl-certificates-when-using-experimental-https-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you customize SSL certificates when using --experimental-https in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Provide all three arguments: next dev --experimental-https --experimental-https-key ./certificates/com.example.key --experimental-https-cert ./certificates/com.example.crt</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/57916" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIgCJP" prefix="r2982" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7358760177070335200"],"question":[0,"Where must a PWA be installed for Web Push to work on iOS 16.4+?"],"answer":[0,"The PWA must be added to the home screen. Web Push is not supported inside Safari browser on iOS, only for home screen PWAs."],"confidence":[0,0.95],"sources":[1,[[0,"https://pwa.io/articles/web-push-with-ios-safari-16-4-made-easy"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-a-pwa-be-installed-for-web-push-to-work-on-ios-16-4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-a-pwa-be-installed-for-web-push-to-work-on-ios-16-4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-a-pwa-be-installed-for-web-push-to-work-on-ios-16-4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must a PWA be installed for Web Push to work on iOS 16.4+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The PWA must be added to the home screen. Web Push is not supported inside Safari browser on iOS, only for home screen PWAs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://pwa.io/articles/web-push-with-ios-safari-16-4-made-easy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>pwa.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1e2LMH" prefix="r2983" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7385778476525460872"],"question":[0,"What are the required VAPID environment variable names for Next.js PWA push notifications?"],"answer":[0,"NEXT_PUBLIC_VAPID_PUBLIC_KEY (for client-side) and VAPID_PRIVATE_KEY (for server operations)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-vapid-environment-variable-names-for-next-js-pwa-push-noti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-vapid-environment-variable-names-for-next-js-pwa-push-noti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-vapid-environment-variable-names-for-next-js-pwa-push-noti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required VAPID environment variable names for Next.js PWA push notifications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_PUBLIC_VAPID_PUBLIC_KEY (for client-side) and VAPID_PRIVATE_KEY (for server operations).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9sYHx" prefix="r2984" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7820722182903164977"],"question":[0,"What are the valid purpose values for manifest icons?"],"answer":[0,"any, maskable, and monochrome. Multiple values can be space-separated (e.g., 'any maskable')."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-purpose-values-for-manifest-icons"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-purpose-values-for-manifest-icons" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-purpose-values-for-manifest-icons" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid purpose values for manifest icons?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>any, maskable, and monochrome. Multiple values can be space-separated (e.g., 'any maskable').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Qz66C" prefix="r2985" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7899214869673807348"],"question":[0,"What is the default purpose value for manifest icons if not specified?"],"answer":[0,"any"],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.chrome.com/docs/lighthouse/pwa/maskable-icon-audit"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-purpose-value-for-manifest-icons-if-not-specified"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-purpose-value-for-manifest-icons-if-not-specified" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-purpose-value-for-manifest-icons-if-not-specified" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default purpose value for manifest icons if not specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>any</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.chrome.com/docs/lighthouse/pwa/maskable-icon-audit" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.chrome.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ir3YF" prefix="r2986" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8044399811605607729"],"question":[0,"What is the recommended apple-touch-icon size for Next.js PWAs?"],"answer":[0,"A single 192x192 px non-maskable PNG icon serves as an apple-touch-icon for Apple devices."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/rakibcloud/progressive-web-app-pwa-setup-guide-for-nextjs-15-complete-step-by-step-walkthrough-2b85"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-apple-touch-icon-size-for-next-js-pwas"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-apple-touch-icon-size-for-next-js-pwas" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-apple-touch-icon-size-for-next-js-pwas" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended apple-touch-icon size for Next.js PWAs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A single 192x192 px non-maskable PNG icon serves as an apple-touch-icon for Apple devices.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/rakibcloud/progressive-web-app-pwa-setup-guide-for-nextjs-15-complete-step-by-step-walkthrough-2b85" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mkPhW" prefix="r2987" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8168634157042200677"],"question":[0,"What is the default display mode if none is specified in the manifest?"],"answer":[0,"browser"],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/display"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-display-mode-if-none-is-specified-in-the-manifest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-display-mode-if-none-is-specified-in-the-manifest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-display-mode-if-none-is-specified-in-the-manifest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default display mode if none is specified in the manifest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>browser</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Manifest/Reference/display" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wCRT" prefix="r2988" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8573612088360319530"],"question":[0,"What tool does Next.js use under the hood for generating self-signed certificates with --experimental-https?"],"answer":[0,"mkcert"],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@akankha.social/next-js-13-5-supercharging-local-development-with-https-support-f1eb5a439608"]]],"topic":[0,"nextjs"],"slug":[0,"what-tool-does-next-js-use-under-the-hood-for-generating-self-signed-certificate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-tool-does-next-js-use-under-the-hood-for-generating-self-signed-certificate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-tool-does-next-js-use-under-the-hood-for-generating-self-signed-certificate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What tool does Next.js use under the hood for generating self-signed certificates with --experimental-https?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>mkcert</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@akankha.social/next-js-13-5-supercharging-local-development-with-https-support-f1eb5a439608" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="QCdO8" prefix="r2989" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9343854186466803539"],"question":[0,"What are the recommended global security headers for Next.js PWAs?"],"answer":[0,"X-Content-Type-Options: nosniff, X-Frame-Options: DENY, and Referrer-Policy: strict-origin-when-cross-origin"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-recommended-global-security-headers-for-next-js-pwas"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-recommended-global-security-headers-for-next-js-pwas" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-recommended-global-security-headers-for-next-js-pwas" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the recommended global security headers for Next.js PWAs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>X-Content-Type-Options: nosniff, X-Frame-Options: DENY, and Referrer-Policy: strict-origin-when-cross-origin</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VQJnX" prefix="r2990" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9347865275674089791"],"question":[0,"What are the recommended security headers for service workers in Next.js according to the official guide?"],"answer":[0,"Content-Type: application/javascript; charset=utf-8, Cache-Control: no-cache, no-store, must-revalidate, and Content-Security-Policy: default-src 'self'; script-src 'self'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-recommended-security-headers-for-service-workers-in-next-js-accordi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-recommended-security-headers-for-service-workers-in-next-js-accordi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-recommended-security-headers-for-service-workers-in-next-js-accordi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the recommended security headers for service workers in Next.js according to the official guide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Content-Type: application/javascript; charset=utf-8, Cache-Control: no-cache, no-store, must-revalidate, and Content-Security-Policy: default-src 'self'; script-src 'self'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zmpcnp" prefix="r2991" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10231982773616328261"],"question":[0,"What common pattern is used to disable PWA in development with next-pwa?"],"answer":[0,"disable: process.env.NODE_ENV === 'development'"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/shadowwalker/next-pwa"]]],"topic":[0,"nextjs"],"slug":[0,"what-common-pattern-is-used-to-disable-pwa-in-development-with-next-pwa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-common-pattern-is-used-to-disable-pwa-in-development-with-next-pwa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-common-pattern-is-used-to-disable-pwa-in-development-with-next-pwa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What common pattern is used to disable PWA in development with next-pwa?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>disable: process.env.NODE_ENV === 'development'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/shadowwalker/next-pwa" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Cc1Ie" prefix="r2992" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10865887506038995828"],"question":[0,"What does updateViaCache: 'all' mean for service worker registration?"],"answer":[0,"The HTTP cache is consulted for updates to both the service worker script and scripts imported using importScripts()."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-updateviacache-all-mean-for-service-worker-registration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-updateviacache-all-mean-for-service-worker-registration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-updateviacache-all-mean-for-service-worker-registration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does updateViaCache: 'all' mean for service worker registration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The HTTP cache is consulted for updates to both the service worker script and scripts imported using importScripts().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2o0L1h" prefix="r2993" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11276217693155760746"],"question":[0,"What manifest display mode is required for iOS PWA push notifications to work properly?"],"answer":[0,"display: 'standalone'"],"confidence":[0,0.95],"sources":[1,[[0,"https://monogram.io/blog/notifications-from-ios-and-ipados-pwas"]]],"topic":[0,"nextjs"],"slug":[0,"what-manifest-display-mode-is-required-for-ios-pwa-push-notifications-to-work-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-manifest-display-mode-is-required-for-ios-pwa-push-notifications-to-work-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-manifest-display-mode-is-required-for-ios-pwa-push-notifications-to-work-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What manifest display mode is required for iOS PWA push notifications to work properly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>display: 'standalone'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://monogram.io/blog/notifications-from-ios-and-ipados-pwas" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>monogram.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27wQST" prefix="r2994" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12985278508745845062"],"question":[0,"What are the valid dir values for a Next.js manifest?"],"answer":[0,"ltr, rtl, or auto"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/blob/canary/packages/next/src/lib/metadata/types/manifest-types.ts"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-dir-values-for-a-next-js-manifest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-dir-values-for-a-next-js-manifest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-dir-values-for-a-next-js-manifest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid dir values for a Next.js manifest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ltr, rtl, or auto</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/blob/canary/packages/next/src/lib/metadata/types/manifest-types.ts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ypGay" prefix="r2995" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13199298072698233493"],"question":[0,"What command generates VAPID keys using the web-push CLI?"],"answer":[0,"web-push generate-vapid-keys (after installing web-push globally with npm install web-push -g)"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/web-push-libs/web-push"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-vapid-keys-using-the-web-push-cli"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-vapid-keys-using-the-web-push-cli" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-vapid-keys-using-the-web-push-cli" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates VAPID keys using the web-push CLI?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>web-push generate-vapid-keys (after installing web-push globally with npm install web-push -g)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/web-push-libs/web-push" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13sS6J" prefix="r2996" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13200333768088236913"],"question":[0,"What does updateViaCache: 'imports' mean for service worker registration?"],"answer":[0,"The HTTP cache is not consulted for updates to the service worker script, but is consulted for scripts imported using importScripts(). This is the default value."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-updateviacache-imports-mean-for-service-worker-registration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-updateviacache-imports-mean-for-service-worker-registration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-updateviacache-imports-mean-for-service-worker-registration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does updateViaCache: 'imports' mean for service worker registration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The HTTP cache is not consulted for updates to the service worker script, but is consulted for scripts imported using importScripts(). This is the default value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="zUCm9" prefix="r2997" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14201639089466727004"],"question":[0,"What is the default swUrl value assumed by Serwist?"],"answer":[0,"/sw.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://serwist.pages.dev/docs/next/configuring/sw-url"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-swurl-value-assumed-by-serwist"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-swurl-value-assumed-by-serwist" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-swurl-value-assumed-by-serwist" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default swUrl value assumed by Serwist?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>/sw.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://serwist.pages.dev/docs/next/configuring/sw-url" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>serwist.pages.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3IHDu" prefix="r2998" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14988218556313377966"],"question":[0,"What is the minimum iOS version required for Web Push Notifications in PWAs?"],"answer":[0,"iOS 16.4+ (for applications installed to the home screen)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/progressive-web-apps"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-ios-version-required-for-web-push-notifications-in-pwas"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-ios-version-required-for-web-push-notifications-in-pwas" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-ios-version-required-for-web-push-notifications-in-pwas" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum iOS version required for Web Push Notifications in PWAs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>iOS 16.4+ (for applications installed to the home screen).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/progressive-web-apps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-dynamic-image-generation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > Dynamic Image Generation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 33 questions </span> </div> <div class="space-y-4"> <astro-island uid="1yOVHg" prefix="r2999" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"105072987780816603"],"question":[0,"What font formats are supported by ImageResponse?"],"answer":[0,"TTF, OTF, and WOFF (with TTF or OTF preferred over WOFF for better font parsing speed)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-font-formats-are-supported-by-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-font-formats-are-supported-by-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-font-formats-are-supported-by-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What font formats are supported by ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TTF, OTF, and WOFF (with TTF or OTF preferred over WOFF for better font parsing speed)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZH7BSs" prefix="r3000" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"229432427056819132"],"question":[0,"When are dynamically generated opengraph-image files optimized?"],"answer":[0,"By default, they are statically optimized (generated at build time and cached) unless they use Dynamic APIs or uncached data"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-dynamically-generated-opengraph-image-files-optimized"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-dynamically-generated-opengraph-image-files-optimized" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-dynamically-generated-opengraph-image-files-optimized" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are dynamically generated opengraph-image files optimized?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, they are statically optimized (generated at build time and cached) unless they use Dynamic APIs or uncached data</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pomRz" prefix="r3001" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"299365122995224886"],"question":[0,"What CSS features does ImageResponse support?"],"answer":[0,"Flexbox, absolute positioning, custom fonts, text wrapping, centering, and nested images (only flexbox and a subset of CSS properties)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-css-features-does-imageresponse-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-css-features-does-imageresponse-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-css-features-does-imageresponse-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSS features does ImageResponse support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Flexbox, absolute positioning, custom fonts, text wrapping, centering, and nested images (only flexbox and a subset of CSS properties)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1j6g1g" prefix="r3002" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"600449958260440047"],"question":[0,"How do you create alt text files for static opengraph images?"],"answer":[0,"Create an opengraph-image.alt.txt or twitter-image.alt.txt file alongside the image file"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-alt-text-files-for-static-opengraph-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-alt-text-files-for-static-opengraph-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-alt-text-files-for-static-opengraph-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create alt text files for static opengraph images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create an opengraph-image.alt.txt or twitter-image.alt.txt file alongside the image file</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23FI5N" prefix="r3003" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"660062845474278889"],"question":[0,"What properties are required in the fonts array option for ImageResponse?"],"answer":[0,"name (string), data (ArrayBuffer), weight (number), and style ('normal' | 'italic')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-required-in-the-fonts-array-option-for-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-required-in-the-fonts-array-option-for-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-required-in-the-fonts-array-option-for-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are required in the fonts array option for ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>name (string), data (ArrayBuffer), weight (number), and style ('normal' | 'italic')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ez2OG" prefix="r3004" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"839896778101512681"],"question":[0,"What is the default value for the debug option in ImageResponse?"],"answer":[0,"false"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-debug-option-in-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-debug-option-in-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-debug-option-in-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the debug option in ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoErUN" prefix="r3005" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1221225451837462244"],"question":[0,"What happens if you exceed the 5MB size limit for twitter-image files?"],"answer":[0,"It causes build failures"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-exceed-the-5mb-size-limit-for-twitter-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-exceed-the-5mb-size-limit-for-twitter-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-exceed-the-5mb-size-limit-for-twitter-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you exceed the 5MB size limit for twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It causes build failures</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WI1JA" prefix="r3006" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1257978832483869071"],"question":[0,"What file naming convention is used for dynamic twitter-image generation?"],"answer":[0,"twitter-image.js, twitter-image.ts, or twitter-image.tsx"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-naming-convention-is-used-for-dynamic-twitter-image-generation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-naming-convention-is-used-for-dynamic-twitter-image-generation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-naming-convention-is-used-for-dynamic-twitter-image-generation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file naming convention is used for dynamic twitter-image generation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>twitter-image.js, twitter-image.ts, or twitter-image.tsx</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2509Ss" prefix="r3007" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2228410070166488699"],"question":[0,"What is the maximum bundle size limit for ImageResponse?"],"answer":[0,"500KB, which includes JSX, CSS, fonts, images, and any other assets"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-bundle-size-limit-for-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-bundle-size-limit-for-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-bundle-size-limit-for-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum bundle size limit for ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>500KB, which includes JSX, CSS, fonts, images, and any other assets</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KJ4YN" prefix="r3008" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2865139622654282629"],"question":[0,"In generateImageMetadata, is the params parameter synchronous or asynchronous?"],"answer":[0,"Synchronous - generateImageMetadata receives synchronous params, while the image generation function receives async params"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"in-generateimagemetadata-is-the-params-parameter-synchronous-or-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-generateimagemetadata-is-the-params-parameter-synchronous-or-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-generateimagemetadata-is-the-params-parameter-synchronous-or-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In generateImageMetadata, is the params parameter synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Synchronous - generateImageMetadata receives synchronous params, while the image generation function receives async params</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16zME1" prefix="r3009" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2875914543645153413"],"question":[0,"What happens if you exceed the 8MB size limit for opengraph-image files?"],"answer":[0,"It causes build failures"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-exceed-the-8mb-size-limit-for-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-exceed-the-8mb-size-limit-for-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-exceed-the-8mb-size-limit-for-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you exceed the 8MB size limit for opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It causes build failures</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25mLXs" prefix="r3010" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3226668122777895068"],"question":[0,"What is the default height for ImageResponse if not specified?"],"answer":[0,"630 pixels"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-height-for-imageresponse-if-not-specified"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-height-for-imageresponse-if-not-specified" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-height-for-imageresponse-if-not-specified" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default height for ImageResponse if not specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>630 pixels</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1TfmVz" prefix="r3011" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4415737963796772036"],"question":[0,"What layout system does ImageResponse support?"],"answer":[0,"Only flexbox and a subset of CSS properties are supported. Advanced layouts like display: grid will not work."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-layout-system-does-imageresponse-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-layout-system-does-imageresponse-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-layout-system-does-imageresponse-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What layout system does ImageResponse support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only flexbox and a subset of CSS properties are supported. Advanced layouts like display: grid will not work.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="f8YAA" prefix="r3012" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4422722916849389437"],"question":[0,"What is the default contentType for opengraph-image exports?"],"answer":[0,"image/png"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-contenttype-for-opengraph-image-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-contenttype-for-opengraph-image-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-contenttype-for-opengraph-image-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default contentType for opengraph-image exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>image/png</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27j51n" prefix="r3013" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5123150282919552233"],"question":[0,"Are opengraph-image Route Handlers cached by default?"],"answer":[0,"Yes, they are cached by default unless they use a Dynamic API or dynamic config option"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"are-opengraph-image-route-handlers-cached-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-opengraph-image-route-handlers-cached-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-opengraph-image-route-handlers-cached-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are opengraph-image Route Handlers cached by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, they are cached by default unless they use a Dynamic API or dynamic config option</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KFugX" prefix="r3014" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5292399442358806376"],"question":[0,"What runtime is required for opengraph-image files in Next.js 13?"],"answer":[0,"Only the Edge Runtime was supported in Next.js 13. The Node.js runtime did not work."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-is-required-for-opengraph-image-files-in-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-is-required-for-opengraph-image-files-in-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-is-required-for-opengraph-image-files-in-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime is required for opengraph-image files in Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the Edge Runtime was supported in Next.js 13. The Node.js runtime did not work.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2d46GJ" prefix="r3015" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5333058488322073933"],"question":[0,"What is the default HTTP status code for ImageResponse?"],"answer":[0,"200"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-http-status-code-for-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-http-status-code-for-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-http-status-code-for-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default HTTP status code for ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>200</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vELb5" prefix="r3016" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5903206947287318926"],"question":[0,"What must the default export function return in an opengraph-image file?"],"answer":[0,"Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-the-default-export-function-return-in-an-opengraph-image-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-the-default-export-function-return-in-an-opengraph-image-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-the-default-export-function-return-in-an-opengraph-image-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must the default export function return in an opengraph-image file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DPEcH" prefix="r3017" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6238520652288546999"],"question":[0,"Are font files included in the 500KB bundle size limit for ImageResponse?"],"answer":[0,"Yes, fonts are included in the 500KB limit along with JSX, CSS, images, and any other assets"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"are-font-files-included-in-the-500kb-bundle-size-limit-for-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-font-files-included-in-the-500kb-bundle-size-limit-for-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-font-files-included-in-the-500kb-bundle-size-limit-for-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are font files included in the 500KB bundle size limit for ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, fonts are included in the 500KB limit along with JSX, CSS, images, and any other assets</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1acsu" prefix="r3018" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6411261376309398901"],"question":[0,"What file extensions are supported for programmatically generated opengraph-image files?"],"answer":[0,".js, .ts, or .tsx"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-programmatically-generated-opengraph-imag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-programmatically-generated-opengraph-imag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-programmatically-generated-opengraph-imag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for programmatically generated opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.js, .ts, or .tsx</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pfUGN" prefix="r3019" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6861268738825331791"],"question":[0,"What is the maximum file size for twitter-image files?"],"answer":[0,"5MB"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-file-size-for-twitter-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-file-size-for-twitter-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-file-size-for-twitter-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum file size for twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5MB</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fxOKc" prefix="r3020" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7327216468364507834"],"question":[0,"What properties should you export to configure image metadata in opengraph-image files?"],"answer":[0,"alt (string), size (object with width and height number properties), and contentType (MIME type string)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-should-you-export-to-configure-image-metadata-in-opengraph-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-should-you-export-to-configure-image-metadata-in-opengraph-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-should-you-export-to-configure-image-metadata-in-opengraph-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties should you export to configure image metadata in opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>alt (string), size (object with width and height number properties), and contentType (MIME type string)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhO0Sj" prefix="r3021" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8591803544642766613"],"question":[0,"Can you generate multiple Open Graph images for a single route segment?"],"answer":[0,"Yes, use generateImageMetadata to return multiple images for one route segment"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-generate-multiple-open-graph-images-for-a-single-route-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-generate-multiple-open-graph-images-for-a-single-route-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-generate-multiple-open-graph-images-for-a-single-route-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you generate multiple Open Graph images for a single route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, use generateImageMetadata to return multiple images for one route segment</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JgA8Q" prefix="r3022" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9301566745632711387"],"question":[0,"What route segment config options can be exported from opengraph-image files?"],"answer":[0,"dynamic, dynamicParams, revalidate, fetchCache, runtime, preferredRegion, and maxDuration (same options as Pages, Layouts, and Route Handlers)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-route-segment-config-options-can-be-exported-from-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-route-segment-config-options-can-be-exported-from-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-route-segment-config-options-can-be-exported-from-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What route segment config options can be exported from opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>dynamic, dynamicParams, revalidate, fetchCache, runtime, preferredRegion, and maxDuration (same options as Pages, Layouts, and Route Handlers)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Qsgii" prefix="r3023" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11071263230418518242"],"question":[0,"What underlying technologies does ImageResponse use to convert HTML and CSS to PNG?"],"answer":[0,"@vercel/og, Satori, and Resvg"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-underlying-technologies-does-imageresponse-use-to-convert-html-and-css-to-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-underlying-technologies-does-imageresponse-use-to-convert-html-and-css-to-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-underlying-technologies-does-imageresponse-use-to-convert-html-and-css-to-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What underlying technologies does ImageResponse use to convert HTML and CSS to PNG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@vercel/og, Satori, and Resvg</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vlt16" prefix="r3024" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11088495442673759355"],"question":[0,"What HTTP response options can be configured in ImageResponse?"],"answer":[0,"status (number, default 200), statusText (string), and headers (Record<string, string>)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-response-options-can-be-configured-in-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-response-options-can-be-configured-in-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-response-options-can-be-configured-in-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP response options can be configured in ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>status (number, default 200), statusText (string), and headers (Record<string, string>)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WfD9H" prefix="r3025" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11233420157900377105"],"question":[0,"What must each object in the array returned by generateImageMetadata contain?"],"answer":[0,"A required 'id' field (string), and optionally 'alt' (string), 'size' (object with width and height), and 'contentType' (string)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-each-object-in-the-array-returned-by-generateimagemetadata-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-each-object-in-the-array-returned-by-generateimagemetadata-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-each-object-in-the-array-returned-by-generateimagemetadata-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must each object in the array returned by generateImageMetadata contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A required 'id' field (string), and optionally 'alt' (string), 'size' (object with width and height), and 'contentType' (string)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoltFU" prefix="r3026" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11688614287078300811"],"question":[0,"What emoji set does ImageResponse use by default?"],"answer":[0,"twemoji (Twitter's emoji set)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-emoji-set-does-imageresponse-use-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-emoji-set-does-imageresponse-use-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-emoji-set-does-imageresponse-use-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What emoji set does ImageResponse use by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>twemoji (Twitter's emoji set)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qjQ4a" prefix="r3027" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12374562429400423709"],"question":[0,"What is the default width for ImageResponse if not specified?"],"answer":[0,"1200 pixels"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-width-for-imageresponse-if-not-specified"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-width-for-imageresponse-if-not-specified" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-width-for-imageresponse-if-not-specified" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default width for ImageResponse if not specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1200 pixels</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fO4XR" prefix="r3028" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13441169662669920151"],"question":[0,"What parameters does the generateImageMetadata function receive?"],"answer":[0,"An optional params object containing dynamic route parameters from the root segment down to where generateImageMetadata is called"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-generateimagemetadata-function-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-generateimagemetadata-function-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-generateimagemetadata-function-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the generateImageMetadata function receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An optional params object containing dynamic route parameters from the root segment down to where generateImageMetadata is called</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1W3IU4" prefix="r3029" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13915857723979947153"],"question":[0,"How do you load custom fonts from the filesystem in opengraph-image files?"],"answer":[0,"Use readFile from 'node:fs/promises' to read the font file from the filesystem (requires Node.js runtime), then pass the data to the fonts option"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-load-custom-fonts-from-the-filesystem-in-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-load-custom-fonts-from-the-filesystem-in-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-load-custom-fonts-from-the-filesystem-in-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you load custom fonts from the filesystem in opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use readFile from 'node:fs/promises' to read the font file from the filesystem (requires Node.js runtime), then pass the data to the fonts option</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aiLRg" prefix="r3030" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13992237973238241178"],"question":[0,"Can you use the Node.js runtime for opengraph-image files in Next.js 14+?"],"answer":[0,"Yes, both 'nodejs' and 'edge' runtimes are supported in Next.js 14+"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-node-js-runtime-for-opengraph-image-files-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-node-js-runtime-for-opengraph-image-files-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-node-js-runtime-for-opengraph-image-files-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the Node.js runtime for opengraph-image files in Next.js 14+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, both 'nodejs' and 'edge' runtimes are supported in Next.js 14+</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14Hkp2" prefix="r3031" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14010457424907996547"],"question":[0,"What is the maximum file size for opengraph-image files?"],"answer":[0,"8MB"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-file-size-for-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-file-size-for-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-file-size-for-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum file size for opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>8MB</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="testing-next-js-specific-testing-considerations" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Testing > Next.js-Specific Testing Considerations</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 33 questions </span> </div> <div class="space-y-4"> <astro-island uid="190qpv" prefix="r3032" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"285534685124501584"],"question":[0,"What packages are required to set up Jest testing in a Next.js application?"],"answer":[0,"You need to install these packages as dev dependencies: jest, jest-environment-jsdom, @testing-library/react, @testing-library/dom, @testing-library/jest-dom, ts-node, and @types/jest."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-packages-are-required-to-set-up-jest-testing-in-a-next-js-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-packages-are-required-to-set-up-jest-testing-in-a-next-js-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-packages-are-required-to-set-up-jest-testing-in-a-next-js-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What packages are required to set up Jest testing in a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You need to install these packages as dev dependencies: jest, jest-environment-jsdom, @testing-library/react, @testing-library/dom, @testing-library/jest-dom, ts-node, and @types/jest.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="m8dhG" prefix="r3033" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"473165286024804520"],"question":[0,"How do you test async Server Components with React Testing Library?"],"answer":[0,"Call the server component as a function and await it before rendering. The test should call the component function directly, await the promise, and then pass the resulting JSX to render(). The render method from React Testing Library can only work with JSX.Elements and cannot use Promises directly."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.marcusoft.net/2022/11/nextjs-testing-async-react-components.html"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-test-async-server-components-with-react-testing-library"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-test-async-server-components-with-react-testing-library" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-test-async-server-components-with-react-testing-library" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you test async Server Components with React Testing Library?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Call the server component as a function and await it before rendering. The test should call the component function directly, await the promise, and then pass the resulting JSX to render(). The render method from React Testing Library can only work with JSX.Elements and cannot use Promises directly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.marcusoft.net/2022/11/nextjs-testing-async-react-components.html" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>marcusoft.net</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rME8q" prefix="r3034" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"932774970722138643"],"question":[0,"What Next.js features does next/jest automatically mock?"],"answer":[0,"next/jest automatically mocks stylesheets (.css, .module.css, and scss variants), image imports, and next/font."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-features-does-next-jest-automatically-mock"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-features-does-next-jest-automatically-mock" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-features-does-next-jest-automatically-mock" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js features does next/jest automatically mock?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next/jest automatically mocks stylesheets (.css, .module.css, and scss variants), image imports, and next/font.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CBMKK" prefix="r3035" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1167226729690092224"],"question":[0,"What Jest environment comment is needed when testing Next.js API routes with testEnvironment: 'jsdom'?"],"answer":[0,"Add /** @jest-environment node */ at the very top of your API route test files to tell Jest to use the node environment instead of jsdom."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/dforrunner/how-to-unit-test-nextjs-13-app-router-api-routes-with-jest-and-react-testing-library-270a"]]],"topic":[0,"nextjs"],"slug":[0,"what-jest-environment-comment-is-needed-when-testing-next-js-api-routes-with-tes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-jest-environment-comment-is-needed-when-testing-next-js-api-routes-with-tes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-jest-environment-comment-is-needed-when-testing-next-js-api-routes-with-tes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Jest environment comment is needed when testing Next.js API routes with testEnvironment: 'jsdom'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add /** @jest-environment node */ at the very top of your API route test files to tell Jest to use the node environment instead of jsdom.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/dforrunner/how-to-unit-test-nextjs-13-app-router-api-routes-with-jest-and-react-testing-library-270a" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sCqxr" prefix="r3036" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1582470903708386159"],"question":[0,"What package.json script is recommended for opening Cypress interactively?"],"answer":[0,"Add \"cypress:open\": \"cypress open\" to the scripts field in package.json."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-json-script-is-recommended-for-opening-cypress-interactively"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-json-script-is-recommended-for-opening-cypress-interactively" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-json-script-is-recommended-for-opening-cypress-interactively" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package.json script is recommended for opening Cypress interactively?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add "cypress:open": "cypress open" to the scripts field in package.json.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1twdS3" prefix="r3037" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2208709539482597372"],"question":[0,"What are the five types of testing approaches identified in the Next.js testing documentation?"],"answer":[0,"1) Unit Testing - tests individual code blocks in isolation (functions, hooks, components), 2) Component Testing - focused unit testing of React components, 3) Integration Testing - tests how multiple units work together, 4) End-to-End (E2E) Testing - tests user flows in browser-like production environments, 5) Snapshot Testing - compares current component output against saved snapshots."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-five-types-of-testing-approaches-identified-in-the-next-js-testing-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-five-types-of-testing-approaches-identified-in-the-next-js-testing-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-five-types-of-testing-approaches-identified-in-the-next-js-testing-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the five types of testing approaches identified in the Next.js testing documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Unit Testing - tests individual code blocks in isolation (functions, hooks, components), 2) Component Testing - focused unit testing of React components, 3) Integration Testing - tests how multiple units work together, 4) End-to-End (E2E) Testing - tests user flows in browser-like production environments, 5) Snapshot Testing - compares current component output against saved snapshots.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PKhGg" prefix="r3038" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2740183794987871834"],"question":[0,"What configuration is required for Cypress component testing with Next.js?"],"answer":[0,"Configure component: { devServer: { framework: 'next', bundler: 'webpack' } } in cypress.config.ts or .js file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-required-for-cypress-component-testing-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-required-for-cypress-component-testing-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-required-for-cypress-component-testing-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is required for Cypress component testing with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Configure component: { devServer: { framework: 'next', bundler: 'webpack' } } in cypress.config.ts or .js file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z81dli" prefix="r3039" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3805972089646797124"],"question":[0,"What are the test file location conventions supported in Next.js App Router for tests?"],"answer":[0,"Tests can use the __tests__ directory convention or be colocated within the app router structure."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-test-file-location-conventions-supported-in-next-js-app-router-for-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-test-file-location-conventions-supported-in-next-js-app-router-for-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-test-file-location-conventions-supported-in-next-js-app-router-for-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the test file location conventions supported in Next.js App Router for tests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tests can use the <strong>tests</strong> directory convention or be colocated within the app router structure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1TP4hM" prefix="r3040" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4704237473221976766"],"question":[0,"What moduleNameMapper pattern should be used for CSS modules in Jest with Next.js?"],"answer":[0,"Map CSS module files to 'identity-obj-proxy': '^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy', and regular CSS files to a mock: '^.+\\.(css|sass|scss)$': '<rootDir>/__mocks__/styleMock.js'. The .module.css pattern must come before the general .css pattern in the configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-modulenamemapper-pattern-should-be-used-for-css-modules-in-jest-with-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-modulenamemapper-pattern-should-be-used-for-css-modules-in-jest-with-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-modulenamemapper-pattern-should-be-used-for-css-modules-in-jest-with-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What moduleNameMapper pattern should be used for CSS modules in Jest with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Map CSS module files to 'identity-obj-proxy': '^.+.module.(css|sass|scss)$': 'identity-obj-proxy', and regular CSS files to a mock: '^.+.(css|sass|scss)$': '<rootDir>/<strong>mocks</strong>/styleMock.js'. The .module.css pattern must come before the general .css pattern in the configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LTC2I" prefix="r3041" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5174389566688122915"],"question":[0,"What four testing frameworks have dedicated configuration guides in Next.js official documentation?"],"answer":[0,"Cypress (for E2E and Component Testing), Jest (for Unit and Snapshot Testing), Playwright (for E2E Testing), and Vitest (for Unit Testing)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing"]]],"topic":[0,"nextjs"],"slug":[0,"what-four-testing-frameworks-have-dedicated-configuration-guides-in-next-js-offi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-four-testing-frameworks-have-dedicated-configuration-guides-in-next-js-offi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-four-testing-frameworks-have-dedicated-configuration-guides-in-next-js-offi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What four testing frameworks have dedicated configuration guides in Next.js official documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cypress (for E2E and Component Testing), Jest (for Unit and Snapshot Testing), Playwright (for E2E Testing), and Vitest (for Unit Testing).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kFLFS" prefix="r3042" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5256931848804530830"],"question":[0,"Why is createJestConfig exported asynchronously in Next.js Jest configuration?"],"answer":[0,"createJestConfig is exported async to ensure that next/jest can load the Next.js config which is async. This allows next/jest to load next.config.js and environment variables (.env files) during Jest setup, which are asynchronous operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-createjestconfig-exported-asynchronously-in-next-js-jest-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-createjestconfig-exported-asynchronously-in-next-js-jest-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-createjestconfig-exported-asynchronously-in-next-js-jest-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is createJestConfig exported asynchronously in Next.js Jest configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>createJestConfig is exported async to ensure that next/jest can load the Next.js config which is async. This allows next/jest to load next.config.js and environment variables (.env files) during Jest setup, which are asynchronous operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aFCJB" prefix="r3043" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5838452167837053168"],"question":[0,"What is the command to quickly bootstrap a Next.js project with Cypress configured?"],"answer":[0,"Use: npx create-next-app@latest --example with-cypress with-cypress-app"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-quickly-bootstrap-a-next-js-project-with-cypress-configur"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-quickly-bootstrap-a-next-js-project-with-cypress-configur" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-quickly-bootstrap-a-next-js-project-with-cypress-configur" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to quickly bootstrap a Next.js project with Cypress configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use: npx create-next-app@latest --example with-cypress with-cypress-app</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Ebbxm" prefix="r3044" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8402352939497784697"],"question":[0,"What command is used to install Playwright dependencies in CI environments?"],"answer":[0,"Use 'npx playwright install-deps' to install dependencies in Continuous Integration environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-is-used-to-install-playwright-dependencies-in-ci-environments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-is-used-to-install-playwright-dependencies-in-ci-environments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-is-used-to-install-playwright-dependencies-in-ci-environments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command is used to install Playwright dependencies in CI environments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use 'npx playwright install-deps' to install dependencies in Continuous Integration environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xH84p" prefix="r3045" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9044417399123811955"],"question":[0,"What is the command to quickly bootstrap a Next.js project with Playwright configured?"],"answer":[0,"Use: npx create-next-app@latest --example with-playwright with-playwright-app"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-quickly-bootstrap-a-next-js-project-with-playwright-confi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-quickly-bootstrap-a-next-js-project-with-playwright-confi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-quickly-bootstrap-a-next-js-project-with-playwright-confi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to quickly bootstrap a Next.js project with Playwright configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use: npx create-next-app@latest --example with-playwright with-playwright-app</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17WApS" prefix="r3046" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9062192958954726117"],"question":[0,"How do you enable custom matchers from @testing-library/jest-dom in Jest?"],"answer":[0,"Add setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'] to your Jest config, then import '@testing-library/jest-dom' in the setup file. For versions before 6.0, import '@testing-library/jest-dom/extend-expect' instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-custom-matchers-from-testing-library-jest-dom-in-jest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-custom-matchers-from-testing-library-jest-dom-in-jest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-custom-matchers-from-testing-library-jest-dom-in-jest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable custom matchers from @testing-library/jest-dom in Jest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'] to your Jest config, then import '@testing-library/jest-dom' in the setup file. For versions before 6.0, import '@testing-library/jest-dom/extend-expect' instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Hjber" prefix="r3047" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9394268362967251442"],"question":[0,"What is the required test environment setting in vitest.config for Next.js?"],"answer":[0,"Set test: { environment: 'jsdom' } in the vitest.config file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-test-environment-setting-in-vitest-config-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-test-environment-setting-in-vitest-config-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-test-environment-setting-in-vitest-config-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required test environment setting in vitest.config for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set test: { environment: 'jsdom' } in the vitest.config file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tdAWv" prefix="r3048" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9697629422824036602"],"question":[0,"What is the recommended package for mocking next/router and next/navigation in tests?"],"answer":[0,"The next-router-mock package is recommended. For next/router (Pages Router), use: jest.mock(\"next/router\", () => jest.requireActual(\"next-router-mock\")). For next/navigation (App Router), use: jest.mock(\"next/navigation\", () => require(\"next-router-mock/navigation\"))."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/next-router-mock"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-package-for-mocking-next-router-and-next-navigation-in-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-package-for-mocking-next-router-and-next-navigation-in-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-package-for-mocking-next-router-and-next-navigation-in-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended package for mocking next/router and next/navigation in tests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The next-router-mock package is recommended. For next/router (Pages Router), use: jest.mock("next/router", () => jest.requireActual("next-router-mock")). For next/navigation (App Router), use: jest.mock("next/navigation", () => require("next-router-mock/navigation")).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/next-router-mock" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XiPNR" prefix="r3049" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9731555761889567630"],"question":[0,"What limitation exists when testing the Next.js Image component in Cypress component tests?"],"answer":[0,"The <Image /> component may not function in component tests without a server running."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-limitation-exists-when-testing-the-next-js-image-component-in-cypress-compo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-limitation-exists-when-testing-the-next-js-image-component-in-cypress-compo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-limitation-exists-when-testing-the-next-js-image-component-in-cypress-compo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What limitation exists when testing the Next.js Image component in Cypress component tests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <Image /> component may not function in component tests without a server running.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QRV72" prefix="r3050" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10047186585370615624"],"question":[0,"What is the default coverageProvider value when using next/jest?"],"answer":[0,"The default coverageProvider is 'v8'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-coverageprovider-value-when-using-next-jest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-coverageprovider-value-when-using-next-jest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-coverageprovider-value-when-using-next-jest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default coverageProvider value when using next/jest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default coverageProvider is 'v8'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pXVkJ" prefix="r3051" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11121690352203230966"],"question":[0,"What is the recommended workflow for running Playwright tests against a Next.js production build?"],"answer":[0,"First execute 'npm run build', then run 'npm run start', and in another terminal execute 'npx playwright test'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-workflow-for-running-playwright-tests-against-a-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-workflow-for-running-playwright-tests-against-a-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-workflow-for-running-playwright-tests-against-a-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended workflow for running Playwright tests against a Next.js production build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>First execute 'npm run build', then run 'npm run start', and in another terminal execute 'npx playwright test'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZToCgo" prefix="r3052" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11127820867954817802"],"question":[0,"Which browsers does Playwright test against simultaneously?"],"answer":[0,"Playwright simulates user interactions across three browsers: Chromium, Firefox, and WebKit simultaneously during test execution."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"which-browsers-does-playwright-test-against-simultaneously"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-browsers-does-playwright-test-against-simultaneously" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-browsers-does-playwright-test-against-simultaneously" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which browsers does Playwright test against simultaneously?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Playwright simulates user interactions across three browsers: Chromium, Firefox, and WebKit simultaneously during test execution.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LYKrw" prefix="r3053" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11169383842806718499"],"question":[0,"What package is recommended for testing Next.js App Router route handlers with Jest?"],"answer":[0,"The next-test-api-route-handler (NTARH) package is recommended. It uses Next.js's internal resolvers to precisely emulate route handling and provides a testApiHandler function with a fetch utility."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/next-test-api-route-handler"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-is-recommended-for-testing-next-js-app-router-route-handlers-with-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-is-recommended-for-testing-next-js-app-router-route-handlers-with-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-is-recommended-for-testing-next-js-app-router-route-handlers-with-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package is recommended for testing Next.js App Router route handlers with Jest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The next-test-api-route-handler (NTARH) package is recommended. It uses Next.js's internal resolvers to precisely emulate route handling and provides a testApiHandler function with a fetch utility.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/next-test-api-route-handler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zzj3tE" prefix="r3054" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11980573880587865552"],"question":[0,"What is the basic approach to mock the Next.js Image component in Jest?"],"answer":[0,"Mock next/image to render as a regular img tag: jest.mock(\"next/image\", () => ({ __esModule: true, default: (props) => { return <img {...props} />; } }));"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/32325"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-approach-to-mock-the-next-js-image-component-in-jest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-approach-to-mock-the-next-js-image-component-in-jest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-approach-to-mock-the-next-js-image-component-in-jest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic approach to mock the Next.js Image component in Jest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Mock next/image to render as a regular img tag: jest.mock("next/image", () => ({ __esModule: true, default: (props) => { return <img {...props} />; } }));</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/32325" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="93B88" prefix="r3055" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11989728567058562862"],"question":[0,"What baseURL value is recommended in playwright.config.ts for Next.js testing?"],"answer":[0,"Add \"baseURL\": \"http://localhost:3000\" to playwright.config.ts to simplify test navigation commands, allowing you to use page.goto(\"/\") instead of the full URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-baseurl-value-is-recommended-in-playwright-config-ts-for-next-js-testing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-baseurl-value-is-recommended-in-playwright-config-ts-for-next-js-testing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-baseurl-value-is-recommended-in-playwright-config-ts-for-next-js-testing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What baseURL value is recommended in playwright.config.ts for Next.js testing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add "baseURL": "<a href="http://localhost:3000">http://localhost:3000</a>" to playwright.config.ts to simplify test navigation commands, allowing you to use page.goto("/") instead of the full URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2sLDs8" prefix="r3056" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12080607573539785470"],"question":[0,"Why don't NEXT_PUBLIC_ environment variables work in Jest tests?"],"answer":[0,"Since you aren't running the Next build process when testing with Jest, the environment variables don't get substituted. Public environment variables are inlined into the JavaScript bundle during 'next build', so .env.test does not automatically work for NEXT_PUBLIC_ variables without using loadEnvConfig from @next/env."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/16315"]]],"topic":[0,"nextjs"],"slug":[0,"why-don-t-next-public-environment-variables-work-in-jest-tests"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-don-t-next-public-environment-variables-work-in-jest-tests" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-don-t-next-public-environment-variables-work-in-jest-tests" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why don't NEXT_PUBLIC_ environment variables work in Jest tests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since you aren't running the Next build process when testing with Jest, the environment variables don't get substituted. Public environment variables are inlined into the JavaScript bundle during 'next build', so .env.test does not automatically work for NEXT_PUBLIC_ variables without using loadEnvConfig from @next/env.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/16315" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRiOHs" prefix="r3057" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12204740576189736828"],"question":[0,"What is the command to generate a basic Jest configuration file for Next.js?"],"answer":[0,"Run 'npm init jest@latest' (or yarn/pnpm equivalents), which will take you through prompts to setup Jest for your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-generate-a-basic-jest-configuration-file-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-generate-a-basic-jest-configuration-file-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-generate-a-basic-jest-configuration-file-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to generate a basic Jest configuration file for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run 'npm init jest@latest' (or yarn/pnpm equivalents), which will take you through prompts to setup Jest for your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vSfyF" prefix="r3058" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12523437065680690517"],"question":[0,"What TypeScript version is required for Cypress?"],"answer":[0,"Cypress requires TypeScript 5.0 or higher."],"confidence":[0,0.95],"sources":[1,[[0,"https://docs.cypress.io/app/tooling/typescript-support"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-version-is-required-for-cypress"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-version-is-required-for-cypress" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-version-is-required-for-cypress" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript version is required for Cypress?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cypress requires TypeScript 5.0 or higher.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://docs.cypress.io/app/tooling/typescript-support" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>docs.cypress.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13svPQ" prefix="r3059" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13023759218675046160"],"question":[0,"How do you load environment variables in Jest tests the same way Next.js does?"],"answer":[0,"Use the loadEnvConfig function from the @next/env package in a Jest global setup file: import { loadEnvConfig } from '@next/env'; export default async () => { const projectDir = process.cwd(); loadEnvConfig(projectDir); }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-load-environment-variables-in-jest-tests-the-same-way-next-js-does"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-load-environment-variables-in-jest-tests-the-same-way-next-js-does" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-load-environment-variables-in-jest-tests-the-same-way-next-js-does" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you load environment variables in Jest tests the same way Next.js does?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the loadEnvConfig function from the @next/env package in a Jest global setup file: import { loadEnvConfig } from '@next/env'; export default async () => { const projectDir = process.cwd(); loadEnvConfig(projectDir); }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BYpgd" prefix="r3060" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13207403165715405590"],"question":[0,"What does the 'dir' option in next/jest configuration do?"],"answer":[0,"The dir option provides the path to your Next.js app to load next.config.js and .env files in your test environment. It is typically set to './' to indicate the current directory as the root of your Next.js project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-dir-option-in-next-jest-configuration-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-dir-option-in-next-jest-configuration-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-dir-option-in-next-jest-configuration-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the 'dir' option in next/jest configuration do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The dir option provides the path to your Next.js app to load next.config.js and .env files in your test environment. It is typically set to './' to indicate the current directory as the root of your Next.js project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fFzWR" prefix="r3061" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13529915115518086851"],"question":[0,"What is the minimum Cypress version required to support TypeScript 5 with moduleResolution: 'bundler' in Next.js?"],"answer":[0,"Cypress version 13.6.3 or later is required. Versions below 13.6.3 do not support TypeScript version 5 with moduleResolution: \"bundler\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-cypress-version-required-to-support-typescript-5-with-module"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-cypress-version-required-to-support-typescript-5-with-module" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-cypress-version-required-to-support-typescript-5-with-module" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Cypress version required to support TypeScript 5 with moduleResolution: 'bundler' in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cypress version 13.6.3 or later is required. Versions below 13.6.3 do not support TypeScript version 5 with moduleResolution: "bundler".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rzSqd" prefix="r3062" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13567794380222564420"],"question":[0,"What is the recommended baseUrl configuration for Cypress testing with Next.js?"],"answer":[0,"Configure baseUrl: 'http://localhost:3000' in cypress.config.ts to simplify visit commands."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-baseurl-configuration-for-cypress-testing-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-baseurl-configuration-for-cypress-testing-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-baseurl-configuration-for-cypress-testing-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended baseUrl configuration for Cypress testing with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Configure baseUrl: '<a href="http://localhost:3000">http://localhost:3000</a>' in cypress.config.ts to simplify visit commands.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RNeIO" prefix="r3063" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13998395131861042514"],"question":[0,"What testing approach does Next.js recommend for async Server Components?"],"answer":[0,"Next.js recommends using End-to-End (E2E) Testing over Unit Testing for async Server Components, as Jest and Vitest currently do not support them. While you can still run unit tests for synchronous Server and Client Components, E2E tests are recommended for async components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing"]]],"topic":[0,"nextjs"],"slug":[0,"what-testing-approach-does-next-js-recommend-for-async-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-testing-approach-does-next-js-recommend-for-async-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-testing-approach-does-next-js-recommend-for-async-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What testing approach does Next.js recommend for async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using End-to-End (E2E) Testing over Unit Testing for async Server Components, as Jest and Vitest currently do not support them. While you can still run unit tests for synchronous Server and Client Components, E2E tests are recommended for async components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zm1PFQ" prefix="r3064" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14617090745613411779"],"question":[0,"What packages are required to set up Vitest testing in a TypeScript Next.js application?"],"answer":[0,"For TypeScript projects, install: vitest, @vitejs/plugin-react, jsdom, @testing-library/react, @testing-library/dom, and vite-tsconfig-paths as dev dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-packages-are-required-to-set-up-vitest-testing-in-a-typescript-next-js-appl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-packages-are-required-to-set-up-vitest-testing-in-a-typescript-next-js-appl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-packages-are-required-to-set-up-vitest-testing-in-a-typescript-next-js-appl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What packages are required to set up Vitest testing in a TypeScript Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For TypeScript projects, install: vitest, @vitejs/plugin-react, jsdom, @testing-library/react, @testing-library/dom, and vite-tsconfig-paths as dev dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="typescript-type-checking-and-validation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">TypeScript > Type Checking and Validation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 33 questions </span> </div> <div class="space-y-4"> <astro-island uid="1gkVGA" prefix="r3065" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"287767404183746151"],"question":[0,"What is the default value of 'allowJs' in Next.js TypeScript configuration?"],"answer":[0,"true. The default Next.js TypeScript configuration sets 'allowJs': true to enable mixing JavaScript and TypeScript files."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-allowjs-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-allowjs-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-allowjs-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'allowJs' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The default Next.js TypeScript configuration sets 'allowJs': true to enable mixing JavaScript and TypeScript files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFPA2M" prefix="r3066" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"442259382587578289"],"question":[0,"Should the next-env.d.ts file be added to .gitignore?"],"answer":[0,"Yes. The next-env.d.ts file should be added to .gitignore because it is automatically generated by Next.js and can change at any time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"should-the-next-env-d-ts-file-be-added-to-gitignore"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-the-next-env-d-ts-file-be-added-to-gitignore" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-the-next-env-d-ts-file-be-added-to-gitignore" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should the next-env.d.ts file be added to .gitignore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The next-env.d.ts file should be added to .gitignore because it is automatically generated by Next.js and can change at any time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cHhLa" prefix="r3067" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"464290877094300090"],"question":[0,"What is required in Node.js v22.10.0 to v22.17.x for native TypeScript resolver?"],"answer":[0,"You must opt in with NODE_OPTIONS=--experimental-transform-types. In Node.js v22.18.0+, process.features.typescript is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-in-node-js-v22-10-0-to-v22-17-x-for-native-typescript-resolver"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-in-node-js-v22-10-0-to-v22-17-x-for-native-typescript-resolver" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-in-node-js-v22-10-0-to-v22-17-x-for-native-typescript-resolver" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required in Node.js v22.10.0 to v22.17.x for native TypeScript resolver?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must opt in with NODE_OPTIONS=--experimental-transform-types. In Node.js v22.18.0+, process.features.typescript is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28CUAz" prefix="r3068" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"618929713684844790"],"question":[0,"What TypeScript error occurs when using older versions with async Server Components?"],"answer":[0,"'Promise<Element>' is not a valid JSX element type error. This is resolved by upgrading to TypeScript 5.1.3+ and @types/react 18.2.8+."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-error-occurs-when-using-older-versions-with-async-server-compone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-error-occurs-when-using-older-versions-with-async-server-compone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-error-occurs-when-using-older-versions-with-async-server-compone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript error occurs when using older versions with async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'Promise<Element>' is not a valid JSX element type error. This is resolved by upgrading to TypeScript 5.1.3+ and @types/react 18.2.8+.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JqmPs" prefix="r3069" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"770914283252781934"],"question":[0,"What file extension should you use for TypeScript Next.js configuration?"],"answer":[0,"next.config.ts. You can use TypeScript in your configuration by using next.config.ts and importing the NextConfig type from 'next'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extension-should-you-use-for-typescript-next-js-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extension-should-you-use-for-typescript-next-js-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extension-should-you-use-for-typescript-next-js-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extension should you use for TypeScript Next.js configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next.config.ts. You can use TypeScript in your configuration by using next.config.ts and importing the NextConfig type from 'next'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11iHWG" prefix="r3070" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"981188683388995422"],"question":[0,"What is the minimum TypeScript version required for async Server Components in Next.js?"],"answer":[0,"TypeScript 5.1.3 or higher is required for async Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-typescript-version-required-for-async-server-components-in-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-typescript-version-required-for-async-server-components-in-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-typescript-version-required-for-async-server-components-in-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum TypeScript version required for async Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TypeScript 5.1.3 or higher is required for async Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2oveQd" prefix="r3071" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1219980737836762784"],"question":[0,"Should you edit or remove the next-env.d.ts file?"],"answer":[0,"No. You should not remove it or edit it as it can change at any time. Any changes you make will be overwritten."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-edit-or-remove-the-next-env-d-ts-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-edit-or-remove-the-next-env-d-ts-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-edit-or-remove-the-next-env-d-ts-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you edit or remove the next-env.d.ts file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You should not remove it or edit it as it can change at any time. Any changes you make will be overwritten.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z720UE" prefix="r3072" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1355074777294666885"],"question":[0,"Where does Next.js generate route type information when typedRoutes is enabled?"],"answer":[0,"Next.js generates a hidden .d.ts file inside .next that contains information about all existing routes, which is included in tsconfig.json."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-next-js-generate-route-type-information-when-typedroutes-is-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-next-js-generate-route-type-information-when-typedroutes-is-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-next-js-generate-route-type-information-when-typedroutes-is-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does Next.js generate route type information when typedRoutes is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a hidden .d.ts file inside .next that contains information about all existing routes, which is included in tsconfig.json.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoBjid" prefix="r3073" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1648014325641018458"],"question":[0,"What is the default value of 'esModuleInterop' in Next.js TypeScript configuration?"],"answer":[0,"true. The default Next.js TypeScript configuration sets 'esModuleInterop': true."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-esmoduleinterop-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-esmoduleinterop-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-esmoduleinterop-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'esModuleInterop' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The default Next.js TypeScript configuration sets 'esModuleInterop': true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1CNHvq" prefix="r3074" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2660702999164292102"],"question":[0,"What plugin is included by default in Next.js TypeScript configuration?"],"answer":[0,"The 'next' plugin. The configuration includes 'plugins': [{ 'name': 'next' }] to enable Next.js TypeScript features."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-plugin-is-included-by-default-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-plugin-is-included-by-default-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-plugin-is-included-by-default-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What plugin is included by default in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'next' plugin. The configuration includes 'plugins': [{ 'name': 'next' }] to enable Next.js TypeScript features.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9NPSa" prefix="r3075" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2889021927187350282"],"question":[0,"What is the default value of 'noEmit' in Next.js TypeScript configuration?"],"answer":[0,"true. The default Next.js TypeScript configuration sets 'noEmit': true because Next.js handles compilation itself."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-noemit-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-noemit-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-noemit-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'noEmit' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The default Next.js TypeScript configuration sets 'noEmit': true because Next.js handles compilation itself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fGbJv" prefix="r3076" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3219140548501269942"],"question":[0,"What is the minimum @types/react version required for async Server Components in Next.js?"],"answer":[0,"@types/react 18.2.8 or higher is required for async Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-types-react-version-required-for-async-server-components-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-types-react-version-required-for-async-server-components-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-types-react-version-required-for-async-server-components-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum @types/react version required for async Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@types/react 18.2.8 or higher is required for async Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jnsqy" prefix="r3077" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3302733693216058537"],"question":[0,"Does Next.js fail the production build when TypeScript errors are present by default?"],"answer":[0,"Yes. Next.js fails your production build (next build) when TypeScript errors are present in your project by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-fail-the-production-build-when-typescript-errors-are-present-by-def"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-fail-the-production-build-when-typescript-errors-are-present-by-def" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-fail-the-production-build-when-typescript-errors-are-present-by-def" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js fail the production build when TypeScript errors are present by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Next.js fails your production build (next build) when TypeScript errors are present in your project by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15k5jD" prefix="r3078" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3703251684829527139"],"question":[0,"What must be included in tsconfig.json's include array for Next.js TypeScript projects?"],"answer":[0,"The next-env.d.ts file must be included in tsconfig.json's include array. This is done automatically by create-next-app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-be-included-in-tsconfig-json-s-include-array-for-next-js-typescript-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-be-included-in-tsconfig-json-s-include-array-for-next-js-typescript-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-be-included-in-tsconfig-json-s-include-array-for-next-js-typescript-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must be included in tsconfig.json's include array for Next.js TypeScript projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The next-env.d.ts file must be included in tsconfig.json's include array. This is done automatically by create-next-app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GO0aS" prefix="r3079" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3772601974362069747"],"question":[0,"How do you enable typed routes in Next.js with TypeScript?"],"answer":[0,"Set 'typedRoutes: true' in your next.config.ts or next.config.js file. The project must be using TypeScript."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-typed-routes-in-next-js-with-typescript"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-typed-routes-in-next-js-with-typescript" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-typed-routes-in-next-js-with-typescript" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable typed routes in Next.js with TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set 'typedRoutes: true' in your next.config.ts or next.config.js file. The project must be using TypeScript.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1o9jmJ" prefix="r3080" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4065421619894928468"],"question":[0,"What is the default value of 'strict' in Next.js generated tsconfig.json?"],"answer":[0,"true. In current versions of Next.js, the generated tsconfig.json includes 'strict': true by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-strict-in-next-js-generated-tsconfig-json"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-strict-in-next-js-generated-tsconfig-json" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-strict-in-next-js-generated-tsconfig-json" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'strict' in Next.js generated tsconfig.json?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. In current versions of Next.js, the generated tsconfig.json includes 'strict': true by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1g7L5h" prefix="r3081" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4987511142184365004"],"question":[0,"What is the default value of the 'tsconfigPath' option in next.config.js?"],"answer":[0,"'tsconfig.json'. This option allows you to specify an alternative TypeScript configuration file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-tsconfigpath-option-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-tsconfigpath-option-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-tsconfigpath-option-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'tsconfigPath' option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'tsconfig.json'. This option allows you to specify an alternative TypeScript configuration file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nEqOv" prefix="r3082" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6864199118842956898"],"question":[0,"In which Next.js version was incremental type checking support added?"],"answer":[0,"v10.2.1. Since v10.2.1 Next.js supports incremental type checking when enabled in your tsconfig.json."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-incremental-type-checking-support-added"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-incremental-type-checking-support-added" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-incremental-type-checking-support-added" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was incremental type checking support added?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v10.2.1. Since v10.2.1 Next.js supports incremental type checking when enabled in your tsconfig.json.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HVL7H" prefix="r3083" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7848699697642636785"],"question":[0,"What is the default value of the 'ignoreBuildErrors' option in next.config.js TypeScript configuration?"],"answer":[0,"false. By default, Next.js fails production builds when TypeScript errors are present."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-ignorebuilderrors-option-in-next-config-js-type"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-ignorebuilderrors-option-in-next-config-js-type" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-ignorebuilderrors-option-in-next-config-js-type" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'ignoreBuildErrors' option in next.config.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false. By default, Next.js fails production builds when TypeScript errors are present.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhvYl0" prefix="r3084" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8857660097250487063"],"question":[0,"What Node.js version is required for native TypeScript resolver support in next.config.ts?"],"answer":[0,"Node.js v22.10.0 or higher. Next.js detects the native TypeScript resolver via process.features.typescript."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-node-js-version-is-required-for-native-typescript-resolver-support-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-node-js-version-is-required-for-native-typescript-resolver-support-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-node-js-version-is-required-for-native-typescript-resolver-support-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Node.js version is required for native TypeScript resolver support in next.config.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js v22.10.0 or higher. Next.js detects the native TypeScript resolver via process.features.typescript.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z104k4B" prefix="r3085" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8878181123852325900"],"question":[0,"What is the default value of 'moduleResolution' in Next.js TypeScript configuration?"],"answer":[0,"'bundler'. The default Next.js TypeScript configuration uses 'moduleResolution': 'bundler'."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-moduleresolution-in-next-js-typescript-configuratio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-moduleresolution-in-next-js-typescript-configuratio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-moduleresolution-in-next-js-typescript-configuratio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'moduleResolution' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'bundler'. The default Next.js TypeScript configuration uses 'moduleResolution': 'bundler'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mx7Ds" prefix="r3086" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9449582938934947445"],"question":[0,"Can you use baseUrl without specifying paths in Next.js TypeScript configuration?"],"answer":[0,"Yes, but you must specify baseUrl if you specify paths. Next.js has built-in support for both 'paths' and 'baseUrl' options."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/configuring/absolute-imports-and-module-aliases"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-baseurl-without-specifying-paths-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-baseurl-without-specifying-paths-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-baseurl-without-specifying-paths-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use baseUrl without specifying paths in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but you must specify baseUrl if you specify paths. Next.js has built-in support for both 'paths' and 'baseUrl' options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/configuring/absolute-imports-and-module-aliases" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZI3wfG" prefix="r3087" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9648257942063907314"],"question":[0,"What is the default 'include' array in Next.js TypeScript configuration?"],"answer":[0,"['next-env.d.ts', '**/*.ts', '**/*.tsx', '.next/types/**/*.ts']. This includes all TypeScript files and Next.js generated types."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-include-array-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-include-array-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-include-array-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default 'include' array in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>['next-env.d.ts', '<strong>/*.ts', '</strong>/<em>.tsx', '.next/types/**/</em>.ts']. This includes all TypeScript files and Next.js generated types.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wtEsD" prefix="r3088" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9992251975497662338"],"question":[0,"Where are typed route definitions stored when typedRoutes is enabled?"],"answer":[0,"In .next/types. Next.js generates a .d.ts file in .next/types that contains information about all existing routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-typed-route-definitions-stored-when-typedroutes-is-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-typed-route-definitions-stored-when-typedroutes-is-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-typed-route-definitions-stored-when-typedroutes-is-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are typed route definitions stored when typedRoutes is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In .next/types. Next.js generates a .d.ts file in .next/types that contains information about all existing routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20ppbc" prefix="r3089" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10586647864830773855"],"question":[0,"What is the default value of 'resolveJsonModule' in Next.js TypeScript configuration?"],"answer":[0,"true. The default Next.js TypeScript configuration sets 'resolveJsonModule': true."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-resolvejsonmodule-in-next-js-typescript-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-resolvejsonmodule-in-next-js-typescript-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-resolvejsonmodule-in-next-js-typescript-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'resolveJsonModule' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The default Next.js TypeScript configuration sets 'resolveJsonModule': true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24I1AS" prefix="r3090" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10922222587175450493"],"question":[0,"What is the purpose of the experimental.typedEnv feature in Next.js?"],"answer":[0,"When enabled, it generates a .d.ts file in .next/types containing loaded environment variables for editor IntelliSense. Environment variables are deduplicated according to load order."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-experimental-typedenv-feature-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-experimental-typedenv-feature-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-experimental-typedenv-feature-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the experimental.typedEnv feature in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When enabled, it generates a .d.ts file in .next/types containing loaded environment variables for editor IntelliSense. Environment variables are deduplicated according to load order.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WEXxY" prefix="r3091" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13055461908123212864"],"question":[0,"What is the recommended approach when using ignoreBuildErrors: true?"],"answer":[0,"Run type checks separately as part of your build or deploy process, such as using tsc --noEmit, since disabling build errors can be very dangerous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-when-using-ignorebuilderrors-true"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-when-using-ignorebuilderrors-true" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-when-using-ignorebuilderrors-true" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach when using ignoreBuildErrors: true?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run type checks separately as part of your build or deploy process, such as using tsc --noEmit, since disabling build errors can be very dangerous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fHMwB" prefix="r3092" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13249951571146462246"],"question":[0,"How do you enable the Next.js TypeScript plugin in VS Code?"],"answer":[0,"Open the command palette (Ctrl/⌘ + Shift + P), search for 'TypeScript: Select TypeScript Version', and select 'Use Workspace Version'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-the-next-js-typescript-plugin-in-vs-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-the-next-js-typescript-plugin-in-vs-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-the-next-js-typescript-plugin-in-vs-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable the Next.js TypeScript plugin in VS Code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Open the command palette (Ctrl/⌘ + Shift + P), search for 'TypeScript: Select TypeScript Version', and select 'Use Workspace Version'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dNYTa" prefix="r3093" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13294089808316556245"],"question":[0,"What is the default value of 'module' in Next.js TypeScript configuration?"],"answer":[0,"'esnext'. The default Next.js TypeScript configuration sets 'module': 'esnext'."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-module-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-module-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-module-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'module' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'esnext'. The default Next.js TypeScript configuration sets 'module': 'esnext'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11QQcf" prefix="r3094" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13734852345336465088"],"question":[0,"Does Next.js automatically install TypeScript packages when you rename a file to .ts or .tsx?"],"answer":[0,"Yes. When you rename a file to .ts / .tsx and run next dev, Next.js will automatically install the necessary dependencies and add a tsconfig.json file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-install-typescript-packages-when-you-rename-a-file-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-install-typescript-packages-when-you-rename-a-file-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-install-typescript-packages-when-you-rename-a-file-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically install TypeScript packages when you rename a file to .ts or .tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. When you rename a file to .ts / .tsx and run next dev, Next.js will automatically install the necessary dependencies and add a tsconfig.json file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="pacqu" prefix="r3095" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14670660668484733986"],"question":[0,"What is the default value of 'jsx' in Next.js TypeScript configuration?"],"answer":[0,"'preserve'. Next.js sets 'jsx': 'preserve' because Next.js implements its own optimized JSX transform."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/19155"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-jsx-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-jsx-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-jsx-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'jsx' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'preserve'. Next.js sets 'jsx': 'preserve' because Next.js implements its own optimized JSX transform.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/19155" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zh0Qk6" prefix="r3096" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14683520793623456142"],"question":[0,"How are non-literal href strings handled with typedRoutes enabled?"],"answer":[0,"Non-literal href strings require a cast with 'as Route'. Literal href strings are validated automatically."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-non-literal-href-strings-handled-with-typedroutes-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-non-literal-href-strings-handled-with-typedroutes-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-non-literal-href-strings-handled-with-typedroutes-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are non-literal href strings handled with typedRoutes enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Non-literal href strings require a cast with 'as Route'. Literal href strings are validated automatically.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11Rva3" prefix="r3097" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15057146530441555803"],"question":[0,"What is the default value of 'skipLibCheck' in Next.js TypeScript configuration?"],"answer":[0,"true. The default Next.js TypeScript configuration sets 'skipLibCheck': true."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@tsconfig/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-skiplibcheck-in-next-js-typescript-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-skiplibcheck-in-next-js-typescript-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-skiplibcheck-in-next-js-typescript-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of 'skipLibCheck' in Next.js TypeScript configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true. The default Next.js TypeScript configuration sets 'skipLibCheck': true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@tsconfig/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-implementation-approaches" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > Implementation Approaches</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 33 questions </span> </div> <div class="space-y-4"> <astro-island uid="1NJNkY" prefix="r3098" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"401182759592186571"],"question":[0,"Does Next.js automatically add hashes to metadata files in production?"],"answer":[0,"Yes. Next.js will automatically serve the file with hashes in production for caching and update the relevant head elements with the correct metadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-add-hashes-to-metadata-files-in-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-add-hashes-to-metadata-files-in-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-add-hashes-to-metadata-files-in-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically add hashes to metadata files in production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Next.js will automatically serve the file with hashes in production for caching and update the relevant head elements with the correct metadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PewOw" prefix="r3099" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"665024436986900808"],"question":[0,"What optional metadata properties can be exported from opengraph-image or twitter-image files?"],"answer":[0,"alt (string), size ({ width: number; height: number }), and contentType (string - image MIME type)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-metadata-properties-can-be-exported-from-opengraph-image-or-twitte"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-metadata-properties-can-be-exported-from-opengraph-image-or-twitte" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-metadata-properties-can-be-exported-from-opengraph-image-or-twitte" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional metadata properties can be exported from opengraph-image or twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>alt (string), size ({ width: number; height: number }), and contentType (string - image MIME type).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RiDrU" prefix="r3100" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"869835286033139845"],"question":[0,"What return type must a sitemap function export?"],"answer":[0,"Array<{ url: string, lastModified?: string | Date, changeFrequency?: 'always'|'hourly'|'daily'|'weekly'|'monthly'|'yearly'|'never', priority?: number, alternates?: { languages?: Languages<string> } }>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-must-a-sitemap-function-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-must-a-sitemap-function-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-must-a-sitemap-function-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type must a sitemap function export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Array<{ url: string, lastModified?: string | Date, changeFrequency?: 'always'|'hourly'|'daily'|'weekly'|'monthly'|'yearly'|'never', priority?: number, alternates?: { languages?: Languages<string> } }></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wU4mo" prefix="r3101" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"888870046333313242"],"question":[0,"In what order does Next.js evaluate metadata across route segments?"],"answer":[0,"Metadata is evaluated in order, starting from the root segment down to the segment closest to the final page.js segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-order-does-next-js-evaluate-metadata-across-route-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-order-does-next-js-evaluate-metadata-across-route-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-order-does-next-js-evaluate-metadata-across-route-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what order does Next.js evaluate metadata across route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Metadata is evaluated in order, starting from the root segment down to the segment closest to the final page.js segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WwBSI" prefix="r3102" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1530763467930999378"],"question":[0,"Can you export both a metadata object and generateMetadata function from the same route segment?"],"answer":[0,"No. You cannot export both the metadata object and generateMetadata function from the same route segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-export-both-a-metadata-object-and-generatemetadata-function-from-the-sam"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-export-both-a-metadata-object-and-generatemetadata-function-from-the-sam" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-export-both-a-metadata-object-and-generatemetadata-function-from-the-sam" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you export both a metadata object and generateMetadata function from the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot export both the metadata object and generateMetadata function from the same route segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PoYAd" prefix="r3103" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1571119235639828727"],"question":[0,"What is the complete list of special file-based metadata files supported in Next.js?"],"answer":[0,"favicon.ico, icon (numbered variants supported), apple-icon (numbered variants supported), opengraph-image, twitter-image, manifest.json/webmanifest, robots.txt, and sitemap.xml"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-complete-list-of-special-file-based-metadata-files-supported-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-complete-list-of-special-file-based-metadata-files-supported-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-complete-list-of-special-file-based-metadata-files-supported-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the complete list of special file-based metadata files supported in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>favicon.ico, icon (numbered variants supported), apple-icon (numbered variants supported), opengraph-image, twitter-image, manifest.json/webmanifest, robots.txt, and sitemap.xml</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PhQpT" prefix="r3104" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2166792666265418014"],"question":[0,"How does Next.js handle file-based metadata priority within nested routes?"],"answer":[0,"The more specific image will take precedence over any OG images above it in the folder structure. More deeply nested files override parent directory files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-file-based-metadata-priority-within-nested-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-file-based-metadata-priority-within-nested-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-file-based-metadata-priority-within-nested-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle file-based metadata priority within nested routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The more specific image will take precedence over any OG images above it in the folder structure. More deeply nested files override parent directory files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1THi6E" prefix="r3105" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2501418387858992677"],"question":[0,"What are the required properties in the MetadataRoute.Robots object?"],"answer":[0,"rules (required) - can be a single rule object or array of rule objects. Within rules, userAgent is required for arrays. Optional top-level properties include sitemap, host. Optional rule properties include allow, disallow, crawlDelay."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-properties-in-the-metadataroute-robots-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-properties-in-the-metadataroute-robots-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-properties-in-the-metadataroute-robots-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required properties in the MetadataRoute.Robots object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>rules (required) - can be a single rule object or array of rule objects. Within rules, userAgent is required for arrays. Optional top-level properties include sitemap, host. Optional rule properties include allow, disallow, crawlDelay.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XhCNW" prefix="r3106" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2873189773994812554"],"question":[0,"Can both static and dynamic variants of the same metadata file exist together?"],"answer":[0,"The documentation does not explicitly state whether both can coexist. Each file convention can be defined using either a static file (e.g., opengraph-image.jpg) or a dynamic variant (e.g., opengraph-image.js), but coexistence is not documented."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"can-both-static-and-dynamic-variants-of-the-same-metadata-file-exist-together"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-both-static-and-dynamic-variants-of-the-same-metadata-file-exist-together" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-both-static-and-dynamic-variants-of-the-same-metadata-file-exist-together" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can both static and dynamic variants of the same metadata file exist together?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The documentation does not explicitly state whether both can coexist. Each file convention can be defined using either a static file (e.g., opengraph-image.jpg) or a dynamic variant (e.g., opengraph-image.js), but coexistence is not documented.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Ba4fv" prefix="r3107" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2900801584031429734"],"question":[0,"Where must robots.txt file be placed in Next.js?"],"answer":[0,"robots.txt must be placed in the root of the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-robots-txt-file-be-placed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-robots-txt-file-be-placed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-robots-txt-file-be-placed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must robots.txt file be placed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>robots.txt must be placed in the root of the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="H5luS" prefix="r3108" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3156201482341144304"],"question":[0,"What is the exact TypeScript function signature for generateMetadata?"],"answer":[0,"export async function generateMetadata({ params, searchParams }: Props, parent: ResolvingMetadata): Promise<Metadata> where Props contains params: Promise<{ id: string }> and searchParams: Promise<{ [key: string]: string | string[] | undefined }>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-typescript-function-signature-for-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-typescript-function-signature-for-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-typescript-function-signature-for-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact TypeScript function signature for generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export async function generateMetadata({ params, searchParams }: Props, parent: ResolvingMetadata): Promise<Metadata> where Props contains params: Promise<{ id: string }> and searchParams: Promise<{ [key: string]: string | string[] | undefined }>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hdMPl" prefix="r3109" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3645819598872773823"],"question":[0,"Are metadata object and generateMetadata function supported in Client Components?"],"answer":[0,"No. The metadata object and generateMetadata function exports are only supported in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-metadata-object-and-generatemetadata-function-supported-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-metadata-object-and-generatemetadata-function-supported-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-metadata-object-and-generatemetadata-function-supported-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are metadata object and generateMetadata function supported in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The metadata object and generateMetadata function exports are only supported in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19uJFx" prefix="r3110" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4188543854285715123"],"question":[0,"What type is the parent parameter in generateMetadata?"],"answer":[0,"ResolvingMetadata. It is a promise of the resolved metadata from parent route segments, so you must await it (e.g., const previousImages = (await parent).openGraph?.images || [])."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-parent-parameter-in-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-parent-parameter-in-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-parent-parameter-in-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the parent parameter in generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ResolvingMetadata. It is a promise of the resolved metadata from parent route segments, so you must await it (e.g., const previousImages = (await parent).openGraph?.images || []).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZbLjwi" prefix="r3111" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4198471836507970418"],"question":[0,"What file extensions are supported for manifest files?"],"answer":[0,"Static: .json, .webmanifest; Dynamic: .js, .ts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-manifest-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-manifest-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-manifest-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for manifest files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Static: .json, .webmanifest; Dynamic: .js, .ts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mnPtO" prefix="r3112" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4334893606182695274"],"question":[0,"What return type must a manifest function export?"],"answer":[0,"MetadataRoute.Manifest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-must-a-manifest-function-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-must-a-manifest-function-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-must-a-manifest-function-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type must a manifest function export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>MetadataRoute.Manifest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vaVG4" prefix="r3113" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4390259479066169382"],"question":[0,"What file extensions are supported for static icon files?"],"answer":[0,"icon: .ico, .jpg, .jpeg, .png, .svg; apple-icon: .jpg, .jpeg, .png; favicon: .ico only"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-static-icon-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-static-icon-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-static-icon-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for static icon files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>icon: .ico, .jpg, .jpeg, .png, .svg; apple-icon: .jpg, .jpeg, .png; favicon: .ico only</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vlvAe" prefix="r3114" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5128009691194587481"],"question":[0,"In Next.js 15+, what is the type of the params parameter in the default export function for opengraph-image.tsx?"],"answer":[0,"Promise<{ [key: string]: string }>. The params object is a promise that resolves to an object containing the dynamic route parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-what-is-the-type-of-the-params-parameter-in-the-default-export-fun"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-what-is-the-type-of-the-params-parameter-in-the-default-export-fun" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-what-is-the-type-of-the-params-parameter-in-the-default-export-fun" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15+, what is the type of the params parameter in the default export function for opengraph-image.tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string }>. The params object is a promise that resolves to an object containing the dynamic route parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="220mJF" prefix="r3115" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6870861345545452852"],"question":[0,"What is Google's URL limit per sitemap file?"],"answer":[0,"Google's limit is 50,000 URLs per sitemap."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-google-s-url-limit-per-sitemap-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-google-s-url-limit-per-sitemap-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-google-s-url-limit-per-sitemap-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is Google's URL limit per sitemap file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Google's limit is 50,000 URLs per sitemap.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtadPF" prefix="r3116" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7325741788082375551"],"question":[0,"Is searchParams available in both layout.js and page.js for generateMetadata?"],"answer":[0,"No. searchParams is only available in page.js, not in layout files. This is because shared layouts are not re-rendered during navigation which could lead to stale searchParams."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"is-searchparams-available-in-both-layout-js-and-page-js-for-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-searchparams-available-in-both-layout-js-and-page-js-for-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-searchparams-available-in-both-layout-js-and-page-js-for-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is searchParams available in both layout.js and page.js for generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. searchParams is only available in page.js, not in layout files. This is because shared layouts are not re-rendered during navigation which could lead to stale searchParams.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="167273" prefix="r3117" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8413601787891796445"],"question":[0,"Where must manifest files be placed in Next.js?"],"answer":[0,"Manifest files must be placed in the root of the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-manifest-files-be-placed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-manifest-files-be-placed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-manifest-files-be-placed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must manifest files be placed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Manifest files must be placed in the root of the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1FtjRd" prefix="r3118" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9119935648225212896"],"question":[0,"Does title.template apply to the segment where it's defined or to child segments?"],"answer":[0,"title.template applies to child route segments and not the segment it's defined in. title.template defined in page.js has no effect because a page is always the terminating segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"does-title-template-apply-to-the-segment-where-it-s-defined-or-to-child-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-title-template-apply-to-the-segment-where-it-s-defined-or-to-child-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-title-template-apply-to-the-segment-where-it-s-defined-or-to-child-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does title.template apply to the segment where it's defined or to child segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>title.template applies to child route segments and not the segment it's defined in. title.template defined in page.js has no effect because a page is always the terminating segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20o1ag" prefix="r3119" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9705091734678463204"],"question":[0,"Are special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx cached by default?"],"answer":[0,"Yes. Special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx, and other metadata files are cached by default unless they use Dynamic APIs or dynamic config options."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-special-route-handlers-like-sitemap-ts-opengraph-image-tsx-and-icon-tsx-cach"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-special-route-handlers-like-sitemap-ts-opengraph-image-tsx-and-icon-tsx-cach" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-special-route-handlers-like-sitemap-ts-opengraph-image-tsx-and-icon-tsx-cach" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx cached by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx, and other metadata files are cached by default unless they use Dynamic APIs or dynamic config options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2clcdL" prefix="r3120" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10269541599284214254"],"question":[0,"What return type must the default export function use for opengraph-image.tsx?"],"answer":[0,"Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-must-the-default-export-function-use-for-opengraph-image-tsx"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-must-the-default-export-function-use-for-opengraph-image-tsx" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-must-the-default-export-function-use-for-opengraph-image-tsx" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type must the default export function use for opengraph-image.tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JhamT" prefix="r3121" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10770498295129462644"],"question":[0,"Which files can export config-based metadata (metadata object or generateMetadata function)?"],"answer":[0,"Only layout.js and page.js files can export config-based metadata. Template.js and other file types cannot export metadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"which-files-can-export-config-based-metadata-metadata-object-or-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-files-can-export-config-based-metadata-metadata-object-or-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-files-can-export-config-based-metadata-metadata-object-or-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which files can export config-based metadata (metadata object or generateMetadata function)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only layout.js and page.js files can export config-based metadata. Template.js and other file types cannot export metadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IEXSu" prefix="r3122" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11409181668418481659"],"question":[0,"Are fetch requests in generateMetadata automatically memoized?"],"answer":[0,"Yes. fetch requests inside generateMetadata are automatically memoized for the same data across generateMetadata, generateStaticParams, Layouts, Pages, and Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-fetch-requests-in-generatemetadata-automatically-memoized"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-fetch-requests-in-generatemetadata-automatically-memoized" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-fetch-requests-in-generatemetadata-automatically-memoized" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are fetch requests in generateMetadata automatically memoized?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. fetch requests inside generateMetadata are automatically memoized for the same data across generateMetadata, generateStaticParams, Layouts, Pages, and Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="uLMuL" prefix="r3123" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11501712680494554870"],"question":[0,"What happens to metadata when a child segment doesn't define a nested field like openGraph?"],"answer":[0,"All fields from the parent are inherited. For example, all openGraph fields from app/layout.js are inherited in app/about/page.js if app/about/page.js doesn't set openGraph metadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-metadata-when-a-child-segment-doesn-t-define-a-nested-field-like"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-metadata-when-a-child-segment-doesn-t-define-a-nested-field-like" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-metadata-when-a-child-segment-doesn-t-define-a-nested-field-like" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to metadata when a child segment doesn't define a nested field like openGraph?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All fields from the parent are inherited. For example, all openGraph fields from app/layout.js are inherited in app/about/page.js if app/about/page.js doesn't set openGraph metadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QqaMA" prefix="r3124" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13150217668506771257"],"question":[0,"Can sitemap files be nested in multiple route segments?"],"answer":[0,"Yes. You can nest sitemap.(xml|js|ts) inside multiple route segments (e.g., app/sitemap.xml and app/products/sitemap.xml)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"can-sitemap-files-be-nested-in-multiple-route-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-sitemap-files-be-nested-in-multiple-route-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-sitemap-files-be-nested-in-multiple-route-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can sitemap files be nested in multiple route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can nest sitemap.(xml|js|ts) inside multiple route segments (e.g., app/sitemap.xml and app/products/sitemap.xml).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2c2gxC" prefix="r3125" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13347576701106977729"],"question":[0,"What return type must a robots.js function export?"],"answer":[0,"MetadataRoute.Robots"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-must-a-robots-js-function-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-must-a-robots-js-function-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-must-a-robots-js-function-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type must a robots.js function export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>MetadataRoute.Robots</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZLKDyv" prefix="r3126" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13935835626418143867"],"question":[0,"Can metadataBase contain a subdomain or base path?"],"answer":[0,"Yes. metadataBase can contain a subdomain (e.g., https://app.acme.com) or base path (e.g., https://acme.com/start/from/here)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-metadatabase-contain-a-subdomain-or-base-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-metadatabase-contain-a-subdomain-or-base-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-metadatabase-contain-a-subdomain-or-base-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can metadataBase contain a subdomain or base path?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. metadataBase can contain a subdomain (e.g., <a href="https://app.acme.com">https://app.acme.com</a>) or base path (e.g., <a href="https://acme.com/start/from/here">https://acme.com/start/from/here</a>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHnzct" prefix="r3127" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14041848250795318515"],"question":[0,"What file extensions are supported for static opengraph-image files?"],"answer":[0,".jpg, .jpeg, .png, and .gif"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-static-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-static-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-static-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for static opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.jpg, .jpeg, .png, and .gif</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZXzdu6" prefix="r3128" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14460807652519590704"],"question":[0,"Can generateMetadata be a synchronous function or must it be async?"],"answer":[0,"It can be either. generateMetadata can be synchronous (returning Metadata) or asynchronous (returning Promise<Metadata>)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-generatemetadata-be-a-synchronous-function-or-must-it-be-async"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-generatemetadata-be-a-synchronous-function-or-must-it-be-async" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-generatemetadata-be-a-synchronous-function-or-must-it-be-async" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can generateMetadata be a synchronous function or must it be async?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It can be either. generateMetadata can be synchronous (returning Metadata) or asynchronous (returning Promise<Metadata>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSY0U2" prefix="r3129" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14990323299911490867"],"question":[0,"What file extensions are supported for dynamic code-generated opengraph-image files?"],"answer":[0,".js, .ts, and .tsx"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-dynamic-code-generated-opengraph-image-fi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-dynamic-code-generated-opengraph-image-fi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-dynamic-code-generated-opengraph-image-fi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for dynamic code-generated opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.js, .ts, and .tsx</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zo0AIK" prefix="r3130" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15049258254105950588"],"question":[0,"What happens when a child segment defines a nested metadata field like openGraph that was also defined in the parent?"],"answer":[0,"All fields from the parent for that nested object are replaced (overwritten), not merged. For example, all openGraph fields from app/layout.js are replaced in app/blog/page.js if app/blog/page.js sets any openGraph metadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-child-segment-defines-a-nested-metadata-field-like-opengraph"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-child-segment-defines-a-nested-metadata-field-like-opengraph" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-child-segment-defines-a-nested-metadata-field-like-opengraph" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a child segment defines a nested metadata field like openGraph that was also defined in the parent?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All fields from the parent for that nested object are replaced (overwritten), not merged. For example, all openGraph fields from app/layout.js are replaced in app/blog/page.js if app/blog/page.js sets any openGraph metadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="rendering-strategies-rendering-timing-strategies" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Rendering Strategies > Rendering Timing Strategies</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 33 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZGVOQY" prefix="r3131" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"434754367978968510"],"question":[0,"When dynamic APIs like cookies() or headers() are used, at what time are routes rendered?"],"answer":[0,"Routes are rendered at request time (dynamic rendering)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"when-dynamic-apis-like-cookies-or-headers-are-used-at-what-time-are-routes-rende"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-dynamic-apis-like-cookies-or-headers-are-used-at-what-time-are-routes-rende" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-dynamic-apis-like-cookies-or-headers-are-used-at-what-time-are-routes-rende" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When dynamic APIs like cookies() or headers() are used, at what time are routes rendered?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Routes are rendered at request time (dynamic rendering).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRjBtR" prefix="r3132" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"436064286244389153"],"question":[0,"What happens when you call revalidateTag with profile='max' (recommended)?"],"answer":[0,"The tag entry is marked as stale, and uses stale-while-revalidate semantics - serving stale content immediately while fetching fresh data in the background on the next visit."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-call-revalidatetag-with-profile-max-recommended"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-call-revalidatetag-with-profile-max-recommended" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-call-revalidatetag-with-profile-max-recommended" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you call revalidateTag with profile='max' (recommended)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The tag entry is marked as stale, and uses stale-while-revalidate semantics - serving stale content immediately while fetching fresh data in the background on the next visit.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24qI81" prefix="r3133" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"867911993531560991"],"question":[0,"What value does revalidate: false set for cache lifetime?"],"answer":[0,"It caches the resource indefinitely, semantically equivalent to revalidate: Infinity."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-revalidate-false-set-for-cache-lifetime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-revalidate-false-set-for-cache-lifetime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-revalidate-false-set-for-cache-lifetime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does revalidate: false set for cache lifetime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It caches the resource indefinitely, semantically equivalent to revalidate: Infinity.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2d4uWt" prefix="r3134" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1416083598792821689"],"question":[0,"What happens to GET Route Handlers in Next.js 15 by default?"],"answer":[0,"GET functions are not cached by default (changed from Next.js 14 where they were cached)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-get-route-handlers-in-next-js-15-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-get-route-handlers-in-next-js-15-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-get-route-handlers-in-next-js-15-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to GET Route Handlers in Next.js 15 by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>GET functions are not cached by default (changed from Next.js 14 where they were cached).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nO8hx" prefix="r3135" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2379566826112845770"],"question":[0,"What is required for Cache Components when using dynamic routes with generateStaticParams?"],"answer":[0,"generateStaticParams must return at least one param - empty arrays cause build errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-for-cache-components-when-using-dynamic-routes-with-generatesta"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-for-cache-components-when-using-dynamic-routes-with-generatesta" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-for-cache-components-when-using-dynamic-routes-with-generatesta" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required for Cache Components when using dynamic routes with generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateStaticParams must return at least one param - empty arrays cause build errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RDWJj" prefix="r3136" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2580479932521643206"],"question":[0,"What is the default value for the 'revalidate' route segment config option?"],"answer":[0,"false - which caches any fetch requests that set their cache option to 'force-cache' indefinitely."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'revalidate' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - which caches any fetch requests that set their cache option to 'force-cache' indefinitely.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IRcSk" prefix="r3137" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2999911766528642542"],"question":[0,"Is generateStaticParams called again during revalidation (ISR)?"],"answer":[0,"No, generateStaticParams will not be called again during revalidation (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"is-generatestaticparams-called-again-during-revalidation-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-generatestaticparams-called-again-during-revalidation-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-generatestaticparams-called-again-during-revalidation-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is generateStaticParams called again during revalidation (ISR)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, generateStaticParams will not be called again during revalidation (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Xy5Yy" prefix="r3138" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3100025623817918178"],"question":[0,"What is the maximum number of tag items allowed for next.tags in a fetch request?"],"answer":[0,"128 tag items maximum."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-tag-items-allowed-for-next-tags-in-a-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-tag-items-allowed-for-next-tags-in-a-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-tag-items-allowed-for-next-tags-in-a-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of tag items allowed for next.tags in a fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>128 tag items maximum.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27VxOL" prefix="r3139" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3347634100992822787"],"question":[0,"What does export const dynamic = 'force-dynamic' do to fetch requests?"],"answer":[0,"It's equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-force-dynamic-do-to-fetch-requests"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-force-dynamic-do-to-fetch-requests" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-force-dynamic-do-to-fetch-requests" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const dynamic = 'force-dynamic' do to fetch requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It's equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ak9vd" prefix="r3140" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3654280403609051765"],"question":[0,"What is the maximum character length for a revalidateTag tag parameter?"],"answer":[0,"256 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-revalidatetag-tag-parameter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-revalidatetag-tag-parameter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-revalidatetag-tag-parameter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a revalidateTag tag parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>256 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7bso3" prefix="r3141" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4348460960184764135"],"question":[0,"Does revalidatePath return a value?"],"answer":[0,"No, revalidatePath does not return a value - the function is void."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"does-revalidatepath-return-a-value"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-revalidatepath-return-a-value" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-revalidatepath-return-a-value" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does revalidatePath return a value?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, revalidatePath does not return a value - the function is void.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8CDNb" prefix="r3142" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4602186072767690970"],"question":[0,"What are the valid values for the 'type' parameter in revalidatePath?"],"answer":[0,"'page' or 'layout'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-type-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-type-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-type-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'type' parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'page' or 'layout'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qdQlz" prefix="r3143" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5076985209284753497"],"question":[0,"What is the default cache behavior for fetch in development mode with cache: 'auto'?"],"answer":[0,"It fetches on every request in development."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-behavior-for-fetch-in-development-mode-with-cache-auto"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-behavior-for-fetch-in-development-mode-with-cache-auto" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-behavior-for-fetch-in-development-mode-with-cache-auto" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default cache behavior for fetch in development mode with cache: 'auto'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It fetches on every request in development.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mX9e2" prefix="r3144" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5140027324875911269"],"question":[0,"What is the default value for the 'dynamic' route segment config option?"],"answer":[0,"'auto' - Next.js automatically determines dynamic behavior based on code analysis."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'dynamic' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' - Next.js automatically determines dynamic behavior based on code analysis.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1L8t61" prefix="r3145" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6225679583964853476"],"question":[0,"When you call revalidatePath in a Route Handler, when does revalidation occur?"],"answer":[0,"It marks the path for revalidation, which happens on the next visit to the specified path (not immediately)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"when-you-call-revalidatepath-in-a-route-handler-when-does-revalidation-occur"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-you-call-revalidatepath-in-a-route-handler-when-does-revalidation-occur" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-you-call-revalidatepath-in-a-route-handler-when-does-revalidation-occur" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When you call revalidatePath in a Route Handler, when does revalidation occur?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It marks the path for revalidation, which happens on the next visit to the specified path (not immediately).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YRYQi" prefix="r3146" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6470674741451332531"],"question":[0,"How do you enable Partial Prerendering (PPR) incrementally in Next.js 15?"],"answer":[0,"Set ppr option to 'incremental' in next.config.js and export const experimental_ppr route config option at the top of the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-partial-prerendering-ppr-incrementally-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-partial-prerendering-ppr-incrementally-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-partial-prerendering-ppr-incrementally-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable Partial Prerendering (PPR) incrementally in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set ppr option to 'incremental' in next.config.js and export const experimental_ppr route config option at the top of the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2f2dBO" prefix="r3147" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7048792341000492249"],"question":[0,"What happens when dynamicParams is set to false?"],"answer":[0,"Ungenerated dynamic segments return a 404 error instead of being generated on demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-set-to-false"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-set-to-false" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-set-to-false" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is set to false?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Ungenerated dynamic segments return a 404 error instead of being generated on demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3GQ7m" prefix="r3148" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7592051021399250445"],"question":[0,"What is the maximum character length for a revalidatePath path parameter?"],"answer":[0,"1024 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-revalidatepath-path-parameter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-revalidatepath-path-parameter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-revalidatepath-path-parameter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a revalidatePath path parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KP26b" prefix="r3149" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9261432707144262179"],"question":[0,"What does the HMR cache apply to during development?"],"answer":[0,"All fetch requests, including those with default auto no cache and cache: 'no-store' option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-hmr-cache-apply-to-during-development"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-hmr-cache-apply-to-during-development" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-hmr-cache-apply-to-during-development" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the HMR cache apply to during development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All fetch requests, including those with default auto no cache and cache: 'no-store' option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2t9KPa" prefix="r3150" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9755694038976467817"],"question":[0,"Which route segment determines the revalidation frequency when multiple layouts and pages have different revalidate values?"],"answer":[0,"The lowest revalidate value across each layout and page of a single route determines the revalidation frequency."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"which-route-segment-determines-the-revalidation-frequency-when-multiple-layouts-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-route-segment-determines-the-revalidation-frequency-when-multiple-layouts-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-route-segment-determines-the-revalidation-frequency-when-multiple-layouts-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which route segment determines the revalidation frequency when multiple layouts and pages have different revalidate values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate value across each layout and page of a single route determines the revalidation frequency.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IbM3H" prefix="r3151" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9905230816171485865"],"question":[0,"Which runtime is required for ISR (Incremental Static Regeneration) support?"],"answer":[0,"ISR is only supported when using the Node.js runtime (default). The Edge runtime does not support ISR."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"which-runtime-is-required-for-isr-incremental-static-regeneration-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-runtime-is-required-for-isr-incremental-static-regeneration-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-runtime-is-required-for-isr-incremental-static-regeneration-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which runtime is required for ISR (Incremental Static Regeneration) support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ISR is only supported when using the Node.js runtime (default). The Edge runtime does not support ISR.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6VgDN" prefix="r3152" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10195866352624444971"],"question":[0,"What is the default value for the 'dynamicParams' option?"],"answer":[0,"true - dynamic segments not included in generateStaticParams are generated on demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-dynamicparams-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-dynamicparams-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-dynamicparams-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'dynamicParams' option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true - dynamic segments not included in generateStaticParams are generated on demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gKbJn" prefix="r3153" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10568067630582780470"],"question":[0,"When does generateStaticParams execute during next build?"],"answer":[0,"It runs before the corresponding Layouts or Pages are generated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-execute-during-next-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-execute-during-next-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-execute-during-next-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams execute during next build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It runs before the corresponding Layouts or Pages are generated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pDqo9" prefix="r3154" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10613850364674603840"],"question":[0,"Can you use export const dynamic = 'force-dynamic' with output: 'export' for static exports?"],"answer":[0,"No, static exports require all content to be pre-rendered, so force-dynamic cannot be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-export-const-dynamic-force-dynamic-with-output-export-for-static-exp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-export-const-dynamic-force-dynamic-with-output-export-for-static-exp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-export-const-dynamic-force-dynamic-with-output-export-for-static-exp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use export const dynamic = 'force-dynamic' with output: 'export' for static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, static exports require all content to be pre-rendered, so force-dynamic cannot be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wEsw0" prefix="r3155" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11277283224715035379"],"question":[0,"What is the default staleTime for Page segments in the Client Router Cache in Next.js 15?"],"answer":[0,"0 seconds - the client will always reflect the latest data from the Page component(s)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-page-segments-in-the-client-router-cache-in-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-page-segments-in-the-client-router-cache-in-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-page-segments-in-the-client-router-cache-in-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for Page segments in the Client Router Cache in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 seconds - the client will always reflect the latest data from the Page component(s).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PuwRv" prefix="r3156" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11832730070959339122"],"question":[0,"When you have multiple fetch requests with different revalidate frequencies in a single route, which revalidate time is used for ISR?"],"answer":[0,"The lowest time is used for ISR across the entire route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"when-you-have-multiple-fetch-requests-with-different-revalidate-frequencies-in-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-you-have-multiple-fetch-requests-with-different-revalidate-frequencies-in-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-you-have-multiple-fetch-requests-with-different-revalidate-frequencies-in-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When you have multiple fetch requests with different revalidate frequencies in a single route, which revalidate time is used for ISR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest time is used for ISR across the entire route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jShS9" prefix="r3157" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12390768652181941738"],"question":[0,"What happens when you set revalidate to 0?"],"answer":[0,"It ensures dynamic rendering even without Dynamic APIs and changes the default fetch behavior to 'no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-set-revalidate-to-0"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-set-revalidate-to-0" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-set-revalidate-to-0" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you set revalidate to 0?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures dynamic rendering even without Dynamic APIs and changes the default fetch behavior to 'no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="B08Hj" prefix="r3158" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12844141731766389344"],"question":[0,"What was the default staleTime for dynamic routes in the Client Router Cache in Next.js 14.2.0?"],"answer":[0,"30 seconds (a non-zero value)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-default-staletime-for-dynamic-routes-in-the-client-router-cache-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-default-staletime-for-dynamic-routes-in-the-client-router-cache-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-default-staletime-for-dynamic-routes-in-the-client-router-cache-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the default staleTime for dynamic routes in the Client Router Cache in Next.js 14.2.0?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds (a non-zero value).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Qk7y2" prefix="r3159" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13199671417625839795"],"question":[0,"What is the default value for the 'fetchCache' route segment config option?"],"answer":[0,"'auto' - caches fetch requests before Dynamic APIs are used, doesn't cache after."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-fetchcache-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-fetchcache-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-fetchcache-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'fetchCache' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' - caches fetch requests before Dynamic APIs are used, doesn't cache after.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpNXUp" prefix="r3160" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13486176697433603375"],"question":[0,"What does export const dynamic = 'force-static' do to cookies(), headers(), and useSearchParams()?"],"answer":[0,"It forces static rendering and makes these functions return empty values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-export-const-dynamic-force-static-do-to-cookies-headers-and-usesearchp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-export-const-dynamic-force-static-do-to-cookies-headers-and-usesearchp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-export-const-dynamic-force-static-do-to-cookies-headers-and-usesearchp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does export const dynamic = 'force-static' do to cookies(), headers(), and useSearchParams()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and makes these functions return empty values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Hfekt" prefix="r3161" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13554140684077978793"],"question":[0,"Can you combine fetchCache 'only-cache' and 'only-no-store' in a single route?"],"answer":[0,"No, this combination is not allowed and will cause an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-combine-fetchcache-only-cache-and-only-no-store-in-a-single-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-combine-fetchcache-only-cache-and-only-no-store-in-a-single-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-combine-fetchcache-only-cache-and-only-no-store-in-a-single-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you combine fetchCache 'only-cache' and 'only-no-store' in a single route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, this combination is not allowed and will cause an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YfeSQ" prefix="r3162" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14428504369674861068"],"question":[0,"When does generateStaticParams execute during next dev?"],"answer":[0,"It is called when you navigate to a route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-execute-during-next-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-execute-during-next-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-execute-during-next-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams execute during next dev?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is called when you navigate to a route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23fsrs" prefix="r3163" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14869533392973453240"],"question":[0,"What are all the valid values for the 'dynamic' export option?"],"answer":[0,"'auto' (default), 'force-dynamic', 'error', and 'force-static'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-valid-values-for-the-dynamic-export-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-valid-values-for-the-dynamic-export-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-valid-values-for-the-dynamic-export-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the valid values for the 'dynamic' export option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' (default), 'force-dynamic', 'error', and 'force-static'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="edge-runtime-security-execution-restrictions" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Edge Runtime > Security & Execution Restrictions</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1U3akB" prefix="r3164" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6366399481700127"],"question":[0,"What is the Edge Function bundle size limit on Vercel's Enterprise plan?"],"answer":[0,"The Edge Function bundle size limit on Vercel's Enterprise plan is 4 MB (after gzip compression)."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/limitations"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-edge-function-bundle-size-limit-on-vercel-s-enterprise-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-edge-function-bundle-size-limit-on-vercel-s-enterprise-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-edge-function-bundle-size-limit-on-vercel-s-enterprise-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Edge Function bundle size limit on Vercel's Enterprise plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Function bundle size limit on Vercel's Enterprise plan is 4 MB (after gzip compression).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/limitations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16uv96" prefix="r3165" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"691145841523462290"],"question":[0,"What JavaScript standard objects and APIs are supported in Next.js Edge Runtime?"],"answer":[0,"Edge Runtime supports standard JavaScript APIs including: Array, ArrayBuffer, Atomics, BigInt, BigInt64Array, BigUint64Array, Boolean, DataView, Date, decodeURI, decodeURIComponent, DOMException, encodeURI, encodeURIComponent, Error, EvalError, Float32Array, Float64Array, Function, Infinity, Int8Array, Int16Array, Int32Array, Intl, isFinite, isNaN, JSON, Map, Math, Number, Object, parseFloat, parseInt, Promise, Proxy, queueMicrotask, RangeError, ReferenceError, Reflect, RegExp, Set, SharedArrayBuffer, String, structuredClone, Symbol, SyntaxError, TypeError, Uint8Array, Uint8ClampedArray, Uint32Array, URIError, URLPattern, WeakMap, WeakSet, and WebAssembly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-javascript-standard-objects-and-apis-are-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-javascript-standard-objects-and-apis-are-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-javascript-standard-objects-and-apis-are-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What JavaScript standard objects and APIs are supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Runtime supports standard JavaScript APIs including: Array, ArrayBuffer, Atomics, BigInt, BigInt64Array, BigUint64Array, Boolean, DataView, Date, decodeURI, decodeURIComponent, DOMException, encodeURI, encodeURIComponent, Error, EvalError, Float32Array, Float64Array, Function, Infinity, Int8Array, Int16Array, Int32Array, Intl, isFinite, isNaN, JSON, Map, Math, Number, Object, parseFloat, parseInt, Promise, Proxy, queueMicrotask, RangeError, ReferenceError, Reflect, RegExp, Set, SharedArrayBuffer, String, structuredClone, Symbol, SyntaxError, TypeError, Uint8Array, Uint8ClampedArray, Uint32Array, URIError, URLPattern, WeakMap, WeakSet, and WebAssembly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ICERD" prefix="r3166" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1846894174726060407"],"question":[0,"Are __dirname and __filename available in Next.js Edge Runtime?"],"answer":[0,"No, __dirname and __filename are Node.js-specific variables that are not available in Edge Runtime since it doesn't support native Node.js APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-dirname-and-filename-available-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-dirname-and-filename-available-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-dirname-and-filename-available-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are __dirname and __filename available in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, __dirname and __filename are Node.js-specific variables that are not available in Edge Runtime since it doesn't support native Node.js APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28NRHQ" prefix="r3167" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2055642791936695023"],"question":[0,"Is setTimeout supported in Next.js Edge Runtime?"],"answer":[0,"Yes, setTimeout is supported in Edge Runtime to schedule a function to execute after a given amount of time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-settimeout-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-settimeout-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-settimeout-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is setTimeout supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, setTimeout is supported in Edge Runtime to schedule a function to execute after a given amount of time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26mDLY" prefix="r3168" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2114496571446360913"],"question":[0,"Can you use `require()` in Next.js Edge Runtime?"],"answer":[0,"No, calling require directly is not allowed in Edge Runtime. You must use ES Modules instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `require()` in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, calling require directly is not allowed in Edge Runtime. You must use ES Modules instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Bap9p" prefix="r3169" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2524225316456175728"],"question":[0,"What environment variable prefix restriction applies when deploying to Vercel Edge Runtime?"],"answer":[0,"When deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their names are prefixed with NEXT_PUBLIC_. It's recommended to manage environment variables in Vercel Project Settings instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-prefix-restriction-applies-when-deploying-to-vercel-ed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-prefix-restriction-applies-when-deploying-to-vercel-ed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-prefix-restriction-applies-when-deploying-to-vercel-ed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable prefix restriction applies when deploying to Vercel Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their names are prefixed with NEXT_PUBLIC_. It's recommended to manage environment variables in Vercel Project Settings instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NDYwk" prefix="r3170" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2873076355269379347"],"question":[0,"What is the Edge Function bundle size limit on Vercel's Hobby plan?"],"answer":[0,"The Edge Function bundle size limit on Vercel's Hobby plan is 1 MB (after gzip compression)."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/limitations"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-edge-function-bundle-size-limit-on-vercel-s-hobby-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-edge-function-bundle-size-limit-on-vercel-s-hobby-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-edge-function-bundle-size-limit-on-vercel-s-hobby-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Edge Function bundle size limit on Vercel's Hobby plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Function bundle size limit on Vercel's Hobby plan is 1 MB (after gzip compression).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/limitations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="stxNw" prefix="r3171" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2989131131687580189"],"question":[0,"What security best practice should you follow when using AsyncLocalStorage in Edge Runtime?"],"answer":[0,"Always initialize and dispose of the context within the lifecycle of a single request, as sharing a context across requests can lead to unexpected behavior, data leakage, or security vulnerabilities."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.dash0.com/guides/contextual-logging-in-nodejs"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-best-practice-should-you-follow-when-using-asynclocalstorage-in-ed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-best-practice-should-you-follow-when-using-asynclocalstorage-in-ed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-best-practice-should-you-follow-when-using-asynclocalstorage-in-ed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security best practice should you follow when using AsyncLocalStorage in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Always initialize and dispose of the context within the lifecycle of a single request, as sharing a context across requests can lead to unexpected behavior, data leakage, or security vulnerabilities.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.dash0.com/guides/contextual-logging-in-nodejs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dash0.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eaj5K" prefix="r3172" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3220522262380678609"],"question":[0,"Does the next.config logging option work in Edge Runtime?"],"answer":[0,"No, the next.config logging option does not log in Edge Runtime when using export const runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/67835"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-next-config-logging-option-work-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-next-config-logging-option-work-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-next-config-logging-option-work-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the next.config logging option work in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the next.config logging option does not log in Edge Runtime when using export const runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/67835" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IkVgP" prefix="r3173" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3845748747590110624"],"question":[0,"Is process.cwd() supported in Next.js Edge Runtime?"],"answer":[0,"No, process.cwd() is not supported in Edge Runtime. Using it will cause an error: 'A Node.js API is used (process.cwd) which is not supported in the Edge Runtime.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/50565"]]],"topic":[0,"nextjs"],"slug":[0,"is-process-cwd-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-process-cwd-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-process-cwd-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is process.cwd() supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, process.cwd() is not supported in Edge Runtime. Using it will cause an error: 'A Node.js API is used (process.cwd) which is not supported in the Edge Runtime.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/50565" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vIcTF" prefix="r3174" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4498581096619211660"],"question":[0,"Is `new Function()` allowed in Next.js Edge Runtime?"],"answer":[0,"No, new Function(evalString) is not allowed in Edge Runtime as it enables dynamic code evaluation, which is prohibited."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-new-function-allowed-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-new-function-allowed-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-new-function-allowed-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is `new Function()` allowed in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, new Function(evalString) is not allowed in Edge Runtime as it enables dynamic code evaluation, which is prohibited.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqUH7J" prefix="r3175" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4801572520454801834"],"question":[0,"Are native Node.js APIs supported in Next.js Edge Runtime?"],"answer":[0,"No, native Node.js APIs are not supported in the Edge Runtime. This means you cannot read or write to the filesystem, and modules like fs, path, and the Node.js-specific crypto module are unavailable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-native-node-js-apis-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-native-node-js-apis-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-native-node-js-apis-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are native Node.js APIs supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, native Node.js APIs are not supported in the Edge Runtime. This means you cannot read or write to the filesystem, and modules like fs, path, and the Node.js-specific crypto module are unavailable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hC0uw" prefix="r3176" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5383899353965548694"],"question":[0,"How do you configure a route or API handler to use Edge Runtime in Next.js App Router?"],"answer":[0,"Use the route segment config: `export const runtime = 'edge'` in your route.ts, page.tsx, or layout.tsx file. The default runtime is Node.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/48742"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-route-or-api-handler-to-use-edge-runtime-in-next-js-app-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-route-or-api-handler-to-use-edge-runtime-in-next-js-app-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-route-or-api-handler-to-use-edge-runtime-in-next-js-app-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a route or API handler to use Edge Runtime in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the route segment config: <code>export const runtime = 'edge'</code> in your route.ts, page.tsx, or layout.tsx file. The default runtime is Node.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/48742" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="uQI5d" prefix="r3177" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5477466558791535050"],"question":[0,"Are Node.js streams (like fs.createReadStream) supported in Next.js Edge Runtime?"],"answer":[0,"No, Node.js-specific stream implementations like fs.createReadStream() are not supported in Edge Runtime. You must use the web platform's ReadableStream API instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-node-js-streams-like-fs-createreadstream-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-node-js-streams-like-fs-createreadstream-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-node-js-streams-like-fs-createreadstream-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Node.js streams (like fs.createReadStream) supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Node.js-specific stream implementations like fs.createReadStream() are not supported in Edge Runtime. You must use the web platform's ReadableStream API instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="19dE8y" prefix="r3178" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5725390704544460224"],"question":[0,"What Crypto APIs does Next.js Edge Runtime support?"],"answer":[0,"Next.js Edge Runtime supports: crypto, crypto.randomUUID, crypto.getRandomValues, crypto.subtle (SubtleCrypto interface for low-level cryptographic operations), and CryptoKey."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-crypto-apis-does-next-js-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-crypto-apis-does-next-js-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-crypto-apis-does-next-js-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Crypto APIs does Next.js Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js Edge Runtime supports: crypto, crypto.randomUUID, crypto.getRandomValues, crypto.subtle (SubtleCrypto interface for low-level cryptographic operations), and CryptoKey.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oK9BX" prefix="r3179" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8098192868980730738"],"question":[0,"What is the maximum execution duration for streaming Edge Functions on Vercel starting March 2025?"],"answer":[0,"Starting March 1st, 2025, Edge Functions will consistently allow streaming responses for up to 300 seconds (5 minutes), including post-response tasks like waitUntil()."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/changelog/new-execution-duration-limit-for-edge-functions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-execution-duration-for-streaming-edge-functions-on-vercel-st"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-execution-duration-for-streaming-edge-functions-on-vercel-st" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-execution-duration-for-streaming-edge-functions-on-vercel-st" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum execution duration for streaming Edge Functions on Vercel starting March 2025?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting March 1st, 2025, Edge Functions will consistently allow streaming responses for up to 300 seconds (5 minutes), including post-response tasks like waitUntil().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/changelog/new-execution-duration-limit-for-edge-functions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ig2he" prefix="r3180" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8309873691470401004"],"question":[0,"What Stream APIs does Next.js Edge Runtime support?"],"answer":[0,"Next.js Edge Runtime supports: ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, and WritableStreamDefaultWriter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-stream-apis-does-next-js-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-stream-apis-does-next-js-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-stream-apis-does-next-js-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Stream APIs does Next.js Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js Edge Runtime supports: ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, and WritableStreamDefaultWriter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2knKUE" prefix="r3181" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8331298339261647852"],"question":[0,"What is the timeout limit for Edge Functions on Vercel to begin sending a response?"],"answer":[0,"Edge Functions must begin sending a response within 25 seconds to maintain streaming capabilities beyond this period."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-timeout-limit-for-edge-functions-on-vercel-to-begin-sending-a-respon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-timeout-limit-for-edge-functions-on-vercel-to-begin-sending-a-respon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-timeout-limit-for-edge-functions-on-vercel-to-begin-sending-a-respon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the timeout limit for Edge Functions on Vercel to begin sending a response?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Functions must begin sending a response within 25 seconds to maintain streaming capabilities beyond this period.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PSpuW" prefix="r3182" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9178617256432880609"],"question":[0,"Are WebAssembly.compile() and WebAssembly.instantiate() supported in Next.js Edge Runtime?"],"answer":[0,"No, WebAssembly.compile() and WebAssembly.instantiate() (when used with raw buffers) are not supported. You must use pre-compiled WASM modules instead, using syntax like `import squareWasm from './square.wasm?module'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-dynamic-wasm-compilation"]]],"topic":[0,"nextjs"],"slug":[0,"are-webassembly-compile-and-webassembly-instantiate-supported-in-next-js-edge-ru"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-webassembly-compile-and-webassembly-instantiate-supported-in-next-js-edge-ru" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-webassembly-compile-and-webassembly-instantiate-supported-in-next-js-edge-ru" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are WebAssembly.compile() and WebAssembly.instantiate() supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, WebAssembly.compile() and WebAssembly.instantiate() (when used with raw buffers) are not supported. You must use pre-compiled WASM modules instead, using syntax like <code>import squareWasm from './square.wasm?module'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-dynamic-wasm-compilation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Xi3K4" prefix="r3183" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9621663821865368081"],"question":[0,"Is console.log supported in Next.js Edge Runtime?"],"answer":[0,"Yes, console (including console.log, console.error, and console.table) is supported in Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-console-log-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-console-log-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-console-log-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is console.log supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, console (including console.log, console.error, and console.table) is supported in Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="biFPu" prefix="r3184" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10933423379651361698"],"question":[0,"Can you use process.env in Next.js Edge Runtime?"],"answer":[0,"Yes, you can use process.env to access environment variables for both next dev and next build in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-process-env-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-process-env-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-process-env-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use process.env in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can use process.env to access environment variables for both next dev and next build in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ctxAY" prefix="r3185" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11397031413729166293"],"question":[0,"Can you use npm packages from node_modules in Next.js Edge Runtime?"],"answer":[0,"Yes, node_modules can be used, as long as they implement ES Modules and do not use native Node.js APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-npm-packages-from-node-modules-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-npm-packages-from-node-modules-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-npm-packages-from-node-modules-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use npm packages from node_modules in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, node_modules can be used, as long as they implement ES Modules and do not use native Node.js APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMY7fe" prefix="r3186" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11610833661783052270"],"question":[0,"What is the configuration option to allow specific files to bypass dynamic code evaluation restrictions in Edge Runtime?"],"answer":[0,"The `unstable_allowDynamic` configuration option accepts a glob or array of globs to ignore dynamic code evaluation for specific files. Example: `export const config = { unstable_allowDynamic: ['/lib/utilities.js', '**/node_modules/function-bind/**'] }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-configuration-option-to-allow-specific-files-to-bypass-dynamic-code-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-configuration-option-to-allow-specific-files-to-bypass-dynamic-code-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-configuration-option-to-allow-specific-files-to-bypass-dynamic-code-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the configuration option to allow specific files to bypass dynamic code evaluation restrictions in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>unstable_allowDynamic</code> configuration option accepts a glob or array of globs to ignore dynamic code evaluation for specific files. Example: <code>export const config = { unstable_allowDynamic: ['/lib/utilities.js', '**/node_modules/function-bind/**'] }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z12TguN" prefix="r3187" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12552463557340386013"],"question":[0,"Is AsyncLocalStorage supported in Next.js Edge Runtime?"],"answer":[0,"Yes, AsyncLocalStorage is supported in Next.js Edge Runtime for context management in asynchronous operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-asynclocalstorage-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-asynclocalstorage-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-asynclocalstorage-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is AsyncLocalStorage supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, AsyncLocalStorage is supported in Next.js Edge Runtime for context management in asynchronous operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSoDtg" prefix="r3188" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12580435748743068897"],"question":[0,"What is the Edge Function bundle size limit on Vercel's Pro plan?"],"answer":[0,"The Edge Function bundle size limit on Vercel's Pro plan is 2 MB (after gzip compression)."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/limitations"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-edge-function-bundle-size-limit-on-vercel-s-pro-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-edge-function-bundle-size-limit-on-vercel-s-pro-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-edge-function-bundle-size-limit-on-vercel-s-pro-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Edge Function bundle size limit on Vercel's Pro plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Function bundle size limit on Vercel's Pro plan is 2 MB (after gzip compression).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/limitations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wVjcM" prefix="r3189" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13614367122369163995"],"question":[0,"What happens if dynamic code evaluation statements are executed on the Edge despite using unstable_allowDynamic?"],"answer":[0,"If dynamic code evaluation statements are executed on the Edge, they will throw and cause a runtime error, even if the file is listed in unstable_allowDynamic."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-dynamic-code-evaluation-statements-are-executed-on-the-edge-desp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-dynamic-code-evaluation-statements-are-executed-on-the-edge-desp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-dynamic-code-evaluation-statements-are-executed-on-the-edge-desp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if dynamic code evaluation statements are executed on the Edge despite using unstable_allowDynamic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If dynamic code evaluation statements are executed on the Edge, they will throw and cause a runtime error, even if the file is listed in unstable_allowDynamic.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hDYvz" prefix="r3190" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13643153402511806918"],"question":[0,"Can you set cookies in Next.js Middleware running on Edge Runtime?"],"answer":[0,"Yes, you can set cookies in Middleware using NextResponse methods. However, setting or updating a cookie value in middleware does not make it updated further down in the request, such as when using in page server components."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/57655"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-cookies-in-next-js-middleware-running-on-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-cookies-in-next-js-middleware-running-on-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-cookies-in-next-js-middleware-running-on-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set cookies in Next.js Middleware running on Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can set cookies in Middleware using NextResponse methods. However, setting or updating a cookie value in middleware does not make it updated further down in the request, such as when using in page server components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/57655" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nrWzS" prefix="r3191" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13912611190859173810"],"question":[0,"Why does Next.js recommend using stale-while-revalidate instead of ISR with Edge Runtime?"],"answer":[0,"Because ISR is not supported with Edge Runtime, Next.js recommends leveraging stale-while-revalidate by setting the cache-control header manually to achieve similar caching behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"why-does-next-js-recommend-using-stale-while-revalidate-instead-of-isr-with-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-does-next-js-recommend-using-stale-while-revalidate-instead-of-isr-with-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-does-next-js-recommend-using-stale-while-revalidate-instead-of-isr-with-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why does Next.js recommend using stale-while-revalidate instead of ISR with Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Because ISR is not supported with Edge Runtime, Next.js recommends leveraging stale-while-revalidate by setting the cache-control header manually to achieve similar caching behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fLrLM" prefix="r3192" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13941810793212906892"],"question":[0,"Does console.error include error.cause information in Next.js Edge Runtime?"],"answer":[0,"No, as of December 2024, console.error in Edge Runtime does not include error.cause information (GitHub Issue #74218)."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/74218"]]],"topic":[0,"nextjs"],"slug":[0,"does-console-error-include-error-cause-information-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-console-error-include-error-cause-information-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-console-error-include-error-cause-information-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does console.error include error.cause information in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, as of December 2024, console.error in Edge Runtime does not include error.cause information (GitHub Issue #74218).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/74218" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8SABe" prefix="r3193" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14220668222178479107"],"question":[0,"Is eval() allowed in Next.js Edge Runtime?"],"answer":[0,"No, eval() is not allowed in Edge Runtime. Dynamic code evaluation statements will throw a runtime error if executed on the Edge."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-eval-allowed-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-eval-allowed-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-eval-allowed-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is eval() allowed in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, eval() is not allowed in Edge Runtime. Dynamic code evaluation statements will throw a runtime error if executed on the Edge.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qulMt" prefix="r3194" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14533508653670156018"],"question":[0,"Is Incremental Static Regeneration (ISR) supported in Next.js Edge Runtime?"],"answer":[0,"No, the Edge Runtime does not support Incremental Static Regeneration (ISR). ISR is only supported when using the Node.js runtime (default)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-incremental-static-regeneration-isr-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-incremental-static-regeneration-isr-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-incremental-static-regeneration-isr-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Incremental Static Regeneration (ISR) supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the Edge Runtime does not support Incremental Static Regeneration (ISR). ISR is only supported when using the Node.js runtime (default).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bUKK5" prefix="r3195" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15099996795711249445"],"question":[0,"Is setInterval supported in Next.js Edge Runtime?"],"answer":[0,"Yes, setInterval and clearInterval are supported in Edge Runtime for repeated execution."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-setinterval-supported-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-setinterval-supported-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-setinterval-supported-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is setInterval supported in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, setInterval and clearInterval are supported in Edge Runtime for repeated execution.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="linking-and-navigating-performance-troubleshooting" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Linking and Navigating > Performance Troubleshooting</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1ijBow" prefix="r3196" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"63856457427066778"],"question":[0,"Does generateStaticParams get called again during ISR revalidation?"],"answer":[0,"No. During revalidation (ISR), generateStaticParams will not be called again."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"does-generatestaticparams-get-called-again-during-isr-revalidation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-generatestaticparams-get-called-again-during-isr-revalidation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-generatestaticparams-get-called-again-during-isr-revalidation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does generateStaticParams get called again during ISR revalidation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. During revalidation (ISR), generateStaticParams will not be called again.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28pE1B" prefix="r3197" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"219361940370160856"],"question":[0,"What happens to the useLinkStatus pending state if a route is already prefetched?"],"answer":[0,"The pending phase disappears entirely if the linked route is already prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-link-status"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-uselinkstatus-pending-state-if-a-route-is-already-prefetched"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-uselinkstatus-pending-state-if-a-route-is-already-prefetched" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-uselinkstatus-pending-state-if-a-route-is-already-prefetched" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the useLinkStatus pending state if a route is already prefetched?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The pending phase disappears entirely if the linked route is already prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-link-status" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1z5pkU" prefix="r3198" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"262883290569439417"],"question":[0,"What happens to the Router Cache on page refresh?"],"answer":[0,"The Router Cache persists across navigation but is cleared on page refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-router-cache-on-page-refresh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-router-cache-on-page-refresh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-router-cache-on-page-refresh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the Router Cache on page refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Router Cache persists across navigation but is cleared on page refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xXz0P" prefix="r3199" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1024839118071670692"],"question":[0,"What happens when you set prefetch={false} on a Next.js Link component?"],"answer":[0,"Prefetching will never happen both on entering the viewport and on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-set-prefetch-false-on-a-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-set-prefetch-false-on-a-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-set-prefetch-false-on-a-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you set prefetch={false} on a Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching will never happen both on entering the viewport and on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgN9tc" prefix="r3200" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1086832226648383978"],"question":[0,"What happens when prefetched data expires before a user hovers over a Link?"],"answer":[0,"If the prefetched data has expired by the time the user hovers over a <Link />, Next.js will attempt to prefetch it again."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-prefetched-data-expires-before-a-user-hovers-over-a-link"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-prefetched-data-expires-before-a-user-hovers-over-a-link" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-prefetched-data-expires-before-a-user-hovers-over-a-link" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when prefetched data expires before a user hovers over a Link?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If the prefetched data has expired by the time the user hovers over a <Link />, Next.js will attempt to prefetch it again.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1CYHjV" prefix="r3201" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1508697247838557547"],"question":[0,"How does Next.js 16 improve prefetch performance when links leave the viewport?"],"answer":[0,"Next.js 16 cancels prefetch requests when the link leaves the viewport, preventing unnecessary network transfers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-16-improve-prefetch-performance-when-links-leave-the-viewport"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-16-improve-prefetch-performance-when-links-leave-the-viewport" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-16-improve-prefetch-performance-when-links-leave-the-viewport" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js 16 improve prefetch performance when links leave the viewport?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 16 cancels prefetch requests when the link leaves the viewport, preventing unnecessary network transfers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16cn04" prefix="r3202" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2065857344651996896"],"question":[0,"Is loading.js supported with Next.js static exports?"],"answer":[0,"No. Loading states require dynamic rendering; loading.js is not supported with static export deployments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-loading-js-supported-with-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-loading-js-supported-with-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-loading-js-supported-with-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is loading.js supported with Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Loading states require dynamic rendering; loading.js is not supported with static export deployments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HrRYW" prefix="r3203" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2618205440564355075"],"question":[0,"What happens to the Router Cache when revalidation functions are called from a Server Action?"],"answer":[0,"When you call revalidation functions from a Server Action (revalidateTag, revalidatePath, updateTag, or refresh), the entire client cache is immediately cleared, bypassing the stale time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-router-cache-when-revalidation-functions-are-called-from-a-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-router-cache-when-revalidation-functions-are-called-from-a-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-router-cache-when-revalidation-functions-are-called-from-a-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the Router Cache when revalidation functions are called from a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When you call revalidation functions from a Server Action (revalidateTag, revalidatePath, updateTag, or refresh), the entire client cache is immediately cleared, bypassing the stale time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z176Jc7" prefix="r3204" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2896388603945205267"],"question":[0,"What are the default values for the experimental staleTimes configuration?"],"answer":[0,"static: 5 minutes (300 seconds), dynamic: 0 seconds (as of v15.0.0)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-values-for-the-experimental-staletimes-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-values-for-the-experimental-staletimes-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-values-for-the-experimental-staletimes-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default values for the experimental staleTimes configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>static: 5 minutes (300 seconds), dynamic: 0 seconds (as of v15.0.0).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zw0aMP" prefix="r3205" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3828293909093369511"],"question":[0,"In which environment is prefetching enabled for Next.js Link components?"],"answer":[0,"Prefetching is only enabled in production. It does not work in development environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-environment-is-prefetching-enabled-for-next-js-link-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-environment-is-prefetching-enabled-for-next-js-link-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-environment-is-prefetching-enabled-for-next-js-link-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which environment is prefetching enabled for Next.js Link components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching is only enabled in production. It does not work in development environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7A0me" prefix="r3206" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4085136180710990085"],"question":[0,"What is the recommended animation delay for useLinkStatus loading indicators to prevent flashing?"],"answer":[0,"~100ms. The documentation recommends debouncing indicators with animation delays (e.g., 100ms) with initial invisibility to prevent flashing during fast navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-link-status"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-animation-delay-for-uselinkstatus-loading-indicators-to-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-animation-delay-for-uselinkstatus-loading-indicators-to-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-animation-delay-for-uselinkstatus-loading-indicators-to-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended animation delay for useLinkStatus loading indicators to prevent flashing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>~100ms. The documentation recommends debouncing indicators with animation delays (e.g., 100ms) with initial invisibility to prevent flashing during fast navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-link-status" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GQRFt" prefix="r3207" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5152722368728204076"],"question":[0,"In which Next.js version was the experimental staleTimes feature introduced?"],"answer":[0,"v14.2.0 (specifically v14.2.0-canary.53)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-experimental-staletimes-feature-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-experimental-staletimes-feature-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-experimental-staletimes-feature-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the experimental staleTimes feature introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v14.2.0 (specifically v14.2.0-canary.53).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgS0Cw" prefix="r3208" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6006839503871716711"],"question":[0,"What technology does Next.js use to detect when links enter the viewport for prefetching?"],"answer":[0,"Next.js uses an Intersection Observer to prefetch the assets necessary in the background."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-9"]]],"topic":[0,"nextjs"],"slug":[0,"what-technology-does-next-js-use-to-detect-when-links-enter-the-viewport-for-pre"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-technology-does-next-js-use-to-detect-when-links-enter-the-viewport-for-pre" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-technology-does-next-js-use-to-detect-when-links-enter-the-viewport-for-pre" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What technology does Next.js use to detect when links enter the viewport for prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses an Intersection Observer to prefetch the assets necessary in the background.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-9" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQSHq" prefix="r3209" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6255201483718899078"],"question":[0,"What does partial rendering preserve during navigation?"],"answer":[0,"Partial rendering means only the route segments that change on navigation re-render on the client, and any shared segments are preserved. Layouts preserve state, remain interactive, and do not rerender."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-partial-rendering-preserve-during-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-partial-rendering-preserve-during-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-partial-rendering-preserve-during-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does partial rendering preserve during navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Partial rendering means only the route segments that change on navigation re-render on the client, and any shared segments are preserved. Layouts preserve state, remain interactive, and do not rerender.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2u9Cs1" prefix="r3210" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6260639826795846413"],"question":[0,"When is the loading.js fallback UI prefetched?"],"answer":[0,"The fallback UI is prefetched, making navigation immediate unless prefetching hasn't completed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-loading-js-fallback-ui-prefetched"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-loading-js-fallback-ui-prefetched" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-loading-js-fallback-ui-prefetched" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the loading.js fallback UI prefetched?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The fallback UI is prefetched, making navigation immediate unless prefetching hasn't completed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtPCSs" prefix="r3211" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6511007873639280127"],"question":[0,"How does large JavaScript bundle size affect prefetching on initial page visits?"],"answer":[0,"Large JavaScript bundles delay hydration completion, which postpones prefetching initiation on initial page visits."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-large-javascript-bundle-size-affect-prefetching-on-initial-page-visits"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-large-javascript-bundle-size-affect-prefetching-on-initial-page-visits" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-large-javascript-bundle-size-affect-prefetching-on-initial-page-visits" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does large JavaScript bundle size affect prefetching on initial page visits?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Large JavaScript bundles delay hydration completion, which postpones prefetching initiation on initial page visits.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZH4Sep" prefix="r3212" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7579508627659669569"],"question":[0,"Does Next.js prefetch when a user has data-saver enabled?"],"answer":[0,"No. Next.js will avoid automatically prefetching if the user has data-saver enabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-9"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-prefetch-when-a-user-has-data-saver-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-prefetch-when-a-user-has-data-saver-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-prefetch-when-a-user-has-data-saver-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js prefetch when a user has data-saver enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js will avoid automatically prefetching if the user has data-saver enabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-9" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17ryE1" prefix="r3213" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8013920306692237647"],"question":[0,"How are fetch requests optimized within generateStaticParams?"],"answer":[0,"If content is fetched within the generateStaticParams function using a fetch request, the requests are automatically memoized. A fetch request with the same arguments across multiple generateStaticParams, Layouts, and Pages will only be made once, which decreases build times."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-fetch-requests-optimized-within-generatestaticparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-fetch-requests-optimized-within-generatestaticparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-fetch-requests-optimized-within-generatestaticparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are fetch requests optimized within generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If content is fetched within the generateStaticParams function using a fetch request, the requests are automatically memoized. A fetch request with the same arguments across multiple generateStaticParams, Layouts, and Pages will only be made once, which decreases build times.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2emdM9" prefix="r3214" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8047048752696189266"],"question":[0,"What is the minimum stale time enforced by the client router cache regardless of configuration?"],"answer":[0,"30 seconds. The client router enforces a minimum 30-second stale time to ensure prefetched links remain usable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-stale-time-enforced-by-the-client-router-cache-regardless-of"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-stale-time-enforced-by-the-client-router-cache-regardless-of" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-stale-time-enforced-by-the-client-router-cache-regardless-of" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum stale time enforced by the client router cache regardless of configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds. The client router enforces a minimum 30-second stale time to ensure prefetched links remain usable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18CTaJ" prefix="r3215" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8327869312549284144"],"question":[0,"Are shared layouts refetched from the server during navigation?"],"answer":[0,"No. Shared layout data won't be refetched from the server to continue to support partial rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"are-shared-layouts-refetched-from-the-server-during-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-shared-layouts-refetched-from-the-server-during-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-shared-layouts-refetched-from-the-server-during-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are shared layouts refetched from the server during navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Shared layout data won't be refetched from the server to continue to support partial rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KE600" prefix="r3216" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8952357305628566444"],"question":[0,"Does the useLinkStatus hook work in the Pages Router?"],"answer":[0,"No. When used in the Pages Router, useLinkStatus always returns { pending: false }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-link-status"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-uselinkstatus-hook-work-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-uselinkstatus-hook-work-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-uselinkstatus-hook-work-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the useLinkStatus hook work in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When used in the Pages Router, useLinkStatus always returns { pending: false }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-link-status" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZA5vRz" prefix="r3217" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9018021711951822548"],"question":[0,"What happens to prefetching when generateStaticParams is missing from a dynamic route?"],"answer":[0,"Routes fall back to dynamic rendering at request time instead of prerendering at build, which negatively impacts navigation performance."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-prefetching-when-generatestaticparams-is-missing-from-a-dynamic-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-prefetching-when-generatestaticparams-is-missing-from-a-dynamic-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-prefetching-when-generatestaticparams-is-missing-from-a-dynamic-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to prefetching when generateStaticParams is missing from a dynamic route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Routes fall back to dynamic rendering at request time instead of prerendering at build, which negatively impacts navigation performance.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17Y1jb" prefix="r3218" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10945062576742916233"],"question":[0,"What happens when prefetching hasn't completed on slow networks before a user clicks a link?"],"answer":[0,"On slow or unstable networks, prefetching may not finish before the user clicks a link, which means the loading.js fallback may not appear immediately because it hasn't been prefetched yet."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-prefetching-hasn-t-completed-on-slow-networks-before-a-user-cl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-prefetching-hasn-t-completed-on-slow-networks-before-a-user-cl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-prefetching-hasn-t-completed-on-slow-networks-before-a-user-cl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when prefetching hasn't completed on slow networks before a user clicks a link?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On slow or unstable networks, prefetching may not finish before the user clicks a link, which means the loading.js fallback may not appear immediately because it hasn't been prefetched yet.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iYAc3" prefix="r3219" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11587954957487426917"],"question":[0,"What is the default value of the prefetch prop on Next.js Link components?"],"answer":[0,"The default value is null or \"auto\". With this setting, for static routes the full route will be prefetched (including all its data), and for dynamic routes the partial route down to the nearest segment with a loading.js boundary will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-next-js-link-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-next-js-link-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-next-js-link-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the prefetch prop on Next.js Link components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is null or "auto". With this setting, for static routes the full route will be prefetched (including all its data), and for dynamic routes the partial route down to the nearest segment with a loading.js boundary will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z33f62" prefix="r3220" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12006216114672501464"],"question":[0,"What is the default staleTime for loading.js segments in Next.js 15?"],"answer":[0,"5 minutes. loading.js will remain cached for 5 minutes (or the value of the staleTimes.static configuration)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-loading-js-segments-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-loading-js-segments-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-loading-js-segments-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for loading.js segments in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes. loading.js will remain cached for 5 minutes (or the value of the staleTimes.static configuration).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BMN4a" prefix="r3221" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12032096851678458224"],"question":[0,"What causes slow navigation for dynamic routes without loading.js files?"],"answer":[0,"The client must wait for the server response before showing the result, creating perceived unresponsiveness, because there is no partial prefetching or immediate loading UI."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-causes-slow-navigation-for-dynamic-routes-without-loading-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-causes-slow-navigation-for-dynamic-routes-without-loading-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-causes-slow-navigation-for-dynamic-routes-without-loading-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What causes slow navigation for dynamic routes without loading.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The client must wait for the server response before showing the result, creating perceived unresponsiveness, because there is no partial prefetching or immediate loading UI.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cqia3" prefix="r3222" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12089379654081225446"],"question":[0,"What is the default staleTime for page segments in Next.js 15?"],"answer":[0,"0 seconds (not cached). In Next.js 15, the default behavior changed to have a staleTime of 0 for Page segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-page-segments-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-page-segments-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-page-segments-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for page segments in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 seconds (not cached). In Next.js 15, the default behavior changed to have a staleTime of 0 for Page segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qMxog" prefix="r3223" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12377621631515193895"],"question":[0,"What is the default Router Cache TTL for static pages with default prefetching (prefetch={null})?"],"answer":[0,"5 minutes for static pages. Dynamic pages are not cached by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-router-cache-ttl-for-static-pages-with-default-prefetching-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-router-cache-ttl-for-static-pages-with-default-prefetching-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-router-cache-ttl-for-static-pages-with-default-prefetching-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Router Cache TTL for static pages with default prefetching (prefetch={null})?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes for static pages. Dynamic pages are not cached by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3OmXc" prefix="r3224" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12729406730760929411"],"question":[0,"How does Next.js 16 prioritize prefetch requests?"],"answer":[0,"Next.js 16 prioritizes link prefetching on hover or when re-entering the viewport, ensuring that links users are actively engaging with receive prefetch priority."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-16-prioritize-prefetch-requests"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-16-prioritize-prefetch-requests" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-16-prioritize-prefetch-requests" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js 16 prioritize prefetch requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 16 prioritizes link prefetching on hover or when re-entering the viewport, ensuring that links users are actively engaging with receive prefetch priority.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sqGFF" prefix="r3225" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13074538113402007496"],"question":[0,"What is the Router Cache TTL when using full prefetching (prefetch={true})?"],"answer":[0,"5 minutes for both static and dynamic pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-router-cache-ttl-when-using-full-prefetching-prefetch-true"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-router-cache-ttl-when-using-full-prefetching-prefetch-true" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-router-cache-ttl-when-using-full-prefetching-prefetch-true" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Router Cache TTL when using full prefetching (prefetch={true})?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes for both static and dynamic pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mDoKd" prefix="r3226" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13157078949405837173"],"question":[0,"What navigation feature does the Router Cache enable without full-page reloads?"],"answer":[0,"The Router Cache enables instant back/forward navigation without full-page reloads."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-navigation-feature-does-the-router-cache-enable-without-full-page-reloads"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-navigation-feature-does-the-router-cache-enable-without-full-page-reloads" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-navigation-feature-does-the-router-cache-enable-without-full-page-reloads" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What navigation feature does the Router Cache enable without full-page reloads?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Router Cache enables instant back/forward navigation without full-page reloads.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1I0Asf" prefix="r3227" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14481350481337306301"],"question":[0,"What happens when you call router.refresh() in Next.js?"],"answer":[0,"router.refresh() will invalidate the Router Cache and make a new request to the server for the current route. However, refresh() could re-produce the same result if fetch requests are cached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-call-router-refresh-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-call-router-refresh-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-call-router-refresh-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you call router.refresh() in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.refresh() will invalidate the Router Cache and make a new request to the server for the current route. However, refresh() could re-produce the same result if fetch requests are cached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="middleware-advanced-features-flags" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Middleware > Advanced Features & Flags</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2vqYFl" prefix="r3228" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"292944773970885990"],"question":[0,"What codemod is available to migrate from middleware.ts to proxy.ts?"],"answer":[0,"Next.js provides a codemod that will rename the file from middleware.ts to proxy.ts and rename the function from 'middleware' to 'proxy', keeping the logic the same."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-to-proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-is-available-to-migrate-from-middleware-ts-to-proxy-ts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-is-available-to-migrate-from-middleware-ts-to-proxy-ts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-is-available-to-migrate-from-middleware-ts-to-proxy-ts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod is available to migrate from middleware.ts to proxy.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js provides a codemod that will rename the file from middleware.ts to proxy.ts and rename the function from 'middleware' to 'proxy', keeping the logic the same.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-to-proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1l8xJi" prefix="r3229" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"580915324353662655"],"question":[0,"What units can be used when setting middlewareClientMaxBodySize as a string?"],"answer":[0,"You can use 'b', 'kb', 'mb', or 'gb' (e.g., '1mb'). Alternatively, you can use a number representing bytes (e.g., 1048576 for 1MB)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-units-can-be-used-when-setting-middlewareclientmaxbodysize-as-a-string"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-units-can-be-used-when-setting-middlewareclientmaxbodysize-as-a-string" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-units-can-be-used-when-setting-middlewareclientmaxbodysize-as-a-string" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What units can be used when setting middlewareClientMaxBodySize as a string?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use 'b', 'kb', 'mb', or 'gb' (e.g., '1mb'). Alternatively, you can use a number representing bytes (e.g., 1048576 for 1MB).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIrExW" prefix="r3230" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"774387693247750016"],"question":[0,"What happens when a request body exceeds the middlewareClientMaxBodySize limit?"],"answer":[0,"The body will only be buffered up to the limit, and a warning will be logged. The request continues processing normally with only the partial body available—it does not fail or return an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-request-body-exceeds-the-middlewareclientmaxbodysize-limit"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-request-body-exceeds-the-middlewareclientmaxbodysize-limit" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-request-body-exceeds-the-middlewareclientmaxbodysize-limit" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a request body exceeds the middlewareClientMaxBodySize limit?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The body will only be buffered up to the limit, and a warning will be logged. The request continues processing normally with only the partial body available—it does not fail or return an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTXsrl" prefix="r3231" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1728105887208909149"],"question":[0,"What is the recommended position to place the middleware/proxy file?"],"answer":[0,"The middleware.ts or proxy.ts file should be placed at the root of your project (same level as pages or app directory), or inside the src directory if applicable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-position-to-place-the-middleware-proxy-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-position-to-place-the-middleware-proxy-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-position-to-place-the-middleware-proxy-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended position to place the middleware/proxy file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware.ts or proxy.ts file should be placed at the root of your project (same level as pages or app directory), or inside the src directory if applicable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LiMr4" prefix="r3232" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2551514059737242684"],"question":[0,"In which Next.js version was the ability to produce responses directly from middleware introduced?"],"answer":[0,"The ability to produce a response directly by returning a Response or NextResponse instance was introduced in Next.js v13.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-ability-to-produce-responses-directly-from-midd"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-ability-to-produce-responses-directly-from-midd" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-ability-to-produce-responses-directly-from-midd" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the ability to produce responses directly from middleware introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The ability to produce a response directly by returning a Response or NextResponse instance was introduced in Next.js v13.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPCNic" prefix="r3233" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2737470077062651202"],"question":[0,"How do you set response headers in Next.js middleware?"],"answer":[0,"Create a NextResponse and use response.headers.set(): const response = NextResponse.next(); response.headers.set('x-custom-header', 'value'); return response;"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-set-response-headers-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-set-response-headers-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-set-response-headers-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you set response headers in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a NextResponse and use response.headers.set(): const response = NextResponse.next(); response.headers.set('x-custom-header', 'value'); return response;</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ja5Cy" prefix="r3234" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3284914036363574896"],"question":[0,"What types are supported in the 'has' and 'missing' fields of middleware matchers?"],"answer":[0,"Three types are supported: 'header' (HTTP headers), 'query' (query parameters), and 'cookie' (cookies). Each requires type, key, and value properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-are-supported-in-the-has-and-missing-fields-of-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-are-supported-in-the-has-and-missing-fields-of-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-are-supported-in-the-has-and-missing-fields-of-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types are supported in the 'has' and 'missing' fields of middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Three types are supported: 'header' (HTTP headers), 'query' (query parameters), and 'cookie' (cookies). Each requires type, key, and value properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jTKDb" prefix="r3235" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3742046070652724475"],"question":[0,"What does NextResponse.cookies.delete(name) return?"],"answer":[0,"It returns true if the cookie was deleted, or false if nothing was deleted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-cookies-delete-name-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-cookies-delete-name-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-cookies-delete-name-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.cookies.delete(name) return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It returns true if the cookie was deleted, or false if nothing was deleted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dJ73N" prefix="r3236" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3835060711403017903"],"question":[0,"Can Next.js middleware be used with static export deployments?"],"answer":[0,"No, middleware does not function with static export deployments. Adapter support is platform-specific and only works on Node.js servers and Docker containers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-middleware-be-used-with-static-export-deployments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-middleware-be-used-with-static-export-deployments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-middleware-be-used-with-static-export-deployments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js middleware be used with static export deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, middleware does not function with static export deployments. Adapter support is platform-specific and only works on Node.js servers and Docker containers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqnWT9" prefix="r3237" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4014108394802832848"],"question":[0,"What optional properties can be specified in a matcher object in Next.js middleware?"],"answer":[0,"source (required path/pattern), regexp (optional regex), locale (boolean to ignore locale-based routing), has (conditions for present request elements), and missing (conditions for absent request elements)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-properties-can-be-specified-in-a-matcher-object-in-next-js-middlew"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-properties-can-be-specified-in-a-matcher-object-in-next-js-middlew" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-properties-can-be-specified-in-a-matcher-object-in-next-js-middlew" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional properties can be specified in a matcher object in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>source (required path/pattern), regexp (optional regex), locale (boolean to ignore locale-based routing), has (conditions for present request elements), and missing (conditions for absent request elements).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kQ43a" prefix="r3238" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4537621609565050448"],"question":[0,"How do you return a JSON response with a custom status code from middleware?"],"answer":[0,"Use NextResponse.json() with a second parameter: return NextResponse.json({ error: 'Not Found' }, { status: 404 });"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-return-a-json-response-with-a-custom-status-code-from-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-return-a-json-response-with-a-custom-status-code-from-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-return-a-json-response-with-a-custom-status-code-from-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you return a JSON response with a custom status code from middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use NextResponse.json() with a second parameter: return NextResponse.json({ error: 'Not Found' }, { status: 404 });</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tBazf" prefix="r3239" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4988331619447452198"],"question":[0,"What is the default runtime for Next.js middleware?"],"answer":[0,"Middleware defaults to the Edge runtime. However, as of v15.5, Node.js runtime support is available by setting runtime: 'nodejs' in the config object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware defaults to the Edge runtime. However, as of v15.5, Node.js runtime support is available by setting runtime: 'nodejs' in the config object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z191KH1" prefix="r3240" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6235877803957956863"],"question":[0,"What is the default runtime for proxy.ts in Next.js v16?"],"answer":[0,"The proxy runtime is Node.js by default, and it cannot be configured. The edge runtime is NOT supported in proxy. If you want to continue using edge runtime, keep using middleware.ts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-proxy-ts-in-next-js-v16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-proxy-ts-in-next-js-v16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-proxy-ts-in-next-js-v16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for proxy.ts in Next.js v16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The proxy runtime is Node.js by default, and it cannot be configured. The edge runtime is NOT supported in proxy. If you want to continue using edge runtime, keep using middleware.ts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ksrBq" prefix="r3241" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6633985619227353320"],"question":[0,"Can you use template literals with expressions in middleware matcher configuration?"],"answer":[0,"No, template literals with expressions are not supported and will cause a build error: 'Unsupported template literal with expressions'. Matcher values must be static constants."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/56398"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-template-literals-with-expressions-in-middleware-matcher-configurati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-template-literals-with-expressions-in-middleware-matcher-configurati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-template-literals-with-expressions-in-middleware-matcher-configurati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use template literals with expressions in middleware matcher configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, template literals with expressions are not supported and will cause a build error: 'Unsupported template literal with expressions'. Matcher values must be static constants.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/56398" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hf9jW" prefix="r3242" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7258450343423489944"],"question":[0,"Where does middleware execute in the Next.js request pipeline?"],"answer":[0,"Middleware executes third in the sequence: 1) headers from next.config.js, 2) redirects from next.config.js, 3) middleware, 4) beforeFiles rewrites, 5) filesystem routes, 6) afterFiles rewrites, 7) dynamic routes, 8) fallback rewrites."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-middleware-execute-in-the-next-js-request-pipeline"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-middleware-execute-in-the-next-js-request-pipeline" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-middleware-execute-in-the-next-js-request-pipeline" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does middleware execute in the Next.js request pipeline?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware executes third in the sequence: 1) headers from next.config.js, 2) redirects from next.config.js, 3) middleware, 4) beforeFiles rewrites, 5) filesystem routes, 6) afterFiles rewrites, 7) dynamic routes, 8) fallback rewrites.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dWgv9" prefix="r3243" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7696873920088039708"],"question":[0,"What testing utility was introduced in Next.js v15.1 for middleware?"],"answer":[0,"The unstable_doesMiddlewareMatch function (later renamed to unstable_doesProxyMatch) from next/experimental/testing/server, which asserts whether middleware will run for provided URL, headers, and cookies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-testing-utility-was-introduced-in-next-js-v15-1-for-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-testing-utility-was-introduced-in-next-js-v15-1-for-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-testing-utility-was-introduced-in-next-js-v15-1-for-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What testing utility was introduced in Next.js v15.1 for middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The unstable_doesMiddlewareMatch function (later renamed to unstable_doesProxyMatch) from next/experimental/testing/server, which asserts whether middleware will run for provided URL, headers, and cookies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zqeq2q" prefix="r3244" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8256104122440198778"],"question":[0,"Is request.geo available in local development for Next.js middleware?"],"answer":[0,"No, geolocation info will always be empty in the local environment since Next.js server has no way of knowing the location. It only works when deployed to platforms like Vercel."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.jamesperkins.dev/post/using-next-middleware-for-geolocation/"]]],"topic":[0,"nextjs"],"slug":[0,"is-request-geo-available-in-local-development-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-request-geo-available-in-local-development-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-request-geo-available-in-local-development-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is request.geo available in local development for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, geolocation info will always be empty in the local environment since Next.js server has no way of knowing the location. It only works when deployed to platforms like Vercel.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.jamesperkins.dev/post/using-next-middleware-for-geolocation/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>jamesperkins.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z214kqk" prefix="r3245" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9579968415034206141"],"question":[0,"What matcher syntax excludes Next.js internal paths like _next/static and _next/image?"],"answer":[0,"'/((?!api|_next/static|_next/image|favicon.ico).*)' - This uses negative lookahead regex to exclude paths starting with /api, /_next/static, /_next/image, and /favicon.ico."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-matcher-syntax-excludes-next-js-internal-paths-like-next-static-and-next-im"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-matcher-syntax-excludes-next-js-internal-paths-like-next-static-and-next-im" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-matcher-syntax-excludes-next-js-internal-paths-like-next-static-and-next-im" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What matcher syntax excludes Next.js internal paths like _next/static and _next/image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'/((?!api|_next/static|_next/image|favicon.ico).*)' - This uses negative lookahead regex to exclude paths starting with /api, /_next/static, /_next/image, and /favicon.ico.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="amqxT" prefix="r3246" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9594247773680374892"],"question":[0,"What security warning does the Next.js documentation give about using NextResponse.next() with headers?"],"answer":[0,"Do NOT use NextResponse.next({ headers }) for client-bound headers. Avoid copying all incoming headers—risk exposing sensitive data. Implement an allowlist approach: exclude custom x-* headers, 'authorization', and 'cookie' headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-warning-does-the-next-js-documentation-give-about-using-nextrespon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-warning-does-the-next-js-documentation-give-about-using-nextrespon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-warning-does-the-next-js-documentation-give-about-using-nextrespon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security warning does the Next.js documentation give about using NextResponse.next() with headers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Do NOT use NextResponse.next({ headers }) for client-bound headers. Avoid copying all incoming headers—risk exposing sensitive data. Implement an allowlist approach: exclude custom x-* headers, 'authorization', and 'cookie' headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aUbth" prefix="r3247" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9726474503746090808"],"question":[0,"In which Next.js version was the skipMiddlewareUrlNormalize flag introduced?"],"answer":[0,"The skipMiddlewareUrlNormalize flag was introduced in Next.js v13.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-skipmiddlewareurlnormalize-flag-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-skipmiddlewareurlnormalize-flag-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-skipmiddlewareurlnormalize-flag-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the skipMiddlewareUrlNormalize flag introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The skipMiddlewareUrlNormalize flag was introduced in Next.js v13.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tk5sn" prefix="r3248" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10051122563190856511"],"question":[0,"In which Next.js version was middleware stabilized?"],"answer":[0,"Middleware was stabilized in Next.js v12.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-middleware-stabilized"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-middleware-stabilized" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-middleware-stabilized" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was middleware stabilized?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware was stabilized in Next.js v12.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1veA5S" prefix="r3249" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10316772767061609785"],"question":[0,"What is the purpose of the NextFetchEvent.waitUntil() method in middleware?"],"answer":[0,"waitUntil() takes a promise as an argument and extends the lifetime of the middleware until the promise settles. This is useful for performing background work like analytics or logging after the response has been sent."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-nextfetchevent-waituntil-method-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-nextfetchevent-waituntil-method-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-nextfetchevent-waituntil-method-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the NextFetchEvent.waitUntil() method in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>waitUntil() takes a promise as an argument and extends the lifetime of the middleware until the promise settles. This is useful for performing background work like analytics or logging after the response has been sent.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z33VOI" prefix="r3250" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10596421507133700936"],"question":[0,"What properties are available on the request.geo object in Next.js middleware?"],"answer":[0,"city, country, region, latitude, longitude, and countryRegion (the region part of the ISO 3166-2 code). Each property is returned as a string or undefined."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/39619"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-on-the-request-geo-object-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-on-the-request-geo-object-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-on-the-request-geo-object-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available on the request.geo object in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>city, country, region, latitude, longitude, and countryRegion (the region part of the ISO 3166-2 code). Each property is returned as a string or undefined.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/39619" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fnlTA" prefix="r3251" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10978875889940164441"],"question":[0,"How do you enable Node.js runtime in Next.js middleware starting from v15.5?"],"answer":[0,"Export a config object with runtime set to 'nodejs': export const config = { runtime: 'nodejs' }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-node-js-runtime-in-next-js-middleware-starting-from-v15-5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-node-js-runtime-in-next-js-middleware-starting-from-v15-5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-node-js-runtime-in-next-js-middleware-starting-from-v15-5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable Node.js runtime in Next.js middleware starting from v15.5?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a config object with runtime set to 'nodejs': export const config = { runtime: 'nodejs' }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoOfGF" prefix="r3252" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11274470859245551603"],"question":[0,"In which Next.js version was the skipTrailingSlashRedirect flag introduced?"],"answer":[0,"The skipTrailingSlashRedirect flag was introduced in Next.js v13.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-skiptrailingslashredirect-flag-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-skiptrailingslashredirect-flag-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-skiptrailingslashredirect-flag-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the skipTrailingSlashRedirect flag introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The skipTrailingSlashRedirect flag was introduced in Next.js v13.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZW36O4" prefix="r3253" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11284099489265741677"],"question":[0,"What is the typical size limit for Next.js middleware and Edge Functions when deployed to Vercel?"],"answer":[0,"The bundled code typically has a 1MB size limit. This includes all dependencies and is enforced for Edge Functions and Middleware deployments."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/66895"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-size-limit-for-next-js-middleware-and-edge-functions-when-de"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-size-limit-for-next-js-middleware-and-edge-functions-when-de" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-size-limit-for-next-js-middleware-and-edge-functions-when-de" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical size limit for Next.js middleware and Edge Functions when deployed to Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The bundled code typically has a 1MB size limit. This includes all dependencies and is enforced for Edge Functions and Middleware deployments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/66895" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21d4eE" prefix="r3254" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12365600820970563024"],"question":[0,"What five cookie methods are available on NextResponse in middleware?"],"answer":[0,"set(name, value, options), get(name), getAll(name?), has(name), and delete(name). These methods allow manipulation of cookies in the response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-five-cookie-methods-are-available-on-nextresponse-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-five-cookie-methods-are-available-on-nextresponse-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-five-cookie-methods-are-available-on-nextresponse-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What five cookie methods are available on NextResponse in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>set(name, value, options), get(name), getAll(name?), has(name), and delete(name). These methods allow manipulation of cookies in the response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nlC8C" prefix="r3255" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12879261667959214243"],"question":[0,"What properties are available on NextRequest.nextUrl for URL inspection?"],"answer":[0,"pathname (e.g., '/home' for /home) and searchParams (URLSearchParams object, e.g., { 'name': 'lee' } for /home?name=lee), plus all standard URL properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-request"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-on-nextrequest-nexturl-for-url-inspection"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-on-nextrequest-nexturl-for-url-inspection" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-on-nextrequest-nexturl-for-url-inspection" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available on NextRequest.nextUrl for URL inspection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>pathname (e.g., '/home' for /home) and searchParams (URLSearchParams object, e.g., { 'name': 'lee' } for /home?name=lee), plus all standard URL properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-request" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2heXeq" prefix="r3256" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13938783636647171509"],"question":[0,"How can you exclude prefetch requests from next/link in middleware matchers?"],"answer":[0,"Use the 'missing' field to check for the absence of the 'next-router-prefetch' header: missing: [{ type: 'header', key: 'next-router-prefetch' }]"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/42660"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-exclude-prefetch-requests-from-next-link-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-exclude-prefetch-requests-from-next-link-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-exclude-prefetch-requests-from-next-link-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you exclude prefetch requests from next/link in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the 'missing' field to check for the absence of the 'next-router-prefetch' header: missing: [{ type: 'header', key: 'next-router-prefetch' }]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/42660" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2n4Wg3" prefix="r3257" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14526205224595185627"],"question":[0,"What are the three parameter modifiers supported in Next.js middleware matcher paths?"],"answer":[0,"* (asterisk) for zero or more matches, ? (question mark) for zero or one match, and + (plus) for one or more matches. Example: /about/:path* matches /about, /about/a, and /about/a/b/c."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-parameter-modifiers-supported-in-next-js-middleware-matcher-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-parameter-modifiers-supported-in-next-js-middleware-matcher-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-parameter-modifiers-supported-in-next-js-middleware-matcher-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three parameter modifiers supported in Next.js middleware matcher paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ul> <li>(asterisk) for zero or more matches, ? (question mark) for zero or one match, and + (plus) for one or more matches. Example: /about/:path* matches /about, /about/a, and /about/a/b/c.</li> </ul> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="smgyW" prefix="r3258" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14651563062900545322"],"question":[0,"What is the exact default value for experimental.middlewareClientMaxBodySize in Next.js?"],"answer":[0,"The default value is 10MB. This configuration limits request body buffering in middleware to prevent excessive memory consumption."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-default-value-for-experimental-middlewareclientmaxbodysize-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-default-value-for-experimental-middlewareclientmaxbodysize-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-default-value-for-experimental-middlewareclientmaxbodysize-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact default value for experimental.middlewareClientMaxBodySize in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 10MB. This configuration limits request body buffering in middleware to prevent excessive memory consumption.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oOfHB" prefix="r3259" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14801789342099081568"],"question":[0,"What does the skipTrailingSlashRedirect flag do in next.config.js?"],"answer":[0,"It disables Next.js redirects for adding or removing trailing slashes, allowing custom handling inside middleware to maintain the trailing slash for some paths but not others, which can make incremental migrations easier."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-skiptrailingslashredirect-flag-do-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-skiptrailingslashredirect-flag-do-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-skiptrailingslashredirect-flag-do-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the skipTrailingSlashRedirect flag do in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It disables Next.js redirects for adding or removing trailing slashes, allowing custom handling inside middleware to maintain the trailing slash for some paths but not others, which can make incremental migrations easier.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-segment-config-rendering-and-caching-control" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Segment Config > Rendering and Caching Control</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Zse9Dh" prefix="r3260" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"325545728541265357"],"question":[0,"What does `fetchCache = 'default-no-store'` do?"],"answer":[0,"It allows any cache option to be passed to fetch but if no option is provided then sets the cache option to 'no-store'. Individual fetch requests can still override this by explicitly setting their own cache option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-default-no-store-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-default-no-store-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-default-no-store-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `fetchCache = 'default-no-store'` do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It allows any cache option to be passed to fetch but if no option is provided then sets the cache option to 'no-store'. Individual fetch requests can still override this by explicitly setting their own cache option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BlyaB" prefix="r3261" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"518921356672986743"],"question":[0,"What is the default value of `maxDuration` on Vercel's Pro plan?"],"answer":[0,"15 seconds is the default maximum duration on Vercel's Pro plan, configurable up to 5 minutes (300 seconds)."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-maxduration-on-vercel-s-pro-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-maxduration-on-vercel-s-pro-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-maxduration-on-vercel-s-pro-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `maxDuration` on Vercel's Pro plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>15 seconds is the default maximum duration on Vercel's Pro plan, configurable up to 5 minutes (300 seconds).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Je7T" prefix="r3262" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"522687893169349896"],"question":[0,"Does the `revalidate` route segment config override individual fetch request revalidate values?"],"answer":[0,"No. The route segment revalidate option does not override the revalidate value set by individual fetch requests. Individual fetch requests can set their own revalidate values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-revalidate-route-segment-config-override-individual-fetch-request-reval"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-revalidate-route-segment-config-override-individual-fetch-request-reval" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-revalidate-route-segment-config-override-individual-fetch-request-reval" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the `revalidate` route segment config override individual fetch request revalidate values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The route segment revalidate option does not override the revalidate value set by individual fetch requests. Individual fetch requests can set their own revalidate values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gr6CJ" prefix="r3263" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"657124332442628069"],"question":[0,"What happens when both 'only-no-store' and 'force-no-store' are provided in the route hierarchy?"],"answer":[0,"'force-no-store' wins. The force option takes precedence over the only option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-both-only-no-store-and-force-no-store-are-provided-in-the-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-both-only-no-store-and-force-no-store-are-provided-in-the-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-both-only-no-store-and-force-no-store-are-provided-in-the-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when both 'only-no-store' and 'force-no-store' are provided in the route hierarchy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'force-no-store' wins. The force option takes precedence over the only option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ulHWu" prefix="r3264" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2084024634944352949"],"question":[0,"What happens when you set `dynamic = 'error'`?"],"answer":[0,"It forces static rendering and throws an error if dynamic APIs (like cookies(), headers()) or uncached data fetches are used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-set-dynamic-error"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-set-dynamic-error" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-set-dynamic-error" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you set `dynamic = 'error'`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and throws an error if dynamic APIs (like cookies(), headers()) or uncached data fetches are used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ngzsl" prefix="r3265" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2614316745306781320"],"question":[0,"What does `revalidate = false` actually mean in terms of cache duration?"],"answer":[0,"revalidate: false is semantically equivalent to revalidate: Infinity, which means the resource should be cached indefinitely. However, cached data may still be removed due to cache eviction policies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-false-actually-mean-in-terms-of-cache-duration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-false-actually-mean-in-terms-of-cache-duration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-false-actually-mean-in-terms-of-cache-duration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `revalidate = false` actually mean in terms of cache duration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidate: false is semantically equivalent to revalidate: Infinity, which means the resource should be cached indefinitely. However, cached data may still be removed due to cache eviction policies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PqxbG" prefix="r3266" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2832158928190614757"],"question":[0,"What is the minimum Next.js version required for the `maxDuration` route segment config option?"],"answer":[0,"Next.js 13.4.10 or later is required for the maxDuration configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/58855"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-next-js-version-required-for-the-maxduration-route-segment-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-next-js-version-required-for-the-maxduration-route-segment-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-next-js-version-required-for-the-maxduration-route-segment-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Next.js version required for the `maxDuration` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.4.10 or later is required for the maxDuration configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/58855" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z216BJx" prefix="r3267" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3370845950204700181"],"question":[0,"What does `fetchCache = 'only-no-store'` do?"],"answer":[0,"It ensures all fetch requests opt out of caching by changing any requests that omit an option or use cache: 'force-cache' to use cache: 'no-store'. It will cause an error if any fetch requests explicitly use cache: 'force-cache'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-only-no-store-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-only-no-store-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-only-no-store-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `fetchCache = 'only-no-store'` do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures all fetch requests opt out of caching by changing any requests that omit an option or use cache: 'force-cache' to use cache: 'no-store'. It will cause an error if any fetch requests explicitly use cache: 'force-cache'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJS7Ei" prefix="r3268" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4361513483256477714"],"question":[0,"What exact fetch behavior is `dynamic = 'force-dynamic'` equivalent to?"],"answer":[0,"It is equivalent to setting every fetch() request to { cache: 'no-store', next: { revalidate: 0 } }. It also equals setting fetchCache = 'force-no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-exact-fetch-behavior-is-dynamic-force-dynamic-equivalent-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-exact-fetch-behavior-is-dynamic-force-dynamic-equivalent-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-exact-fetch-behavior-is-dynamic-force-dynamic-equivalent-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What exact fetch behavior is `dynamic = 'force-dynamic'` equivalent to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is equivalent to setting every fetch() request to { cache: 'no-store', next: { revalidate: 0 } }. It also equals setting fetchCache = 'force-no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWqpox" prefix="r3269" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4580691151928945420"],"question":[0,"What is the default value of the `revalidate` route segment config option?"],"answer":[0,"false - This means the resource is cached indefinitely (equivalent to revalidate: Infinity)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `revalidate` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - This means the resource is cached indefinitely (equivalent to revalidate: Infinity).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11UuJf" prefix="r3270" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4821475841201869005"],"question":[0,"What is the default value of the `dynamic` route segment config option?"],"answer":[0,"'auto' - This is the default option that caches as much as possible without preventing any components from opting into dynamic behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `dynamic` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' - This is the default option that caches as much as possible without preventing any components from opting into dynamic behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yk1bT" prefix="r3271" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5674812278975686893"],"question":[0,"What does `fetchCache = 'default-cache'` do?"],"answer":[0,"It allows any cache option to be passed to fetch, but if no option is provided then sets the cache option to 'force-cache'. This means even fetch requests after Dynamic APIs are considered static."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-default-cache-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-default-cache-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-default-cache-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `fetchCache = 'default-cache'` do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It allows any cache option to be passed to fetch, but if no option is provided then sets the cache option to 'force-cache'. This means even fetch requests after Dynamic APIs are considered static.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Dkqlj" prefix="r3272" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5694676014907960588"],"question":[0,"What are all possible values for the `revalidate` route segment config option?"],"answer":[0,"false | 0 | number (in seconds). The number must be a literal static value, not a variable or computed expression."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-possible-values-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-possible-values-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-possible-values-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all possible values for the `revalidate` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false | 0 | number (in seconds). The number must be a literal static value, not a variable or computed expression.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2m8oX7" prefix="r3273" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6049624931876674425"],"question":[0,"Do Server Actions inherit the `maxDuration` value from the page or layout they're used on?"],"answer":[0,"Yes. Server Actions inherit the Route Segment Config from the page or layout they are used on, including the maxDuration field. You should set maxDuration at the page/layout level to change the timeout of all Server Actions used on that page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-actions-inherit-the-maxduration-value-from-the-page-or-layout-they-re-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-actions-inherit-the-maxduration-value-from-the-page-or-layout-they-re-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-actions-inherit-the-maxduration-value-from-the-page-or-layout-they-re-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Actions inherit the `maxDuration` value from the page or layout they're used on?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Actions inherit the Route Segment Config from the page or layout they are used on, including the maxDuration field. You should set maxDuration at the page/layout level to change the timeout of all Server Actions used on that page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qzo10" prefix="r3274" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6803062423971918834"],"question":[0,"What happens when you set `dynamic = 'force-static'` with regards to cookies(), headers(), and useSearchParams()?"],"answer":[0,"It forces static rendering and returns empty values for cookies(), headers(), and useSearchParams()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-set-dynamic-force-static-with-regards-to-cookies-headers-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-set-dynamic-force-static-with-regards-to-cookies-headers-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-set-dynamic-force-static-with-regards-to-cookies-headers-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you set `dynamic = 'force-static'` with regards to cookies(), headers(), and useSearchParams()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and returns empty values for cookies(), headers(), and useSearchParams().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11siRl" prefix="r3275" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7194256638207936133"],"question":[0,"How does `preferredRegion` inherit from parent layouts?"],"answer":[0,"If a preferredRegion is not specified in a child route, it will inherit the option of the nearest parent layout. The root layout defaults to all regions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-preferredregion-inherit-from-parent-layouts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-preferredregion-inherit-from-parent-layouts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-preferredregion-inherit-from-parent-layouts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does `preferredRegion` inherit from parent layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a preferredRegion is not specified in a child route, it will inherit the option of the nearest parent layout. The root layout defaults to all regions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZH89Sa" prefix="r3276" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8029998286554271678"],"question":[0,"What happens when both 'only-cache' and 'force-cache' are provided in the route hierarchy?"],"answer":[0,"'force-cache' wins. The force option changes the behavior across the route so a single segment with 'force-*' would prevent any errors caused by 'only-*'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-both-only-cache-and-force-cache-are-provided-in-the-route-hier"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-both-only-cache-and-force-cache-are-provided-in-the-route-hier" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-both-only-cache-and-force-cache-are-provided-in-the-route-hier" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when both 'only-cache' and 'force-cache' are provided in the route hierarchy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'force-cache' wins. The force option changes the behavior across the route so a single segment with 'force-<em>' would prevent any errors caused by 'only-</em>'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJ2ygL" prefix="r3277" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8551361594254022328"],"question":[0,"Can you use the `revalidate` option with `runtime = 'edge'`?"],"answer":[0,"No. The revalidate option is not available when using runtime = 'edge'. The Edge Runtime does not support Incremental Static Regeneration (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-revalidate-option-with-runtime-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-revalidate-option-with-runtime-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-revalidate-option-with-runtime-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the `revalidate` option with `runtime = 'edge'`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The revalidate option is not available when using runtime = 'edge'. The Edge Runtime does not support Incremental Static Regeneration (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="168MPC" prefix="r3278" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9165504697310102536"],"question":[0,"What is the default value of the `dynamicParams` route segment config option?"],"answer":[0,"true - Dynamic segments not included in generateStaticParams will be generated on demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamicparams-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamicparams-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamicparams-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `dynamicParams` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true - Dynamic segments not included in generateStaticParams will be generated on demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tF154" prefix="r3279" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9273477680724532279"],"question":[0,"What happens when `dynamicParams = false`?"],"answer":[0,"Dynamic segments not included in generateStaticParams will return a 404 error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-false"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-false" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-false" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when `dynamicParams = false`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic segments not included in generateStaticParams will return a 404 error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zn80iE" prefix="r3280" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9786047885983031375"],"question":[0,"What are all possible values for the `dynamic` route segment config option?"],"answer":[0,"'auto' | 'force-dynamic' | 'error' | 'force-static'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-possible-values-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-possible-values-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-possible-values-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all possible values for the `dynamic` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' | 'force-dynamic' | 'error' | 'force-static'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfmP4b" prefix="r3281" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10079628119808742007"],"question":[0,"What error message do you get when using `fetchCache = 'only-cache'` and a fetch uses `cache: 'no-store'`?"],"answer":[0,"It causes an error if any fetch requests use cache: 'no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-message-do-you-get-when-using-fetchcache-only-cache-and-a-fetch-uses-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-message-do-you-get-when-using-fetchcache-only-cache-and-a-fetch-uses-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-message-do-you-get-when-using-fetchcache-only-cache-and-a-fetch-uses-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error message do you get when using `fetchCache = 'only-cache'` and a fetch uses `cache: 'no-store'`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It causes an error if any fetch requests use cache: 'no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17TsNP" prefix="r3282" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11309971954150029546"],"question":[0,"What is the default value of `maxDuration` on Vercel's Free/Hobby plan?"],"answer":[0,"10 seconds is the default maximum duration on Vercel's Hobby/Free plan."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-maxduration-on-vercel-s-free-hobby-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-maxduration-on-vercel-s-free-hobby-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-maxduration-on-vercel-s-free-hobby-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `maxDuration` on Vercel's Free/Hobby plan?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>10 seconds is the default maximum duration on Vercel's Hobby/Free plan.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wxYQ4" prefix="r3283" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11716279031710512004"],"question":[0,"What error message do you get when using `fetchCache = 'only-no-store'` and a fetch uses `cache: 'force-cache'`?"],"answer":[0,"It causes an error if any fetch requests use cache: 'force-cache'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-message-do-you-get-when-using-fetchcache-only-no-store-and-a-fetch-us"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-message-do-you-get-when-using-fetchcache-only-no-store-and-a-fetch-us" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-message-do-you-get-when-using-fetchcache-only-no-store-and-a-fetch-us" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error message do you get when using `fetchCache = 'only-no-store'` and a fetch uses `cache: 'force-cache'`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It causes an error if any fetch requests use cache: 'force-cache'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2o1Vxd" prefix="r3284" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11804669543501012861"],"question":[0,"Does the `revalidate` route segment config work in development mode?"],"answer":[0,"No. In development mode, pages are always rendered on-demand and never cached. This allows you to see changes immediately without waiting for a revalidation period to pass."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-revalidate-route-segment-config-work-in-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-revalidate-route-segment-config-work-in-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-revalidate-route-segment-config-work-in-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the `revalidate` route segment config work in development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. In development mode, pages are always rendered on-demand and never cached. This allows you to see changes immediately without waiting for a revalidation period to pass.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zn7qME" prefix="r3285" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12842360183842480383"],"question":[0,"What are all possible values for the `preferredRegion` route segment config option?"],"answer":[0,"'auto' | 'global' | 'home' | string[] (array of region codes like ['iad1', 'sfo1'])"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-possible-values-for-the-preferredregion-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-possible-values-for-the-preferredregion-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-possible-values-for-the-preferredregion-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all possible values for the `preferredRegion` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' | 'global' | 'home' | string[] (array of region codes like ['iad1', 'sfo1'])</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28P4bz" prefix="r3286" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13115686220830502768"],"question":[0,"When you have different `revalidate` values across parent layouts and child pages, which value is used?"],"answer":[0,"The lowest revalidate value across each layout and page of a single route will determine the revalidation frequency of the entire route. This ensures that child pages are revalidated as frequently as their parent layouts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"when-you-have-different-revalidate-values-across-parent-layouts-and-child-pages-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-you-have-different-revalidate-values-across-parent-layouts-and-child-pages-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-you-have-different-revalidate-values-across-parent-layouts-and-child-pages-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When you have different `revalidate` values across parent layouts and child pages, which value is used?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lowest revalidate value across each layout and page of a single route will determine the revalidation frequency of the entire route. This ensures that child pages are revalidated as frequently as their parent layouts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="P03d6" prefix="r3287" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13130240463269769113"],"question":[0,"What does `fetchCache = 'force-no-store'` do?"],"answer":[0,"It ensures all fetch requests opt out of caching by setting the cache option of all fetch requests to 'no-store', equivalent to { cache: 'no-store', next: { revalidate: 0 } }, regardless of what individual fetch requests specify."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-force-no-store-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-force-no-store-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-force-no-store-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `fetchCache = 'force-no-store'` do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures all fetch requests opt out of caching by setting the cache option of all fetch requests to 'no-store', equivalent to { cache: 'no-store', next: { revalidate: 0 } }, regardless of what individual fetch requests specify.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BMsQ5" prefix="r3288" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13187841830186528865"],"question":[0,"What is the intention of the 'only-*' and 'force-*' fetchCache options?"],"answer":[0,"The intention is to guarantee the whole route is either fully static or fully dynamic. A combination of 'force-cache' and 'force-no-store' in a single route is not allowed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-intention-of-the-only-and-force-fetchcache-options"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-intention-of-the-only-and-force-fetchcache-options" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-intention-of-the-only-and-force-fetchcache-options" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the intention of the 'only-*' and 'force-*' fetchCache options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The intention is to guarantee the whole route is either fully static or fully dynamic. A combination of 'force-cache' and 'force-no-store' in a single route is not allowed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjS1kH" prefix="r3289" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13474216940607119383"],"question":[0,"What does `fetchCache = 'auto'` do with respect to Dynamic APIs?"],"answer":[0,"It caches any fetch() requests that are reachable before any Dynamic APIs (like cookies(), headers()) are used and will not cache fetch requests that are discovered after Dynamic APIs are used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-auto-do-with-respect-to-dynamic-apis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-auto-do-with-respect-to-dynamic-apis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-auto-do-with-respect-to-dynamic-apis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `fetchCache = 'auto'` do with respect to Dynamic APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It caches any fetch() requests that are reachable before any Dynamic APIs (like cookies(), headers()) are used and will not cache fetch requests that are discovered after Dynamic APIs are used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1A7Hdf" prefix="r3290" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13872166038422205733"],"question":[0,"What is the default value of the `fetchCache` route segment config option?"],"answer":[0,"'auto' - This caches fetch requests before Dynamic APIs with the cache option they provide and does not cache fetch requests after Dynamic APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-fetchcache-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-fetchcache-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-fetchcache-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `fetchCache` route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' - This caches fetch requests before Dynamic APIs with the cache option they provide and does not cache fetch requests after Dynamic APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZT0tHo" prefix="r3291" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15118977370886448457"],"question":[0,"What is a known issue with `dynamicParams = false` when `generateStaticParams` returns an empty array?"],"answer":[0,"If generateStaticParams returns an empty array, it invalidates dynamicParams = false, causing all routes to return an empty page instead of 404ing. This only works correctly when generateStaticParams returns at least one slug."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/57996"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-known-issue-with-dynamicparams-false-when-generatestaticparams-returns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-known-issue-with-dynamicparams-false-when-generatestaticparams-returns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-known-issue-with-dynamicparams-false-when-generatestaticparams-returns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a known issue with `dynamicParams = false` when `generateStaticParams` returns an empty array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If generateStaticParams returns an empty array, it invalidates dynamicParams = false, causing all routes to return an empty page instead of 404ing. This only works correctly when generateStaticParams returns at least one slug.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/57996" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="package-bundling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Package Bundling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1BfSQn" prefix="r3292" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"427015765064027915"],"question":[0,"What is the syntax for configuring transpilePackages in next.config.js?"],"answer":[0,"transpilePackages: ['package-name'] as an array of package names at the root level of next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/transpilePackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-configuring-transpilepackages-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-configuring-transpilepackages-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-configuring-transpilepackages-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for configuring transpilePackages in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>transpilePackages: ['package-name'] as an array of package names at the root level of next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/transpilePackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1U91K" prefix="r3293" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1807212247485671469"],"question":[0,"Are Server Components' JavaScript bundles sent to the client in Next.js?"],"answer":[0,"No. Server Components are rendered exclusively on the server, their code is not included in the JavaScript bundle file, and they are never hydrated or re-rendered on the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-components-javascript-bundles-sent-to-the-client-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-components-javascript-bundles-sent-to-the-client-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-components-javascript-bundles-sent-to-the-client-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Components' JavaScript bundles sent to the client in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Components are rendered exclusively on the server, their code is not included in the JavaScript bundle file, and they are never hydrated or re-rendered on the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1s0DLK" prefix="r3294" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2278053470294737916"],"question":[0,"What was the experimental name of bundlePagesRouterDependencies before Next.js 15?"],"answer":[0,"Before Next.js 15, it was called experimental.bundlePagesExternals. It was renamed to bundlePagesRouterDependencies and moved from experimental to stable in v15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-experimental-name-of-bundlepagesrouterdependencies-before-next-js-1"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-experimental-name-of-bundlepagesrouterdependencies-before-next-js-1" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-experimental-name-of-bundlepagesrouterdependencies-before-next-js-1" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the experimental name of bundlePagesRouterDependencies before Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Before Next.js 15, it was called experimental.bundlePagesExternals. It was renamed to bundlePagesRouterDependencies and moved from experimental to stable in v15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zhfzr2" prefix="r3295" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2781148652606954620"],"question":[0,"Which utility libraries are automatically optimized by Next.js optimizePackageImports?"],"answer":[0,"date-fns, lodash-es, ramda, ahooks, react-use, and rxjs are automatically optimized."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"which-utility-libraries-are-automatically-optimized-by-next-js-optimizepackageim"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-utility-libraries-are-automatically-optimized-by-next-js-optimizepackageim" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-utility-libraries-are-automatically-optimized-by-next-js-optimizepackageim" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which utility libraries are automatically optimized by Next.js optimizePackageImports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>date-fns, lodash-es, ramda, ahooks, react-use, and rxjs are automatically optimized.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nXaf0" prefix="r3296" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2964476006888292787"],"question":[0,"What use cases is transpilePackages designed for?"],"answer":[0,"transpilePackages is useful for bundling external packages that are not pre-bundled, such as packages in a monorepo or ES modules imported from node_modules."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/transpilePackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-use-cases-is-transpilepackages-designed-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-use-cases-is-transpilepackages-designed-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-use-cases-is-transpilepackages-designed-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What use cases is transpilePackages designed for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>transpilePackages is useful for bundling external packages that are not pre-bundled, such as packages in a monorepo or ES modules imported from node_modules.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/transpilePackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23DX3m" prefix="r3297" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3150804385785089486"],"question":[0,"Which build tools are automatically excluded from Next.js bundling?"],"answer":[0,"webpack, typescript, prettier, eslint, postcss, and autoprefixer are automatically excluded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-build-tools-are-automatically-excluded-from-next-js-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-build-tools-are-automatically-excluded-from-next-js-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-build-tools-are-automatically-excluded-from-next-js-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which build tools are automatically excluded from Next.js bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>webpack, typescript, prettier, eslint, postcss, and autoprefixer are automatically excluded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1j1E7w" prefix="r3298" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3445890941842023379"],"question":[0,"What does serverExternalPackages do?"],"answer":[0,"It opts out specific dependencies from Server Components bundling and uses native Node.js require instead, preventing automatic bundling for packages that need Node.js-specific features."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-serverexternalpackages-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-serverexternalpackages-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-serverexternalpackages-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does serverExternalPackages do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It opts out specific dependencies from Server Components bundling and uses native Node.js require instead, preventing automatic bundling for packages that need Node.js-specific features.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NF2Fw" prefix="r3299" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3970544538427084036"],"question":[0,"Are AWS SDK packages automatically excluded from Next.js bundling?"],"answer":[0,"Yes, @aws-sdk/client-s3 and @aws-sdk/s3-presigned-post are automatically excluded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"are-aws-sdk-packages-automatically-excluded-from-next-js-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-aws-sdk-packages-automatically-excluded-from-next-js-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-aws-sdk-packages-automatically-excluded-from-next-js-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are AWS SDK packages automatically excluded from Next.js bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, @aws-sdk/client-s3 and @aws-sdk/s3-presigned-post are automatically excluded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mlKVO" prefix="r3300" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5643910784491815158"],"question":[0,"What is the syntax for configuring bundlePagesRouterDependencies in next.config.js?"],"answer":[0,"bundlePagesRouterDependencies: true as a boolean value at the root level of next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-configuring-bundlepagesrouterdependencies-in-next-config-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-configuring-bundlepagesrouterdependencies-in-next-config-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-configuring-bundlepagesrouterdependencies-in-next-config-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for configuring bundlePagesRouterDependencies in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>bundlePagesRouterDependencies: true as a boolean value at the root level of next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jij89" prefix="r3301" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5799861119540535036"],"question":[0,"What does bundlePagesRouterDependencies do when set to true?"],"answer":[0,"It enables automatic server-side dependency bundling for Pages Router applications, matching the automatic dependency bundling behavior of the App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-bundlepagesrouterdependencies-do-when-set-to-true"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-bundlepagesrouterdependencies-do-when-set-to-true" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-bundlepagesrouterdependencies-do-when-set-to-true" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does bundlePagesRouterDependencies do when set to true?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It enables automatic server-side dependency bundling for Pages Router applications, matching the automatic dependency bundling behavior of the App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1F4JY9" prefix="r3302" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6535541854363565648"],"question":[0,"What performance improvement was reported for optimizePackageImports in serverless cold starts?"],"answer":[0,"Up to 40% faster cold starts in serverless environments, with some customers reporting 90% faster reloads and 87-92% faster compilation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-5"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-improvement-was-reported-for-optimizepackageimports-in-serverle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-improvement-was-reported-for-optimizepackageimports-in-serverle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-improvement-was-reported-for-optimizepackageimports-in-serverle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance improvement was reported for optimizePackageImports in serverless cold starts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Up to 40% faster cold starts in serverless environments, with some customers reporting 90% faster reloads and 87-92% faster compilation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LznG8" prefix="r3303" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7378882182640817968"],"question":[0,"What is the difference between transpilePackages and bundlePagesRouterDependencies?"],"answer":[0,"transpilePackages is selective (you specify which packages to transpile/bundle), while bundlePagesRouterDependencies is global (automatically bundles ALL packages in Pages Router when set to true)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/package-bundling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-transpilepackages-and-bundlepagesrouterdependenci"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-transpilepackages-and-bundlepagesrouterdependenci" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-transpilepackages-and-bundlepagesrouterdependenci" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between transpilePackages and bundlePagesRouterDependencies?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>transpilePackages is selective (you specify which packages to transpile/bundle), while bundlePagesRouterDependencies is global (automatically bundles ALL packages in Pages Router when set to true).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/package-bundling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsnGok" prefix="r3304" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7424822407406698749"],"question":[0,"In which Next.js version was the modularizeImports option introduced?"],"answer":[0,"The modularizeImports option was introduced in Next.js 13.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-modularizeimports-option-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-modularizeimports-option-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-modularizeimports-option-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the modularizeImports option introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The modularizeImports option was introduced in Next.js 13.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="718XI" prefix="r3305" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7428864862272590183"],"question":[0,"What is the syntax for configuring serverExternalPackages in next.config.js?"],"answer":[0,"serverExternalPackages: ['package-name'] as an array of package names at the root level of next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-configuring-serverexternalpackages-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-configuring-serverexternalpackages-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-configuring-serverexternalpackages-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for configuring serverExternalPackages in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>serverExternalPackages: ['package-name'] as an array of package names at the root level of next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EsA08" prefix="r3306" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7452311436909640058"],"question":[0,"What is the default bundling behavior for packages imported in Next.js App Router Server Components and Route Handlers?"],"answer":[0,"Dependencies imported inside Server Components and Route Handlers are automatically bundled by Next.js by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bundling-behavior-for-packages-imported-in-next-js-app-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bundling-behavior-for-packages-imported-in-next-js-app-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bundling-behavior-for-packages-imported-in-next-js-app-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bundling behavior for packages imported in Next.js App Router Server Components and Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dependencies imported inside Server Components and Route Handlers are automatically bundled by Next.js by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5vJMU" prefix="r3307" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7732239468408995499"],"question":[0,"Name 10 packages that are automatically excluded from bundling by Next.js serverExternalPackages."],"answer":[0,"@prisma/client, sharp, mongodb, mongoose, bcrypt, @node-rs/bcrypt, argon2, canvas, sqlite3, pg, playwright, puppeteer, cypress, webpack, typescript, eslint, prettier, jest, and approximately 80+ total packages are pre-excluded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"name-10-packages-that-are-automatically-excluded-from-bundling-by-next-js-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="name-10-packages-that-are-automatically-excluded-from-bundling-by-next-js-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#name-10-packages-that-are-automatically-excluded-from-bundling-by-next-js-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Name 10 packages that are automatically excluded from bundling by Next.js serverExternalPackages.</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@prisma/client, sharp, mongodb, mongoose, bcrypt, @node-rs/bcrypt, argon2, canvas, sqlite3, pg, playwright, puppeteer, cypress, webpack, typescript, eslint, prettier, jest, and approximately 80+ total packages are pre-excluded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="smaEL" prefix="r3308" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7789938654901918406"],"question":[0,"Which UI framework packages are automatically optimized by Next.js optimizePackageImports?"],"answer":[0,"antd, react-bootstrap, @headlessui/react, @tremor/react, @mui/material, and @material-ui/core are automatically optimized."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"which-ui-framework-packages-are-automatically-optimized-by-next-js-optimizepacka"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-ui-framework-packages-are-automatically-optimized-by-next-js-optimizepacka" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-ui-framework-packages-are-automatically-optimized-by-next-js-optimizepacka" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which UI framework packages are automatically optimized by Next.js optimizePackageImports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>antd, react-bootstrap, @headlessui/react, @tremor/react, @mui/material, and @material-ui/core are automatically optimized.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Q4nIW" prefix="r3309" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8981999599599159494"],"question":[0,"Can you use transpilePackages and bundlePagesRouterDependencies together?"],"answer":[0,"Yes. When bundlePagesRouterDependencies is enabled, you can opt specific packages out of automatic bundling using the serverExternalPackages option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-transpilepackages-and-bundlepagesrouterdependencies-together"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-transpilepackages-and-bundlepagesrouterdependencies-together" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-transpilepackages-and-bundlepagesrouterdependencies-together" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use transpilePackages and bundlePagesRouterDependencies together?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. When bundlePagesRouterDependencies is enabled, you can opt specific packages out of automatic bundling using the serverExternalPackages option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/bundlePagesRouterDependencies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z203iuS" prefix="r3310" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9211244640030939895"],"question":[0,"Which testing frameworks are automatically excluded from Next.js bundling?"],"answer":[0,"jest, cypress, playwright, and playwright-core are automatically excluded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-testing-frameworks-are-automatically-excluded-from-next-js-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-testing-frameworks-are-automatically-excluded-from-next-js-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-testing-frameworks-are-automatically-excluded-from-next-js-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which testing frameworks are automatically excluded from Next.js bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>jest, cypress, playwright, and playwright-core are automatically excluded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1X1eVR" prefix="r3311" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9779709643465732810"],"question":[0,"What is the default bundling behavior for packages in the Next.js Pages Router?"],"answer":[0,"By default, packages imported into the Pages Router are NOT bundled. The bundlePagesRouterDependencies option defaults to false (or undefined)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/package-bundling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bundling-behavior-for-packages-in-the-next-js-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bundling-behavior-for-packages-in-the-next-js-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bundling-behavior-for-packages-in-the-next-js-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bundling behavior for packages in the Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, packages imported into the Pages Router are NOT bundled. The bundlePagesRouterDependencies option defaults to false (or undefined).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/package-bundling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25rTp" prefix="r3312" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9848553325012547781"],"question":[0,"What was the experimental name of serverExternalPackages before Next.js 15?"],"answer":[0,"Before Next.js 15, it was called experimental.serverComponentsExternalPackages. It was renamed to serverExternalPackages and moved from experimental to stable in v15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-experimental-name-of-serverexternalpackages-before-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-experimental-name-of-serverexternalpackages-before-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-experimental-name-of-serverexternalpackages-before-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the experimental name of serverExternalPackages before Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Before Next.js 15, it was called experimental.serverComponentsExternalPackages. It was renamed to serverExternalPackages and moved from experimental to stable in v15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrqjkX" prefix="r3313" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10227243701046951591"],"question":[0,"Which security libraries are automatically excluded from Next.js bundling?"],"answer":[0,"bcrypt, @node-rs/bcrypt, argon2, and @node-rs/argon2 are automatically excluded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-security-libraries-are-automatically-excluded-from-next-js-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-security-libraries-are-automatically-excluded-from-next-js-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-security-libraries-are-automatically-excluded-from-next-js-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which security libraries are automatically excluded from Next.js bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>bcrypt, @node-rs/bcrypt, argon2, and @node-rs/argon2 are automatically excluded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eqHG2" prefix="r3314" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10707480465471987860"],"question":[0,"Is sharp automatically excluded from Next.js bundling?"],"answer":[0,"Yes, sharp is in the list of approximately 80+ packages automatically excluded from bundling via serverExternalPackages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"is-sharp-automatically-excluded-from-next-js-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-sharp-automatically-excluded-from-next-js-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-sharp-automatically-excluded-from-next-js-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is sharp automatically excluded from Next.js bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, sharp is in the list of approximately 80+ packages automatically excluded from bundling via serverExternalPackages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rIXi8" prefix="r3315" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11191769415932234400"],"question":[0,"What package does Next.js's transpilePackages option replace?"],"answer":[0,"The transpilePackages option replaces the next-transpile-modules package, which is now deprecated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-does-next-js-s-transpilepackages-option-replace"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-does-next-js-s-transpilepackages-option-replace" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-does-next-js-s-transpilepackages-option-replace" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package does Next.js's transpilePackages option replace?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The transpilePackages option replaces the next-transpile-modules package, which is now deprecated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qYt3N" prefix="r3316" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11623239018290429183"],"question":[0,"In which Next.js version was the optimizePackageImports option introduced?"],"answer":[0,"The optimizePackageImports option was introduced in Next.js 13.5."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-5"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-optimizepackageimports-option-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-optimizepackageimports-option-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-optimizepackageimports-option-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the optimizePackageImports option introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The optimizePackageImports option was introduced in Next.js 13.5.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xQR5n" prefix="r3317" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11730389596585594872"],"question":[0,"How does optimizePackageImports detect barrel files?"],"answer":[0,"When enabled, Next.js analyzes the entry file to determine if it's a barrel file, then automatically maps all imports on the fly, recursively handling nested barrel files in one pass."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-5"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-optimizepackageimports-detect-barrel-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-optimizepackageimports-detect-barrel-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-optimizepackageimports-detect-barrel-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does optimizePackageImports detect barrel files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When enabled, Next.js analyzes the entry file to determine if it's a barrel file, then automatically maps all imports on the fly, recursively handling nested barrel files in one pass.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSX2jD" prefix="r3318" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12174106744847742024"],"question":[0,"Which icon libraries are automatically optimized by Next.js optimizePackageImports?"],"answer":[0,"@heroicons/react (multiple versions including /20/solid, /24/solid, /24/outline), @ant-design/icons, @material-ui/icons, @tabler/icons-react, react-icons/*, and lucide-react."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"which-icon-libraries-are-automatically-optimized-by-next-js-optimizepackageimpor"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-icon-libraries-are-automatically-optimized-by-next-js-optimizepackageimpor" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-icon-libraries-are-automatically-optimized-by-next-js-optimizepackageimpor" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which icon libraries are automatically optimized by Next.js optimizePackageImports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@heroicons/react (multiple versions including /20/solid, /24/solid, /24/outline), @ant-design/icons, @material-ui/icons, @tabler/icons-react, react-icons/*, and lucide-react.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14uvn0" prefix="r3319" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12512976486405829517"],"question":[0,"In which Next.js version was the transpilePackages option introduced?"],"answer":[0,"The transpilePackages option was introduced in Next.js 13.1 (released December 22, 2022)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-transpilepackages-option-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-transpilepackages-option-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-transpilepackages-option-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the transpilePackages option introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The transpilePackages option was introduced in Next.js 13.1 (released December 22, 2022).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z67ekp" prefix="r3320" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13129299374360682327"],"question":[0,"Are Client Components' JavaScript bundles sent to the client in Next.js?"],"answer":[0,"Yes. Client Components include a bundle of JavaScript that drives the component, which is sent to the client. All child components and modules imported into a 'use client' boundary are considered part of the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"are-client-components-javascript-bundles-sent-to-the-client-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-client-components-javascript-bundles-sent-to-the-client-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-client-components-javascript-bundles-sent-to-the-client-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Client Components' JavaScript bundles sent to the client in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Client Components include a bundle of JavaScript that drives the component, which is sent to the client. All child components and modules imported into a 'use client' boundary are considered part of the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="132LPG" prefix="r3321" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13269909256963206983"],"question":[0,"Which AI/ML packages are automatically excluded from Next.js bundling?"],"answer":[0,"@huggingface/transformers and @xenova/transformers are automatically excluded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-ai-ml-packages-are-automatically-excluded-from-next-js-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-ai-ml-packages-are-automatically-excluded-from-next-js-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-ai-ml-packages-are-automatically-excluded-from-next-js-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which AI/ML packages are automatically excluded from Next.js bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@huggingface/transformers and @xenova/transformers are automatically excluded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ihFw" prefix="r3322" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15030401934846514666"],"question":[0,"Does optimizePackageImports work with barrel files in your own project source code?"],"answer":[0,"No. optimizePackageImports is specifically for optimizing EXTERNAL packages from node_modules, not your own barrel files in your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/blog/how-we-optimized-package-imports-in-next-js"]]],"topic":[0,"nextjs"],"slug":[0,"does-optimizepackageimports-work-with-barrel-files-in-your-own-project-source-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-optimizepackageimports-work-with-barrel-files-in-your-own-project-source-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-optimizepackageimports-work-with-barrel-files-in-your-own-project-source-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does optimizePackageImports work with barrel files in your own project source code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. optimizePackageImports is specifically for optimizing EXTERNAL packages from node_modules, not your own barrel files in your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/blog/how-we-optimized-package-imports-in-next-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bzipr" prefix="r3323" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15091510814944763740"],"question":[0,"Is optimizePackageImports stable or experimental as of Next.js 14 and 15?"],"answer":[0,"optimizePackageImports remains an experimental feature and must be configured under experimental.optimizePackageImports in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"is-optimizepackageimports-stable-or-experimental-as-of-next-js-14-and-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-optimizepackageimports-stable-or-experimental-as-of-next-js-14-and-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-optimizepackageimports-stable-or-experimental-as-of-next-js-14-and-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is optimizePackageImports stable or experimental as of Next.js 14 and 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>optimizePackageImports remains an experimental feature and must be configured under experimental.optimizePackageImports in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="data-fetching-caching-deduplication" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Data Fetching > Caching & Deduplication</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2nuzfk" prefix="r3324" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"503383503718058572"],"question":[0,"Does request memoization apply to Route Handlers in Next.js?"],"answer":[0,"No, request memoization does not apply to fetch requests in Route Handlers because Route Handlers are not part of the React component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-request-memoization-apply-to-route-handlers-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-request-memoization-apply-to-route-handlers-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-request-memoization-apply-to-route-handlers-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does request memoization apply to Route Handlers in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, request memoization does not apply to fetch requests in Route Handlers because Route Handlers are not part of the React component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NTbAn" prefix="r3325" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"991171075387072298"],"question":[0,"What is the maximum number of cache tags allowed per fetch request?"],"answer":[0,"The maximum number of tag items is 128."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-cache-tags-allowed-per-fetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-cache-tags-allowed-per-fetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-cache-tags-allowed-per-fetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of cache tags allowed per fetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The maximum number of tag items is 128.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="260Kg" prefix="r3326" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1546696419094551818"],"question":[0,"What is the default caching behavior for fetch requests in Next.js 15?"],"answer":[0,"fetch requests are not cached by default. This changed from Next.js 14 where fetch was cached by default with 'force-cache'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch requests in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fetch requests are not cached by default. This changed from Next.js 14 where fetch was cached by default with 'force-cache'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zt1Kfq" prefix="r3327" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1895390580854605525"],"question":[0,"Is fetch caching supported in Next.js Proxy (Middleware)?"],"answer":[0,"No, fetch caching is not supported in proxy. Any fetches done inside of your proxy will be uncached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"is-fetch-caching-supported-in-next-js-proxy-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-fetch-caching-supported-in-next-js-proxy-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-fetch-caching-supported-in-next-js-proxy-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is fetch caching supported in Next.js Proxy (Middleware)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, fetch caching is not supported in proxy. Any fetches done inside of your proxy will be uncached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ua7a3" prefix="r3328" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2215860851855849818"],"question":[0,"Does using dynamic APIs like cookies() or headers() affect the Full Route Cache?"],"answer":[0,"Yes, using dynamic APIs like cookies, headers, or the searchParams prop will opt a route out of the Full Route Cache, causing the route to be dynamically rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-dynamic-apis-like-cookies-or-headers-affect-the-full-route-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-dynamic-apis-like-cookies-or-headers-affect-the-full-route-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-dynamic-apis-like-cookies-or-headers-affect-the-full-route-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using dynamic APIs like cookies() or headers() affect the Full Route Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, using dynamic APIs like cookies, headers, or the searchParams prop will opt a route out of the Full Route Cache, causing the route to be dynamically rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3cl8G" prefix="r3329" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2289187667382937686"],"question":[0,"What does setting revalidate: 0 in a fetch request do?"],"answer":[0,"Setting revalidate: 0 prevents the resource from being cached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-revalidate-0-in-a-fetch-request-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-revalidate-0-in-a-fetch-request-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-revalidate-0-in-a-fetch-request-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting revalidate: 0 in a fetch request do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting revalidate: 0 prevents the resource from being cached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hDkdg" prefix="r3330" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2655279834068873784"],"question":[0,"What is the maximum length for a cache tag in Next.js?"],"answer":[0,"The maximum length for a cache tag is 256 characters and the value is case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-length-for-a-cache-tag-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-length-for-a-cache-tag-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-length-for-a-cache-tag-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum length for a cache tag in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The maximum length for a cache tag is 256 characters and the value is case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vPgqv" prefix="r3331" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3007336077761193003"],"question":[0,"What is the key difference between updateTag() and revalidateTag()?"],"answer":[0,"updateTag() immediately expires cached data and waits for fresh data before responding (for read-your-own-writes scenarios), while revalidateTag() can serve cached data with background refresh when using profile='max'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-key-difference-between-updatetag-and-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-key-difference-between-updatetag-and-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-key-difference-between-updatetag-and-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the key difference between updateTag() and revalidateTag()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateTag() immediately expires cached data and waits for fresh data before responding (for read-your-own-writes scenarios), while revalidateTag() can serve cached data with background refresh when using profile='max'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gPI6Q" prefix="r3332" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3602666632110385618"],"question":[0,"Does the Data Cache persist across deployments in Next.js?"],"answer":[0,"Yes, the Data Cache is persistent across incoming requests and deployments unless explicitly revalidated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-data-cache-persist-across-deployments-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-data-cache-persist-across-deployments-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-data-cache-persist-across-deployments-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Data Cache persist across deployments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the Data Cache is persistent across incoming requests and deployments unless explicitly revalidated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2e7njn" prefix="r3333" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3718328454511813673"],"question":[0,"When a lower fetch-level revalidate value conflicts with a route-level revalidate, which one takes precedence?"],"answer":[0,"Lower fetch-level revalidate values override route defaults. The lowest revalidate across each layout and page of a single route determines the revalidation frequency of the entire route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"when-a-lower-fetch-level-revalidate-value-conflicts-with-a-route-level-revalidat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-a-lower-fetch-level-revalidate-value-conflicts-with-a-route-level-revalidat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-a-lower-fetch-level-revalidate-value-conflicts-with-a-route-level-revalidat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When a lower fetch-level revalidate value conflicts with a route-level revalidate, which one takes precedence?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Lower fetch-level revalidate values override route defaults. The lowest revalidate across each layout and page of a single route determines the revalidation frequency of the entire route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1FD39t" prefix="r3334" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3800786451264101760"],"question":[0,"How can you opt out of automatic request deduplication in Next.js?"],"answer":[0,"You can opt out by passing an AbortController signal to fetch, though this will abort the requests rather than prevent memoization."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-opt-out-of-automatic-request-deduplication-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-opt-out-of-automatic-request-deduplication-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-opt-out-of-automatic-request-deduplication-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you opt out of automatic request deduplication in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can opt out by passing an AbortController signal to fetch, though this will abort the requests rather than prevent memoization.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dqhmK" prefix="r3335" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4520108341536491154"],"question":[0,"What is the default staleTime for dynamic pages in the Router Cache in Next.js 15?"],"answer":[0,"In Next.js 15, the default staleTime for dynamic pages is 0 seconds (not cached). This changed from 30 seconds in Next.js 14."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-dynamic-pages-in-the-router-cache-in-next-js-1"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-dynamic-pages-in-the-router-cache-in-next-js-1" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-dynamic-pages-in-the-router-cache-in-next-js-1" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for dynamic pages in the Router Cache in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, the default staleTime for dynamic pages is 0 seconds (not cached). This changed from 30 seconds in Next.js 14.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ugvoS" prefix="r3336" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4587270321243995790"],"question":[0,"What is the duration of request memoization in Next.js?"],"answer":[0,"Request memoization is scoped to the lifetime of a request, meaning it only lasts until the React component tree has finished rendering. Once the route has been rendered, memory is reset and all request memoization entries are cleared."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-duration-of-request-memoization-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-duration-of-request-memoization-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-duration-of-request-memoization-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the duration of request memoization in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization is scoped to the lifetime of a request, meaning it only lasts until the React component tree has finished rendering. Once the route has been rendered, memory is reset and all request memoization entries are cleared.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LTvES" prefix="r3337" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4940798370380240723"],"question":[0,"Does fetch with cache: 'no-store' still benefit from request memoization?"],"answer":[0,"Yes, even when using cache: 'no-store', the fetch is still memoized during the render pass."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-fetch-with-cache-no-store-still-benefit-from-request-memoization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-fetch-with-cache-no-store-still-benefit-from-request-memoization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-fetch-with-cache-no-store-still-benefit-from-request-memoization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does fetch with cache: 'no-store' still benefit from request memoization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, even when using cache: 'no-store', the fetch is still memoized during the render pass.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IJEC7" prefix="r3338" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5048939869044503365"],"question":[0,"What happens when Data Cache is invalidated - does it affect the Full Route Cache?"],"answer":[0,"Yes, Data Cache revalidation cascades to the Full Route Cache and invalidates it as well."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-data-cache-is-invalidated-does-it-affect-the-full-route-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-data-cache-is-invalidated-does-it-affect-the-full-route-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-data-cache-is-invalidated-does-it-affect-the-full-route-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when Data Cache is invalidated - does it affect the Full Route Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Data Cache revalidation cascades to the Full Route Cache and invalidates it as well.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26TIIE" prefix="r3339" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6449629639074860602"],"question":[0,"What happens when you perform a hard refresh with cache-control: no-cache header in Next.js?"],"answer":[0,"Hard refresh requests with cache-control: no-cache bypass all caching options. In development mode, options.cache, options.next.revalidate, and options.next.tags are ignored when a request includes cache-control: no-cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-perform-a-hard-refresh-with-cache-control-no-cache-header-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-perform-a-hard-refresh-with-cache-control-no-cache-header-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-perform-a-hard-refresh-with-cache-control-no-cache-header-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you perform a hard refresh with cache-control: no-cache header in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Hard refresh requests with cache-control: no-cache bypass all caching options. In development mode, options.cache, options.next.revalidate, and options.next.tags are ignored when a request includes cache-control: no-cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZD0dfM" prefix="r3340" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7171473191030667615"],"question":[0,"What is the default caching behavior for fetch requests in Next.js 14 and earlier?"],"answer":[0,"By default, Next.js automatically caches the returned values of fetch in the Data Cache on the server. 'force-cache' was the default and could be omitted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/fetching-caching-and-revalidating"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-14-and-earlie"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-14-and-earlie" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-14-and-earlie" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch requests in Next.js 14 and earlier?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js automatically caches the returned values of fetch in the Data Cache on the server. 'force-cache' was the default and could be omitted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/fetching-caching-and-revalidating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BNOvW" prefix="r3341" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8026021690518934432"],"question":[0,"What is the default staleTime for static pages in the Router Cache?"],"answer":[0,"The default staleTime for static pages is 5 minutes (300 seconds)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-staletime-for-static-pages-in-the-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-staletime-for-static-pages-in-the-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-staletime-for-static-pages-in-the-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default staleTime for static pages in the Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default staleTime for static pages is 5 minutes (300 seconds).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KVkoy" prefix="r3342" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8339755549853225743"],"question":[0,"Does the Full Route Cache persist across deployments in Next.js?"],"answer":[0,"No, the Full Route Cache is cleared on new deployments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-full-route-cache-persist-across-deployments-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-full-route-cache-persist-across-deployments-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-full-route-cache-persist-across-deployments-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Full Route Cache persist across deployments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the Full Route Cache is cleared on new deployments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zoh0x1" prefix="r3343" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8670491303975592434"],"question":[0,"Are conflicting cache options like { revalidate: 3600, cache: 'no-store' } allowed in Next.js?"],"answer":[0,"No, conflicting options such as { revalidate: 3600, cache: 'no-store' } are not allowed. Both will be ignored, and in development mode a warning will be printed to the terminal."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"are-conflicting-cache-options-like-revalidate-3600-cache-no-store-allowed-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-conflicting-cache-options-like-revalidate-3600-cache-no-store-allowed-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-conflicting-cache-options-like-revalidate-3600-cache-no-store-allowed-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are conflicting cache options like { revalidate: 3600, cache: 'no-store' } allowed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, conflicting options such as { revalidate: 3600, cache: 'no-store' } are not allowed. Both will be ignored, and in development mode a warning will be printed to the terminal.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKgGMX" prefix="r3344" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8751983980520317527"],"question":[0,"What does setting revalidate: false in a fetch request do?"],"answer":[0,"Setting revalidate: false provides indefinite caching and is semantically equivalent to revalidate: Infinity."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-revalidate-false-in-a-fetch-request-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-revalidate-false-in-a-fetch-request-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-revalidate-false-in-a-fetch-request-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting revalidate: false in a fetch request do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting revalidate: false provides indefinite caching and is semantically equivalent to revalidate: Infinity.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bYGtD" prefix="r3345" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9067793764028249075"],"question":[0,"What happens when cache: 'force-cache' is used and there is a stale match in the cache?"],"answer":[0,"If there is a stale match, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-cache-force-cache-is-used-and-there-is-a-stale-match-in-the-ca"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-cache-force-cache-is-used-and-there-is-a-stale-match-in-the-ca" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-cache-force-cache-is-used-and-there-is-a-stale-match-in-the-ca" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when cache: 'force-cache' is used and there is a stale match in the cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If there is a stale match, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xMG3V" prefix="r3346" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9114219063658971777"],"question":[0,"What is the difference between revalidateTag with profile='max' and without a profile parameter?"],"answer":[0,"With profile='max', the tag entry is marked as stale and uses stale-while-revalidate semantics (serving stale content while fetching fresh data in background). Without the second argument (deprecated), it causes immediate expiration with blocking revalidate on next request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-revalidatetag-with-profile-max-and-without-a-prof"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-revalidatetag-with-profile-max-and-without-a-prof" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-revalidatetag-with-profile-max-and-without-a-prof" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between revalidateTag with profile='max' and without a profile parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With profile='max', the tag entry is marked as stale and uses stale-while-revalidate semantics (serving stale content while fetching fresh data in background). Without the second argument (deprecated), it causes immediate expiration with blocking revalidate on next request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrLTcV" prefix="r3347" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9649977153339229430"],"question":[0,"When multiple fetch requests have different revalidate values in a statically rendered route, which value is used?"],"answer":[0,"When multiple fetch requests have different revalidate values in a statically rendered route, the lowest time will be used for all requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/fetching-caching-and-revalidating"]]],"topic":[0,"nextjs"],"slug":[0,"when-multiple-fetch-requests-have-different-revalidate-values-in-a-statically-re"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-multiple-fetch-requests-have-different-revalidate-values-in-a-statically-re" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-multiple-fetch-requests-have-different-revalidate-values-in-a-statically-re" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When multiple fetch requests have different revalidate values in a statically rendered route, which value is used?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When multiple fetch requests have different revalidate values in a statically rendered route, the lowest time will be used for all requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/fetching-caching-and-revalidating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jTzCa" prefix="r3348" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9958314227971065731"],"question":[0,"What is the default behavior of cache: 'auto' during development in Next.js?"],"answer":[0,"With cache: 'auto' in development, Next.js fetches the resource from the remote server on every request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-behavior-of-cache-auto-during-development-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-behavior-of-cache-auto-during-development-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-behavior-of-cache-auto-during-development-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default behavior of cache: 'auto' during development in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With cache: 'auto' in development, Next.js fetches the resource from the remote server on every request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1BlSop" prefix="r3349" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10100640044945714495"],"question":[0,"What is the required API signature for revalidateTag in Next.js 16?"],"answer":[0,"In Next.js 16, revalidateTag() requires two parameters: revalidateTag(tag: string, profile: string | { expire?: number }). The recommended value for profile is 'max'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-api-signature-for-revalidatetag-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-api-signature-for-revalidatetag-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-api-signature-for-revalidatetag-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required API signature for revalidateTag in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 16, revalidateTag() requires two parameters: revalidateTag(tag: string, profile: string | { expire?: number }). The recommended value for profile is 'max'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHLEOe" prefix="r3350" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10116550148472176649"],"question":[0,"How long are loading.js files cached in the Router Cache?"],"answer":[0,"loading.js remains cached for 5 minutes (or the value of the staleTimes.static configuration)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-are-loading-js-files-cached-in-the-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-are-loading-js-files-cached-in-the-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-are-loading-js-files-cached-in-the-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long are loading.js files cached in the Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js remains cached for 5 minutes (or the value of the staleTimes.static configuration).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="O4HOI" prefix="r3351" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11009895178086793001"],"question":[0,"Are POST method fetch requests cached in the Data Cache?"],"answer":[0,"Yes, fetch requests that use the POST method are automatically cached in the Data Cache, unless it's inside a Route Handler that uses the POST method, then it will not be cached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"are-post-method-fetch-requests-cached-in-the-data-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-post-method-fetch-requests-cached-in-the-data-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-post-method-fetch-requests-cached-in-the-data-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are POST method fetch requests cached in the Data Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, fetch requests that use the POST method are automatically cached in the Data Cache, unless it's inside a Route Handler that uses the POST method, then it will not be cached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tXbF7" prefix="r3352" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11329842280487376635"],"question":[0,"What is the default behavior of cache: 'auto' at build time in Next.js?"],"answer":[0,"At build time with cache: 'auto', Next.js fetches once during next build because the route will be statically prerendered, unless Dynamic APIs are detected."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-behavior-of-cache-auto-at-build-time-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-behavior-of-cache-auto-at-build-time-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-behavior-of-cache-auto-at-build-time-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default behavior of cache: 'auto' at build time in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At build time with cache: 'auto', Next.js fetches once during next build because the route will be statically prerendered, unless Dynamic APIs are detected.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2p53Bq" prefix="r3353" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13194789490897115363"],"question":[0,"In what version of Next.js was the fetch() function introduced?"],"answer":[0,"The Next.js extended fetch() API was introduced in version 13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-version-of-next-js-was-the-fetch-function-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-version-of-next-js-was-the-fetch-function-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-version-of-next-js-was-the-fetch-function-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what version of Next.js was the fetch() function introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Next.js extended fetch() API was introduced in version 13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1j4Oe3" prefix="r3354" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14027105297796500824"],"question":[0,"What React function can be used to memoize database or ORM queries in Next.js?"],"answer":[0,"You can use the React cache function from 'react' to wrap database queries and achieve memoization for the lifetime of a server request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-function-can-be-used-to-memoize-database-or-orm-queries-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-function-can-be-used-to-memoize-database-or-orm-queries-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-function-can-be-used-to-memoize-database-or-orm-queries-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React function can be used to memoize database or ORM queries in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use the React cache function from 'react' to wrap database queries and achieve memoization for the lifetime of a server request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NtWpt" prefix="r3355" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14840789673157965835"],"question":[0,"What HTTP methods support automatic request memoization in Next.js?"],"answer":[0,"Request memoization applies to fetch calls using GET or HEAD methods with the same URL and options in a single render pass."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-support-automatic-request-memoization-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-support-automatic-request-memoization-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-support-automatic-request-memoization-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods support automatic request memoization in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization applies to fetch calls using GET or HEAD methods with the same URL and options in a single render pass.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="edge-runtime-runtime-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Edge Runtime > Runtime Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 32 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z15UMmK" prefix="r3356" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"513179606153656353"],"question":[0,"What does dynamic: 'force-static' do to cookies(), headers(), and useSearchParams()?"],"answer":[0,"It forces static rendering and makes cookies(), headers(), and useSearchParams() return empty values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-force-static-do-to-cookies-headers-and-usesearchparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-force-static-do-to-cookies-headers-and-usesearchparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-force-static-do-to-cookies-headers-and-usesearchparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic: 'force-static' do to cookies(), headers(), and useSearchParams()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces static rendering and makes cookies(), headers(), and useSearchParams() return empty values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZO6I6G" prefix="r3357" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"704277045679172834"],"question":[0,"What does revalidate: false mean?"],"answer":[0,"It caches indefinitely using default heuristics, though individual fetch requests can override this."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-false-mean"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-false-mean" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-false-mean" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidate: false mean?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It caches indefinitely using default heuristics, though individual fetch requests can override this.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jeUbH" prefix="r3358" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"763892622416202860"],"question":[0,"Must the revalidate value be statically analyzable?"],"answer":[0,"Yes. The revalidation value must be statically analyzable. For example, revalidate = 600 works, but revalidate = 60 * 10 does not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"must-the-revalidate-value-be-statically-analyzable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-the-revalidate-value-be-statically-analyzable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-the-revalidate-value-be-statically-analyzable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must the revalidate value be statically analyzable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The revalidation value must be statically analyzable. For example, revalidate = 600 works, but revalidate = 60 * 10 does not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="oh4cY" prefix="r3359" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2500462645519545511"],"question":[0,"In which file types can you export the runtime configuration?"],"answer":[0,"layout.tsx/layout.js, page.tsx/page.js, and route.ts/route.js files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-file-types-can-you-export-the-runtime-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-file-types-can-you-export-the-runtime-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-file-types-can-you-export-the-runtime-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which file types can you export the runtime configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>layout.tsx/layout.js, page.tsx/page.js, and route.ts/route.js files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tgUqU" prefix="r3360" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2774303011620753859"],"question":[0,"What is the default value for preferredRegion?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-preferredregion"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-preferredregion" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-preferredregion" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for preferredRegion?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hL9n5" prefix="r3361" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2819380846261352714"],"question":[0,"Can you use the revalidate option when runtime is set to 'edge'?"],"answer":[0,"No. The revalidate value is not available when using runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-revalidate-option-when-runtime-is-set-to-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-revalidate-option-when-runtime-is-set-to-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-revalidate-option-when-runtime-is-set-to-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the revalidate option when runtime is set to 'edge'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The revalidate value is not available when using runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1idoFB" prefix="r3362" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3293400280770548014"],"question":[0,"What environment variable value indicates code is running in Edge Runtime?"],"answer":[0,"process.env.NEXT_RUNTIME === 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-value-indicates-code-is-running-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-value-indicates-code-is-running-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-value-indicates-code-is-running-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable value indicates code is running in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>process.env.NEXT_RUNTIME === 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fcKmP" prefix="r3363" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4578822432150752657"],"question":[0,"What is the default runtime if no runtime is explicitly configured in a route segment?"],"answer":[0,"'nodejs' - If the segment runtime is not set, the default nodejs runtime will be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-if-no-runtime-is-explicitly-configured-in-a-route-se"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-if-no-runtime-is-explicitly-configured-in-a-route-se" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-if-no-runtime-is-explicitly-configured-in-a-route-se" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime if no runtime is explicitly configured in a route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' - If the segment runtime is not set, the default nodejs runtime will be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NW3Sg" prefix="r3364" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5657935487867193022"],"question":[0,"What is the type definition for the preferredRegion route segment config option?"],"answer":[0,"'auto' | 'global' | 'home' | string | string[] - It can be a single string or an array of region strings."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-definition-for-the-preferredregion-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-definition-for-the-preferredregion-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-definition-for-the-preferredregion-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type definition for the preferredRegion route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' | 'global' | 'home' | string | string[] - It can be a single string or an array of region strings.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oW90c" prefix="r3365" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5734570429664893245"],"question":[0,"Are native Node.js APIs like filesystem operations supported in Edge Runtime?"],"answer":[0,"No. Native Node.js APIs are not supported. For example, you can't read or write to the filesystem."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-native-node-js-apis-like-filesystem-operations-supported-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-native-node-js-apis-like-filesystem-operations-supported-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-native-node-js-apis-like-filesystem-operations-supported-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are native Node.js APIs like filesystem operations supported in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Native Node.js APIs are not supported. For example, you can't read or write to the filesystem.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ANhTw" prefix="r3366" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6049367475437436106"],"question":[0,"What are the valid values for the revalidate route segment config option?"],"answer":[0,"false | 0 | number (in seconds) with false being the default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-revalidate-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-revalidate-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-revalidate-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the revalidate route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false | 0 | number (in seconds) with false being the default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RO6gW" prefix="r3367" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6173049987457777041"],"question":[0,"What is the exact export syntax for configuring a route to use the Edge Runtime?"],"answer":[0,"export const runtime = 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-export-syntax-for-configuring-a-route-to-use-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-export-syntax-for-configuring-a-route-to-use-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-export-syntax-for-configuring-a-route-to-use-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact export syntax for configuring a route to use the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export const runtime = 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnU6nV" prefix="r3368" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6933744067218468811"],"question":[0,"What happens when dynamicParams is false and a dynamic segment is not in generateStaticParams?"],"answer":[0,"It returns a 404 response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-false-and-a-dynamic-segment-is-not-in-generat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-false-and-a-dynamic-segment-is-not-in-generat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-false-and-a-dynamic-segment-is-not-in-generat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is false and a dynamic segment is not in generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It returns a 404 response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGUUkd" prefix="r3369" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7066032615824690179"],"question":[0,"What is the unstable_allowDynamic configuration option used for?"],"answer":[0,"It accepts glob patterns (relative to application root) to allow specific files or modules that would otherwise trigger dynamic code evaluation errors in Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-unstable-allowdynamic-configuration-option-used-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-unstable-allowdynamic-configuration-option-used-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-unstable-allowdynamic-configuration-option-used-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the unstable_allowDynamic configuration option used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It accepts glob patterns (relative to application root) to allow specific files or modules that would otherwise trigger dynamic code evaluation errors in Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMcUfi" prefix="r3370" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7123326069227679155"],"question":[0,"Is AsyncLocalStorage supported in Edge Runtime?"],"answer":[0,"Yes. Next.js provides a polyfill for AsyncLocalStorage in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-asynclocalstorage-supported-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-asynclocalstorage-supported-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-asynclocalstorage-supported-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is AsyncLocalStorage supported in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Next.js provides a polyfill for AsyncLocalStorage in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDjNSg" prefix="r3371" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7413954364708633800"],"question":[0,"If a layout sets runtime to 'edge', what happens to routes under that layout?"],"answer":[0,"All routes under the layout will run on the edge runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"if-a-layout-sets-runtime-to-edge-what-happens-to-routes-under-that-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="if-a-layout-sets-runtime-to-edge-what-happens-to-routes-under-that-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#if-a-layout-sets-runtime-to-edge-what-happens-to-routes-under-that-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">If a layout sets runtime to 'edge', what happens to routes under that layout?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All routes under the layout will run on the edge runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJUEPo" prefix="r3372" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7986251577387886232"],"question":[0,"What are the valid values for the 'runtime' route segment config option?"],"answer":[0,"'nodejs' | 'edge' - The runtime export must be a string literal with a value of either 'nodejs' or 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'runtime' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' | 'edge' - The runtime export must be a string literal with a value of either 'nodejs' or 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KV443" prefix="r3373" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9086088475462320769"],"question":[0,"Is runtime: 'edge' supported for Cache Components?"],"answer":[0,"No. Using runtime: 'edge' is not supported for Cache Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-runtime-edge-supported-for-cache-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-runtime-edge-supported-for-cache-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-runtime-edge-supported-for-cache-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is runtime: 'edge' supported for Cache Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Using runtime: 'edge' is not supported for Cache Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Pa2JO" prefix="r3374" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9121856177166055342"],"question":[0,"What is the type and unit for the maxDuration route segment config?"],"answer":[0,"Number (integer) in seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-and-unit-for-the-maxduration-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-and-unit-for-the-maxduration-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-and-unit-for-the-maxduration-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type and unit for the maxDuration route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Number (integer) in seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ltG4a" prefix="r3375" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9386627736560928402"],"question":[0,"Which Network APIs are supported in Edge Runtime?"],"answer":[0,"Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, WebSocket"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-network-apis-are-supported-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-network-apis-are-supported-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-network-apis-are-supported-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Network APIs are supported in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, WebSocket</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPdCgz" prefix="r3376" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10090839442773091498"],"question":[0,"Are Route Segment Config options Server Component only or do they work in Client Components?"],"answer":[0,"Route Segment options only take effect in Server Component Pages, Layouts, or Route Handlers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"are-route-segment-config-options-server-component-only-or-do-they-work-in-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-route-segment-config-options-server-component-only-or-do-they-work-in-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-route-segment-config-options-server-component-only-or-do-they-work-in-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Route Segment Config options Server Component only or do they work in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Segment options only take effect in Server Component Pages, Layouts, or Route Handlers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkADiS" prefix="r3377" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10597534062854022315"],"question":[0,"What is the type and default value for dynamicParams?"],"answer":[0,"Boolean type with true as the default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-and-default-value-for-dynamicparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-and-default-value-for-dynamicparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-and-default-value-for-dynamicparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type and default value for dynamicParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Boolean type with true as the default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GB1Il" prefix="r3378" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11630751792904087614"],"question":[0,"What is the syntax for using unstable_allowDynamic?"],"answer":[0,"export const config = { unstable_allowDynamic: ['/lib/utilities.js', '**/node_modules/function-bind/**'] }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-using-unstable-allowdynamic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-using-unstable-allowdynamic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-using-unstable-allowdynamic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for using unstable_allowDynamic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export const config = { unstable_allowDynamic: ['/lib/utilities.js', '<strong>/node_modules/function-bind/</strong>'] }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1W0D17" prefix="r3379" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11710803274706360018"],"question":[0,"Can 'force-cache' and 'force-no-store' coexist in the same route?"],"answer":[0,"No. 'force-cache' and 'force-no-store' cannot coexist in one route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-force-cache-and-force-no-store-coexist-in-the-same-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-force-cache-and-force-no-store-coexist-in-the-same-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-force-cache-and-force-no-store-coexist-in-the-same-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can 'force-cache' and 'force-no-store' coexist in the same route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. 'force-cache' and 'force-no-store' cannot coexist in one route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZYsFL9" prefix="r3380" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12924491845302718416"],"question":[0,"Can you use process.env in Edge Runtime?"],"answer":[0,"Yes. You can use process.env to access Environment Variables for both next dev and next build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-process-env-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-process-env-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-process-env-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use process.env in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can use process.env to access Environment Variables for both next dev and next build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rKfdl" prefix="r3381" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13155957114429721791"],"question":[0,"What does revalidate: 0 do?"],"answer":[0,"It forces dynamic rendering regardless of whether Dynamic APIs are present."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-0-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-0-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-0-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidate: 0 do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces dynamic rendering regardless of whether Dynamic APIs are present.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKbLCD" prefix="r3382" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13548880430527334956"],"question":[0,"Which Crypto APIs are supported in Edge Runtime?"],"answer":[0,"crypto, CryptoKey, SubtleCrypto"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-crypto-apis-are-supported-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-crypto-apis-are-supported-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-crypto-apis-are-supported-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Crypto APIs are supported in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>crypto, CryptoKey, SubtleCrypto</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gTgjv" prefix="r3383" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13892162463867091315"],"question":[0,"What are the possible values of process.env.NEXT_RUNTIME?"],"answer":[0,"'nodejs' or 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-of-process-env-next-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-of-process-env-next-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-of-process-env-next-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values of process.env.NEXT_RUNTIME?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' or 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27rrOs" prefix="r3384" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14136251073403891111"],"question":[0,"Which Stream APIs are supported in Edge Runtime?"],"answer":[0,"ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultWriter"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-stream-apis-are-supported-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-stream-apis-are-supported-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-stream-apis-are-supported-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Stream APIs are supported in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultWriter</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bTTtM" prefix="r3385" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14357423016469218049"],"question":[0,"Which Encoding APIs are supported in Edge Runtime?"],"answer":[0,"atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, TextEncoderStream"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-encoding-apis-are-supported-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-encoding-apis-are-supported-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-encoding-apis-are-supported-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Encoding APIs are supported in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, TextEncoderStream</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XvVMT" prefix="r3386" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14372370198954615513"],"question":[0,"Can node_modules be used in Edge Runtime?"],"answer":[0,"Yes, node_modules can be used as long as they implement ES Modules and do not use native Node.js APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-node-modules-be-used-in-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-node-modules-be-used-in-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-node-modules-be-used-in-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can node_modules be used in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, node_modules can be used as long as they implement ES Modules and do not use native Node.js APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aDS8h" prefix="r3387" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14685786552745273684"],"question":[0,"What happened to 'experimental-edge' as a runtime value in Next.js 15?"],"answer":[0,"It was deprecated. Next.js 15 deprecated exporting 'experimental-edge' and users should now use 'edge' instead. A codemod is available to automatically migrate this."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-happened-to-experimental-edge-as-a-runtime-value-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happened-to-experimental-edge-as-a-runtime-value-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happened-to-experimental-edge-as-a-runtime-value-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happened to 'experimental-edge' as a runtime value in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It was deprecated. Next.js 15 deprecated exporting 'experimental-edge' and users should now use 'edge' instead. A codemod is available to automatically migrate this.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="routing-request-processing" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Routing > Request Processing</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 31 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZHIbSN" prefix="r3388" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"17801469480574202"],"question":[0,"Do App Router Route Handlers specify CORS headers by default?"],"answer":[0,"No, Route Handlers do not specify CORS headers by default. You must explicitly set headers like 'Access-Control-Allow-Origin' in the Response object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"do-app-router-route-handlers-specify-cors-headers-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-app-router-route-handlers-specify-cors-headers-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-app-router-route-handlers-specify-cors-headers-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do App Router Route Handlers specify CORS headers by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Route Handlers do not specify CORS headers by default. You must explicitly set headers like 'Access-Control-Allow-Origin' in the Response object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rB5T0" prefix="r3389" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1430385210540261500"],"question":[0,"What static methods does NextResponse provide?"],"answer":[0,"NextResponse provides four static methods: json(body, init?) to produce a JSON response, redirect(url) for redirects, rewrite(url) for URL rewriting while preserving the original URL, and next(options?) to continue the middleware chain."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-static-methods-does-nextresponse-provide"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-static-methods-does-nextresponse-provide" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-static-methods-does-nextresponse-provide" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What static methods does NextResponse provide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse provides four static methods: json(body, init?) to produce a JSON response, redirect(url) for redirects, rewrite(url) for URL rewriting while preserving the original URL, and next(options?) to continue the middleware chain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YvtoA" prefix="r3390" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1928618097592716795"],"question":[0,"What is the required format for matcher path patterns in middleware?"],"answer":[0,"Matcher patterns MUST start with /. They support named parameters (e.g., /about/:path), modifiers (* for zero or more, ? for zero or one, + for one or more), and regex patterns enclosed in parentheses."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-format-for-matcher-path-patterns-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-format-for-matcher-path-patterns-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-format-for-matcher-path-patterns-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required format for matcher path patterns in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Matcher patterns MUST start with /. They support named parameters (e.g., /about/:path), modifiers (* for zero or more, ? for zero or one, + for one or more), and regex patterns enclosed in parentheses.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z12hk0g" prefix="r3391" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2027255748496854079"],"question":[0,"What are the six available values for the 'fetchCache' route segment config option?"],"answer":[0,"The values are: 'auto' (default), 'force-cache', 'only-cache', 'force-no-store', 'only-no-store', and 'default-no-store'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-six-available-values-for-the-fetchcache-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-six-available-values-for-the-fetchcache-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-six-available-values-for-the-fetchcache-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the six available values for the 'fetchCache' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The values are: 'auto' (default), 'force-cache', 'only-cache', 'force-no-store', 'only-no-store', and 'default-no-store'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ncwjy" prefix="r3392" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2034279246677713214"],"question":[0,"What status code does res.redirect() use by default in Pages Router API Routes?"],"answer":[0,"res.redirect() defaults to 307 (Temporary redirect)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-status-code-does-res-redirect-use-by-default-in-pages-router-api-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-status-code-does-res-redirect-use-by-default-in-pages-router-api-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-status-code-does-res-redirect-use-by-default-in-pages-router-api-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What status code does res.redirect() use by default in Pages Router API Routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>res.redirect() defaults to 307 (Temporary redirect).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1rzsxO" prefix="r3393" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2844939158678146514"],"question":[0,"What HTTP methods are supported by Next.js Route Handlers in the App Router?"],"answer":[0,"Route Handlers support seven HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-are-supported-by-next-js-route-handlers-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-are-supported-by-next-js-route-handlers-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-are-supported-by-next-js-route-handlers-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods are supported by Next.js Route Handlers in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers support seven HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XQ4DW" prefix="r3394" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3539304644639511715"],"question":[0,"What properties does the req object have in Pages Router API Routes?"],"answer":[0,"The req object includes: req.cookies (object containing request cookies, defaults to {}), req.query (object containing query string parameters, defaults to {}), and req.body (parsed body object based on content-type, or null if absent)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-the-req-object-have-in-pages-router-api-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-the-req-object-have-in-pages-router-api-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-the-req-object-have-in-pages-router-api-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does the req object have in Pages Router API Routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The req object includes: req.cookies (object containing request cookies, defaults to {}), req.query (object containing query string parameters, defaults to {}), and req.body (parsed body object based on content-type, or null if absent).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SDwC0" prefix="r3395" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3813643406403065578"],"question":[0,"Can you use NextResponse.next() in App Router Route Handlers?"],"answer":[0,"No, Route Handlers in the Next.js App Router do not support using the NextResponse.next() method, as the Route Handler is considered the end of the proxy chain."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-nextresponse-next-in-app-router-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-nextresponse-next-in-app-router-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-nextresponse-next-in-app-router-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use NextResponse.next() in App Router Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Route Handlers in the Next.js App Router do not support using the NextResponse.next() method, as the Route Handler is considered the end of the proxy chain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jGzGg" prefix="r3396" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4013412343256446907"],"question":[0,"In which execution step does proxy (middleware) run in the Next.js request processing order?"],"answer":[0,"Proxy runs as the third step: 1) Headers from next.config.js, 2) Redirects from next.config.js, 3) Proxy, 4) beforeFiles rewrites, 5) Filesystem routes, 6) afterFiles rewrites, 7) Dynamic routes, 8) fallback rewrites."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-execution-step-does-proxy-middleware-run-in-the-next-js-request-process"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-execution-step-does-proxy-middleware-run-in-the-next-js-request-process" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-execution-step-does-proxy-middleware-run-in-the-next-js-request-process" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which execution step does proxy (middleware) run in the Next.js request processing order?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Proxy runs as the third step: 1) Headers from next.config.js, 2) Redirects from next.config.js, 3) Proxy, 4) beforeFiles rewrites, 5) Filesystem routes, 6) afterFiles rewrites, 7) Dynamic routes, 8) fallback rewrites.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eNYa2" prefix="r3397" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4146352998724981284"],"question":[0,"What happens if the OPTIONS method is not defined in a Next.js Route Handler?"],"answer":[0,"If OPTIONS is not defined, Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-the-options-method-is-not-defined-in-a-next-js-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-the-options-method-is-not-defined-in-a-next-js-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-the-options-method-is-not-defined-in-a-next-js-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if the OPTIONS method is not defined in a Next.js Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If OPTIONS is not defined, Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2Ihz4" prefix="r3398" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5328255688844913569"],"question":[0,"What are the three standard Web API methods available on the Request object to read the request body in Route Handlers?"],"answer":[0,"The three methods are: .json() for JSON data, .formData() for form data, and .text() for raw text."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-standard-web-api-methods-available-on-the-request-object-to-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-standard-web-api-methods-available-on-the-request-object-to-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-standard-web-api-methods-available-on-the-request-object-to-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three standard Web API methods available on the Request object to read the request body in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three methods are: .json() for JSON data, .formData() for form data, and .text() for raw text.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ad7El" prefix="r3399" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6160564427959444647"],"question":[0,"What properties are available on NextRequest.nextUrl?"],"answer":[0,"NextRequest.nextUrl provides: basePath (string), buildId (string | undefined), pathname (string), and searchParams (Object for query parameters)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-request"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-on-nextrequest-nexturl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-on-nextrequest-nexturl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-on-nextrequest-nexturl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available on NextRequest.nextUrl?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextRequest.nextUrl provides: basePath (string), buildId (string | undefined), pathname (string), and searchParams (Object for query parameters).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-request" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RTFrT" prefix="r3400" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6880108787574878995"],"question":[0,"What does NextResponse.next() do in middleware?"],"answer":[0,"NextResponse.next() returns a NextResponse that continues the middleware chain and allows the request to proceed to the next stage of processing. It can also forward modified headers upstream using NextResponse.next({ request: { headers: newHeaders } })."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-next-do-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-next-do-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-next-do-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.next() do in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.next() returns a NextResponse that continues the middleware chain and allows the request to proceed to the next stage of processing. It can also forward modified headers upstream using NextResponse.next({ request: { headers: newHeaders } }).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1upAb2" prefix="r3401" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7096514152097433318"],"question":[0,"What are the cookie methods available on NextRequest?"],"answer":[0,"NextRequest.cookies provides: get(name), getAll(name?), set(name, value), delete(name), has(name), and clear()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-request"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-cookie-methods-available-on-nextrequest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-cookie-methods-available-on-nextrequest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-cookie-methods-available-on-nextrequest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the cookie methods available on NextRequest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextRequest.cookies provides: get(name), getAll(name?), set(name, value), delete(name), has(name), and clear().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-request" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2r8PXU" prefix="r3402" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7982059623732696004"],"question":[0,"What are the cookie methods available on NextResponse?"],"answer":[0,"NextResponse.cookies provides: get(name), getAll(name?), set(name, value), delete(name), and has(name)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-cookie-methods-available-on-nextresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-cookie-methods-available-on-nextresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-cookie-methods-available-on-nextresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the cookie methods available on NextResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.cookies provides: get(name), getAll(name?), set(name, value), delete(name), and has(name).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZyMwHg" prefix="r3403" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8543981535296607573"],"question":[0,"What response helper methods are available on the res object in Pages Router API Routes?"],"answer":[0,"The main response helpers are: res.status(code) to set the status code, res.json(json) to send a JSON response, and res.send(body) to send a string, object, or Buffer."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-response-helper-methods-are-available-on-the-res-object-in-pages-router-api"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-response-helper-methods-are-available-on-the-res-object-in-pages-router-api" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-response-helper-methods-are-available-on-the-res-object-in-pages-router-api" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What response helper methods are available on the res object in Pages Router API Routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The main response helpers are: res.status(code) to set the status code, res.json(json) to send a JSON response, and res.send(body) to send a string, object, or Buffer.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KFGvS" prefix="r3404" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8569995041356346330"],"question":[0,"Were the ip and geo properties available on NextRequest as of v15.0.0?"],"answer":[0,"No, as of v15.0.0, the ip and geo properties have been removed from NextRequest."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-request"]]],"topic":[0,"nextjs"],"slug":[0,"were-the-ip-and-geo-properties-available-on-nextrequest-as-of-v15-0-0"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="were-the-ip-and-geo-properties-available-on-nextrequest-as-of-v15-0-0" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#were-the-ip-and-geo-properties-available-on-nextrequest-as-of-v15-0-0" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Were the ip and geo properties available on NextRequest as of v15.0.0?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, as of v15.0.0, the ip and geo properties have been removed from NextRequest.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-request" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Gc9MG" prefix="r3405" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9856448948894764996"],"question":[0,"What status code does the permanentRedirect() function use?"],"answer":[0,"permanentRedirect() returns a 308 (Permanent) HTTP redirect response in most contexts. In Server Actions, it returns 303."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/permanentRedirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-status-code-does-the-permanentredirect-function-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-status-code-does-the-permanentredirect-function-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-status-code-does-the-permanentredirect-function-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What status code does the permanentRedirect() function use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>permanentRedirect() returns a 308 (Permanent) HTTP redirect response in most contexts. In Server Actions, it returns 303.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/permanentRedirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7Ix5Q" prefix="r3406" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9959993575849424036"],"question":[0,"Where should the middleware.ts file be located in a Next.js project NOT using the src directory?"],"answer":[0,"middleware.ts should be in the project root at the same level as the app or pages directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-middleware-ts-file-be-located-in-a-next-js-project-not-using-th"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-middleware-ts-file-be-located-in-a-next-js-project-not-using-th" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-middleware-ts-file-be-located-in-a-next-js-project-not-using-th" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the middleware.ts file be located in a Next.js project NOT using the src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>middleware.ts should be in the project root at the same level as the app or pages directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lzFL7" prefix="r3407" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10398784240033781600"],"question":[0,"What does the waitUntil() method do in Next.js middleware?"],"answer":[0,"waitUntil() takes a promise as an argument and extends the lifetime of the middleware until the promise settles. This allows background tasks (like logging or analytics) to complete even after the response has been sent to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-waituntil-method-do-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-waituntil-method-do-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-waituntil-method-do-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the waitUntil() method do in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>waitUntil() takes a promise as an argument and extends the lifetime of the middleware until the promise settles. This allows background tasks (like logging or analytics) to complete even after the response has been sent to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WMY6n" prefix="r3408" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11155115051673208345"],"question":[0,"What is the default caching behavior for GET Route Handlers in Next.js 15?"],"answer":[0,"In Next.js 15, GET Route Handlers are not cached by default. This is a breaking change from Next.js 14 where they were cached by default unless they used a dynamic function or dynamic config option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-get-route-handlers-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-get-route-handlers-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-get-route-handlers-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for GET Route Handlers in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, GET Route Handlers are not cached by default. This is a breaking change from Next.js 14 where they were cached by default unless they used a dynamic function or dynamic config option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1V1SvD" prefix="r3409" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11334961133901317825"],"question":[0,"Do Pages Router API Routes specify CORS headers by default?"],"answer":[0,"No, API Routes do not specify CORS headers by default, meaning they are same-origin only."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-pages-router-api-routes-specify-cors-headers-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-pages-router-api-routes-specify-cors-headers-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-pages-router-api-routes-specify-cors-headers-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Pages Router API Routes specify CORS headers by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, API Routes do not specify CORS headers by default, meaning they are same-origin only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZxjlgA" prefix="r3410" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11427065670105988730"],"question":[0,"What is the configuration option name to disable automatic body parsing in Pages Router API Routes?"],"answer":[0,"Set bodyParser to false in the config export. Example: export const config = { api: { bodyParser: false } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-configuration-option-name-to-disable-automatic-body-parsing-in-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-configuration-option-name-to-disable-automatic-body-parsing-in-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-configuration-option-name-to-disable-automatic-body-parsing-in-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the configuration option name to disable automatic body parsing in Pages Router API Routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set bodyParser to false in the config export. Example: export const config = { api: { bodyParser: false } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTBVXS" prefix="r3411" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12803188349680148052"],"question":[0,"What is the default response size limit for API Routes in the Pages Router?"],"answer":[0,"The default response size limit is 4MB. Developers receive warnings in development when API responses exceed this limit."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-response-size-limit-for-api-routes-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-response-size-limit-for-api-routes-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-response-size-limit-for-api-routes-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default response size limit for API Routes in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default response size limit is 4MB. Developers receive warnings in development when API responses exceed this limit.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSpQ2M" prefix="r3412" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12835632193010534107"],"question":[0,"What runtime does Next.js middleware use by default?"],"answer":[0,"Next.js middleware currently only supports the Edge runtime by default. Node.js runtime support is being added in canary versions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-does-next-js-middleware-use-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-does-next-js-middleware-use-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-does-next-js-middleware-use-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime does Next.js middleware use by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js middleware currently only supports the Edge runtime by default. Node.js runtime support is being added in canary versions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1czRbD" prefix="r3413" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13007284359006780747"],"question":[0,"How do you opt into caching for GET Route Handlers in Next.js 15?"],"answer":[0,"You can opt into caching by using a static route config option such as export dynamic = 'force-static'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-opt-into-caching-for-get-route-handlers-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-opt-into-caching-for-get-route-handlers-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-opt-into-caching-for-get-route-handlers-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you opt into caching for GET Route Handlers in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can opt into caching by using a static route config option such as export dynamic = 'force-static'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25TGvy" prefix="r3414" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13634064118447835025"],"question":[0,"What are the valid values for the 'runtime' route segment config option?"],"answer":[0,"The valid values are 'nodejs' (default) and 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'runtime' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The valid values are 'nodejs' (default) and 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pYF7i" prefix="r3415" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13855295221534946191"],"question":[0,"What constraint exists on the matcher values in middleware configuration?"],"answer":[0,"The matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-constraint-exists-on-the-matcher-values-in-middleware-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-constraint-exists-on-the-matcher-values-in-middleware-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-constraint-exists-on-the-matcher-values-in-middleware-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What constraint exists on the matcher values in middleware configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cqk6z" prefix="r3416" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14721884656641990192"],"question":[0,"What is the default maximum body size when using proxy (middleware) in Next.js?"],"answer":[0,"The default maximum body size is 10MB when a proxy is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/proxyClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-body-size-when-using-proxy-middleware-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-body-size-when-using-proxy-middleware-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-body-size-when-using-proxy-middleware-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum body size when using proxy (middleware) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default maximum body size is 10MB when a proxy is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/proxyClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20bscq" prefix="r3417" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14822034360084982917"],"question":[0,"How many middleware files can a Next.js project have?"],"answer":[0,"Next.js only supports a single middleware file per project. Multiple proxy exports from the same file are not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-middleware-files-can-a-next-js-project-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-middleware-files-can-a-next-js-project-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-middleware-files-can-a-next-js-project-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many middleware files can a Next.js project have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js only supports a single middleware file per project. Multiple proxy exports from the same file are not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dWQaX" prefix="r3418" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15098312749055075221"],"question":[0,"What is the default body size limit for API Routes in the Pages Router?"],"answer":[0,"The default body size limit is 1MB."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/api-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-body-size-limit-for-api-routes-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-body-size-limit-for-api-routes-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-body-size-limit-for-api-routes-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default body size limit for API Routes in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default body size limit is 1MB.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/api-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="rendering-strategies-execution-environment" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Rendering Strategies > Execution Environment</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 31 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZOIyPR" prefix="r3419" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"274532492716702487"],"question":[0,"What is the exact syntax to configure the runtime for a route segment?"],"answer":[0,"Export a const named 'runtime' with a string value of either 'nodejs' or 'edge': export const runtime = 'nodejs' // 'nodejs' | 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-to-configure-the-runtime-for-a-route-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-to-configure-the-runtime-for-a-route-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-to-configure-the-runtime-for-a-route-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax to configure the runtime for a route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a const named 'runtime' with a string value of either 'nodejs' or 'edge': export const runtime = 'nodejs' // 'nodejs' | 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1l3bWJ" prefix="r3420" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"994334084650889446"],"question":[0,"What is the unstable_allowDynamic configuration option for Edge Runtime?"],"answer":[0,"unstable_allowDynamic is a glob, or an array of globs, ignoring dynamic code evaluation for specific files. The globs are relative to your application root folder. Example: unstable_allowDynamic: ['/lib/utilities.js', '**/node_modules/function-bind/**']"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-unstable-allowdynamic-configuration-option-for-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-unstable-allowdynamic-configuration-option-for-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-unstable-allowdynamic-configuration-option-for-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the unstable_allowDynamic configuration option for Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>unstable_allowDynamic is a glob, or an array of globs, ignoring dynamic code evaluation for specific files. The globs are relative to your application root folder. Example: unstable_allowDynamic: ['/lib/utilities.js', '<strong>/node_modules/function-bind/</strong>']</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCeFlK" prefix="r3421" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1126350061653994601"],"question":[0,"Can you use require() in the Edge Runtime?"],"answer":[0,"No. Calling require directly is not allowed in the Edge Runtime. You must use ES Modules instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use require() in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Calling require directly is not allowed in the Edge Runtime. You must use ES Modules instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2j1kTT" prefix="r3422" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1637837659624498574"],"question":[0,"How many Crypto APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports 3 Crypto APIs: crypto, CryptoKey, and SubtleCrypto."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-crypto-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-crypto-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-crypto-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many Crypto APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports 3 Crypto APIs: crypto, CryptoKey, and SubtleCrypto.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pEvVY" prefix="r3423" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2328738759413060428"],"question":[0,"What is the purpose of the 'server-only' package in Next.js?"],"answer":[0,"The 'server-only' package prevents accidental usage of server code in Client Components. If someone tries to import a module with 'import server-only' into a client component, the build process will throw an error, preventing the leak of server-side code to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-server-only-package-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-server-only-package-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-server-only-package-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the 'server-only' package in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'server-only' package prevents accidental usage of server code in Client Components. If someone tries to import a module with 'import server-only' into a client component, the build process will throw an error, preventing the leak of server-side code to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9vGLC" prefix="r3424" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2537874237064306404"],"question":[0,"Does the Edge Runtime provide AsyncLocalStorage?"],"answer":[0,"Yes. AsyncLocalStorage is provided as a Next.js-specific polyfill in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-provide-asynclocalstorage"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-provide-asynclocalstorage" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-provide-asynclocalstorage" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime provide AsyncLocalStorage?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. AsyncLocalStorage is provided as a Next.js-specific polyfill in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtfN6u" prefix="r3425" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2618773488055361713"],"question":[0,"What is the default runtime for Middleware in Next.js?"],"answer":[0,"Middleware currently only supports the Edge runtime by default. However, as of Next.js 15.5, stable support for the Node.js runtime in Middleware has been introduced. Proxy (the newer name for middleware) defaults to using the Node.js runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-middleware-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-middleware-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-middleware-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for Middleware in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware currently only supports the Edge runtime by default. However, as of Next.js 15.5, stable support for the Node.js runtime in Middleware has been introduced. Proxy (the newer name for middleware) defaults to using the Node.js runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24L9dd" prefix="r3426" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3682694732420775073"],"question":[0,"What is the purpose of the 'client-only' package in Next.js?"],"answer":[0,"The client-only package can be used to mark modules that contain client-only logic like code that accesses the window object. It guarantees that the component or library can only be imported by a component marked with 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-client-only-package-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-client-only-package-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-client-only-package-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the 'client-only' package in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The client-only package can be used to mark modules that contain client-only logic like code that accesses the window object. It guarantees that the component or library can only be imported by a component marked with 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ndL7T" prefix="r3427" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3821229702335217764"],"question":[0,"What are the two main ways to implement streaming in Next.js?"],"answer":[0,"There are two main ways: 1) Using loading.tsx, a special Next.js file built on top of React Suspense that allows you to create fallback UI, and 2) Using <Suspense> boundaries at the component level for more granular control."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-ways-to-implement-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-ways-to-implement-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-ways-to-implement-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main ways to implement streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>There are two main ways: 1) Using loading.tsx, a special Next.js file built on top of React Suspense that allows you to create fallback UI, and 2) Using <Suspense> boundaries at the component level for more granular control.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QhYXM" prefix="r3428" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3897268813636503624"],"question":[0,"How many Network APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports 10 Network APIs: Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, and WebSocket."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-network-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-network-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-network-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many Network APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports 10 Network APIs: Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, and WebSocket.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GwS1d" prefix="r3429" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4732163221872911759"],"question":[0,"Do you need to add 'use client' to every client component file?"],"answer":[0,"No. 'use client' does not need to be defined in every file. The Client module boundary only needs to be defined once, at the 'entry point', for all modules imported into it to be considered a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"do-you-need-to-add-use-client-to-every-client-component-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-you-need-to-add-use-client-to-every-client-component-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-you-need-to-add-use-client-to-every-client-component-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do you need to add 'use client' to every client component file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. 'use client' does not need to be defined in every file. The Client module boundary only needs to be defined once, at the 'entry point', for all modules imported into it to be considered a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dWY84" prefix="r3430" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5168158112600912676"],"question":[0,"What is the execution timeout for Edge Functions on Vercel?"],"answer":[0,"Starting March 1st, 2025, Edge Functions have an execution duration limit of 300 seconds (5 minutes). However, Edge Functions must begin sending a response within 25 seconds to maintain streaming capabilities beyond this period."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/changelog/new-execution-duration-limit-for-edge-functions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-execution-timeout-for-edge-functions-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-execution-timeout-for-edge-functions-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-execution-timeout-for-edge-functions-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the execution timeout for Edge Functions on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting March 1st, 2025, Edge Functions have an execution duration limit of 300 seconds (5 minutes). However, Edge Functions must begin sending a response within 25 seconds to maintain streaming capabilities beyond this period.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/changelog/new-execution-duration-limit-for-edge-functions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="J6O8V" prefix="r3431" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5980024661452008845"],"question":[0,"How does Next.js split rendering work for Server Components?"],"answer":[0,"On the server, Next.js uses React's APIs to orchestrate rendering. The rendering work is split into chunks, by individual route segments (layouts and pages) and Suspense Boundaries."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-split-rendering-work-for-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-split-rendering-work-for-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-split-rendering-work-for-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js split rendering work for Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On the server, Next.js uses React's APIs to orchestrate rendering. The rendering work is split into chunks, by individual route segments (layouts and pages) and Suspense Boundaries.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8EPeK" prefix="r3432" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6384499670592793253"],"question":[0,"What is the syntax to disable server-side rendering for a dynamic import?"],"answer":[0,"Use dynamic from 'next/dynamic' with ssr: false option: const Component = dynamic(() => import('../component'), { ssr: false }). This must be used in a Client Component (with 'use client' directive), as ssr: false is not allowed in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-to-disable-server-side-rendering-for-a-dynamic-import"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-to-disable-server-side-rendering-for-a-dynamic-import" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-to-disable-server-side-rendering-for-a-dynamic-import" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax to disable server-side rendering for a dynamic import?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use dynamic from 'next/dynamic' with ssr: false option: const Component = dynamic(() => import('../component'), { ssr: false }). This must be used in a Client Component (with 'use client' directive), as ssr: false is not allowed in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Vam58" prefix="r3433" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6476832399360256335"],"question":[0,"Where do Server Actions (functions marked with 'use server') execute?"],"answer":[0,"Server Actions are asynchronous functions that are executed on the server. 'use server' ensures this function is only ever executed on the server, regardless of where they're invoked."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"where-do-server-actions-functions-marked-with-use-server-execute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-do-server-actions-functions-marked-with-use-server-execute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-do-server-actions-functions-marked-with-use-server-execute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where do Server Actions (functions marked with 'use server') execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions are asynchronous functions that are executed on the server. 'use server' ensures this function is only ever executed on the server, regardless of where they're invoked.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2a3CPS" prefix="r3434" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7847107254131975446"],"question":[0,"What does Next.js recommend for the runtime to use when rendering applications?"],"answer":[0,"Next.js recommends using the Node.js runtime for rendering your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-js-recommend-for-the-runtime-to-use-when-rendering-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-js-recommend-for-the-runtime-to-use-when-rendering-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-js-recommend-for-the-runtime-to-use-when-rendering-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Next.js recommend for the runtime to use when rendering applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using the Node.js runtime for rendering your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LV6wc" prefix="r3435" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8541926133584391305"],"question":[0,"What is the default server runtime in Next.js?"],"answer":[0,"The Node.js Runtime is the default server runtime in Next.js. If the segment runtime is not set, the default 'nodejs' runtime will be used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-server-runtime-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-server-runtime-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-server-runtime-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default server runtime in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Node.js Runtime is the default server runtime in Next.js. If the segment runtime is not set, the default 'nodejs' runtime will be used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NKO9P" prefix="r3436" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9298466801409214776"],"question":[0,"Where can the runtime segment config be applied?"],"answer":[0,"The runtime config can be applied to Pages (page.tsx), Layouts (layout.tsx), and Route handlers (route.ts). It cannot be used in Proxy files (middleware)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-the-runtime-segment-config-be-applied"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-the-runtime-segment-config-be-applied" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-the-runtime-segment-config-be-applied" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can the runtime segment config be applied?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The runtime config can be applied to Pages (page.tsx), Layouts (layout.tsx), and Route handlers (route.ts). It cannot be used in Proxy files (middleware).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5mOmq" prefix="r3437" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10251352919506917095"],"question":[0,"What is the initial response timeout for Edge Functions on Vercel?"],"answer":[0,"Edge Functions must begin sending an initial response within 25 seconds. After starting the response, they can continue streaming data for up to 300 seconds total."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/errors/EDGE_FUNCTION_INVOCATION_TIMEOUT"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-initial-response-timeout-for-edge-functions-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-initial-response-timeout-for-edge-functions-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-initial-response-timeout-for-edge-functions-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the initial response timeout for Edge Functions on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Functions must begin sending an initial response within 25 seconds. After starting the response, they can continue streaming data for up to 300 seconds total.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/errors/EDGE_FUNCTION_INVOCATION_TIMEOUT" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dhdgu" prefix="r3438" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10892192331245859774"],"question":[0,"What is the React Server Component Payload (RSC Payload)?"],"answer":[0,"The RSC Payload is a compact binary representation of the rendered React Server Components tree. It contains placeholders for where Client Components should be rendered, references to their JavaScript files, and any props passed from Server Components to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-react-server-component-payload-rsc-payload"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-react-server-component-payload-rsc-payload" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-react-server-component-payload-rsc-payload" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the React Server Component Payload (RSC Payload)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload is a compact binary representation of the rendered React Server Components tree. It contains placeholders for where Client Components should be rendered, references to their JavaScript files, and any props passed from Server Components to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YBHjo" prefix="r3439" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10996380336319396646"],"question":[0,"What browser buffer size requirement affects Next.js streaming?"],"answer":[0,"Some browsers buffer a streaming response, and you may not see the streamed response until the response exceeds 1024 bytes. This typically only affects 'hello world' applications, but not real applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-browser-buffer-size-requirement-affects-next-js-streaming"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browser-buffer-size-requirement-affects-next-js-streaming" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browser-buffer-size-requirement-affects-next-js-streaming" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browser buffer size requirement affects Next.js streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some browsers buffer a streaming response, and you may not see the streamed response until the response exceeds 1024 bytes. This typically only affects 'hello world' applications, but not real applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Dmuez" prefix="r3440" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11028949210511133212"],"question":[0,"Can 'use server' be used inline in a function or at file level?"],"answer":[0,"Both. You can create a Server Action by defining an asynchronous function with the 'use server' directive at the top of the function body (inline), or use 'use server' at the top of a file to mark all exported functions as Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-use-server-be-used-inline-in-a-function-or-at-file-level"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-use-server-be-used-inline-in-a-function-or-at-file-level" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-use-server-be-used-inline-in-a-function-or-at-file-level" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can 'use server' be used inline in a function or at file level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both. You can create a Server Action by defining an asynchronous function with the 'use server' directive at the top of the function body (inline), or use 'use server' at the top of a file to mark all exported functions as Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dBs1F" prefix="r3441" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11513542904119051279"],"question":[0,"What is the bundle size limit for Edge Functions and Middleware?"],"answer":[0,"Edge Functions and Middleware have a strict size limit of 1 MB (1 megabyte) for the final bundled code when deployed on Vercel."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/32907"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-bundle-size-limit-for-edge-functions-and-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-bundle-size-limit-for-edge-functions-and-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-bundle-size-limit-for-edge-functions-and-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the bundle size limit for Edge Functions and Middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Functions and Middleware have a strict size limit of 1 MB (1 megabyte) for the final bundled code when deployed on Vercel.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/32907" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LkJI0" prefix="r3442" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11898021646639817418"],"question":[0,"How many Stream APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports 6 Stream APIs: ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, and WritableStreamDefaultWriter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-stream-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-stream-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-stream-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many Stream APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports 6 Stream APIs: ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, and WritableStreamDefaultWriter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTwaqD" prefix="r3443" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12013567870552631191"],"question":[0,"What is the default component type in Next.js App Router?"],"answer":[0,"By default, layouts and pages are Server Components in the Next.js App Router. All components inside the App Router are Server Components by default, including special files and colocated components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-component-type-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-component-type-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-component-type-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default component type in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, layouts and pages are Server Components in the Next.js App Router. All components inside the App Router are Server Components by default, including special files and colocated components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cjDwq" prefix="r3444" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12851060260886366931"],"question":[0,"Where do Server Components execute?"],"answer":[0,"Server Components render on the server into a React Server Component Payload (RSC Payload). They execute before HTML reaches the client and fetch data from databases and APIs near the data source."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"where-do-server-components-execute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-do-server-components-execute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-do-server-components-execute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where do Server Components execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Components render on the server into a React Server Component Payload (RSC Payload). They execute before HTML reaches the client and fetch data from databases and APIs near the data source.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2s66Pj" prefix="r3445" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12938757160459167614"],"question":[0,"Is the revalidate option available when using runtime = 'edge'?"],"answer":[0,"No. The revalidate value is not available when using runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-revalidate-option-available-when-using-runtime-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-revalidate-option-available-when-using-runtime-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-revalidate-option-available-when-using-runtime-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the revalidate option available when using runtime = 'edge'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The revalidate value is not available when using runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ti8aS" prefix="r3446" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12942583794095588624"],"question":[0,"How many Encoding APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports 6 Encoding APIs: atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, and TextEncoderStream."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-encoding-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-encoding-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-encoding-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many Encoding APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports 6 Encoding APIs: atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, and TextEncoderStream.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ez3bF" prefix="r3447" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13572205422688884539"],"question":[0,"Where do Client Components execute?"],"answer":[0,"Client Components are pre-rendered on the server and then execute in the browser environment after hydration. They render entirely on the client during subsequent navigations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"where-do-client-components-execute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-do-client-components-execute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-do-client-components-execute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where do Client Components execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Client Components are pre-rendered on the server and then execute in the browser environment after hydration. They render entirely on the client during subsequent navigations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtKSyC" prefix="r3448" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14381549746753355776"],"question":[0,"Can React Context be used in Server Components?"],"answer":[0,"No. React Context with createContext only works in Client Components and requires marking the component with 'use client' at the top of the file. React Server Components don't support creating or consuming context directly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/context-in-server-component"]]],"topic":[0,"nextjs"],"slug":[0,"can-react-context-be-used-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-react-context-be-used-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-react-context-be-used-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can React Context be used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. React Context with createContext only works in Client Components and requires marking the component with 'use client' at the top of the file. React Server Components don't support creating or consuming context directly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/context-in-server-component" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1weR2I" prefix="r3449" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14468445096372418240"],"question":[0,"What is the exact syntax for the 'use client' directive?"],"answer":[0,"The directive must be written as 'use client' (single quotes shown in official examples) and must be placed at the top of the file, before any imports: 'use client' followed by imports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-the-use-client-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-the-use-client-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-the-use-client-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for the 'use client' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The directive must be written as 'use client' (single quotes shown in official examples) and must be placed at the top of the file, before any imports: 'use client' followed by imports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="configuration-development-tools" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Configuration > Development Tools</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 31 questions </span> </div> <div class="space-y-4"> <astro-island uid="2nS5p4" prefix="r3450" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"346718905182689476"],"question":[0,"Does Next.js logging configuration apply to all types of logs?"],"answer":[0,"No, logging currently only applies to data fetching using the `fetch` API. It does not yet apply to other logs inside of Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/logging"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-logging-configuration-apply-to-all-types-of-logs"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-logging-configuration-apply-to-all-types-of-logs" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-logging-configuration-apply-to-all-types-of-logs" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js logging configuration apply to all types of logs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, logging currently only applies to data fetching using the <code>fetch</code> API. It does not yet apply to other logs inside of Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/logging" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTtNVa" prefix="r3451" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"763591266911595121"],"question":[0,"What are all the valid position values for the devIndicators configuration?"],"answer":[0,"The position property accepts four values: `'bottom-right'`, `'bottom-left'`, `'top-right'`, and `'top-left'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-valid-position-values-for-the-devindicators-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-valid-position-values-for-the-devindicators-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-valid-position-values-for-the-devindicators-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the valid position values for the devIndicators configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The position property accepts four values: <code>'bottom-right'</code>, <code>'bottom-left'</code>, <code>'top-right'</code>, and <code>'top-left'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZaCQi7" prefix="r3452" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1594205467379561195"],"question":[0,"What devIndicators options were removed in Next.js v16.0.0?"],"answer":[0,"The `appIsrStatus`, `buildActivity`, and `buildActivityPosition` options were removed in v16.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators"]]],"topic":[0,"nextjs"],"slug":[0,"what-devindicators-options-were-removed-in-next-js-v16-0-0"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-devindicators-options-were-removed-in-next-js-v16-0-0" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-devindicators-options-were-removed-in-next-js-v16-0-0" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What devIndicators options were removed in Next.js v16.0.0?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>appIsrStatus</code>, <code>buildActivity</code>, and <code>buildActivityPosition</code> options were removed in v16.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15QgS4" prefix="r3453" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2414684860591430754"],"question":[0,"What is the exact syntax for using the browser condition with resolveAlias in Turbopack?"],"answer":[0,"Use an object with the browser key: `resolveAlias: { mocha: { browser: 'mocha/browser-entry.js' } }`. This aliases imports to the specified path when targeting browser environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-using-the-browser-condition-with-resolvealias-in-tu"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-using-the-browser-condition-with-resolvealias-in-tu" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-using-the-browser-condition-with-resolvealias-in-tu" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for using the browser condition with resolveAlias in Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use an object with the browser key: <code>resolveAlias: { mocha: { browser: 'mocha/browser-entry.js' } }</code>. This aliases imports to the specified path when targeting browser environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkyNcc" prefix="r3454" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2805259684713174689"],"question":[0,"How many times does the webpack function execute during a Next.js build?"],"answer":[0,"The webpack function executes three times: twice for the server (nodejs / edge runtime) and once for the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-does-the-webpack-function-execute-during-a-next-js-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-does-the-webpack-function-execute-during-a-next-js-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-does-the-webpack-function-execute-during-a-next-js-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times does the webpack function execute during a Next.js build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The webpack function executes three times: twice for the server (nodejs / edge runtime) and once for the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1J3wl7" prefix="r3455" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3166052032085499424"],"question":[0,"Which file extensions are NOT supported for Next.js config files?"],"answer":[0,"The `.cjs`, `.cts`, and `.mts` extensions are not currently supported for next.config files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"which-file-extensions-are-not-supported-for-next-js-config-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-file-extensions-are-not-supported-for-next-js-config-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-file-extensions-are-not-supported-for-next-js-config-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which file extensions are NOT supported for Next.js config files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>.cjs</code>, <code>.cts</code>, and <code>.mts</code> extensions are not currently supported for next.config files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17UqNw" prefix="r3456" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3181518204147609943"],"question":[0,"What is the default bundler for Next.js development starting from Next.js 15?"],"answer":[0,"Turbopack is now the default bundler in Next.js. No configuration is needed to use Turbopack. Developers who want to continue using webpack can opt out by using the `--webpack` flag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bundler-for-next-js-development-starting-from-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bundler-for-next-js-development-starting-from-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bundler-for-next-js-development-starting-from-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bundler for Next.js development starting from Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack is now the default bundler in Next.js. No configuration is needed to use Turbopack. Developers who want to continue using webpack can opt out by using the <code>--webpack</code> flag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jDqIO" prefix="r3457" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3380989518870211210"],"question":[0,"What are the default file extensions in Turbopack's resolveExtensions list?"],"answer":[0,"The default extensions are: `['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json']`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-file-extensions-in-turbopack-s-resolveextensions-list"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-file-extensions-in-turbopack-s-resolveextensions-list" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-file-extensions-in-turbopack-s-resolveextensions-list" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default file extensions in Turbopack's resolveExtensions list?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default extensions are: <code>['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json']</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23uoC7" prefix="r3458" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3609678278051403838"],"question":[0,"What constraints apply to options passed to webpack loaders in Turbopack?"],"answer":[0,"Options passed to webpack loaders must be plain JavaScript primitives, objects, and arrays."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-constraints-apply-to-options-passed-to-webpack-loaders-in-turbopack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-constraints-apply-to-options-passed-to-webpack-loaders-in-turbopack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-constraints-apply-to-options-passed-to-webpack-loaders-in-turbopack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What constraints apply to options passed to webpack loaders in Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Options passed to webpack loaders must be plain JavaScript primitives, objects, and arrays.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SOJ57" prefix="r3459" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4812795354064976573"],"question":[0,"Can Turbopack rules be configured as both objects and arrays?"],"answer":[0,"Yes, rules can be an object or an array of objects. Arrays are useful for modeling disjoint conditions, such as applying different loaders based on whether code runs in the browser or not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"can-turbopack-rules-be-configured-as-both-objects-and-arrays"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-turbopack-rules-be-configured-as-both-objects-and-arrays" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-turbopack-rules-be-configured-as-both-objects-and-arrays" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Turbopack rules be configured as both objects and arrays?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, rules can be an object or an array of objects. Arrays are useful for modeling disjoint conditions, such as applying different loaders based on whether code runs in the browser or not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Hg2kj" prefix="r3460" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5024867779299391391"],"question":[0,"What are the exact lockfile names that Next.js uses to automatically detect the project root directory for Turbopack?"],"answer":[0,"Next.js automatically detects the root directory by looking for: `pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`, `bun.lock`, and `bun.lockb`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-lockfile-names-that-next-js-uses-to-automatically-detect-the-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-lockfile-names-that-next-js-uses-to-automatically-detect-the-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-lockfile-names-that-next-js-uses-to-automatically-detect-the-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact lockfile names that Next.js uses to automatically detect the project root directory for Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically detects the root directory by looking for: <code>pnpm-lock.yaml</code>, <code>package-lock.json</code>, <code>yarn.lock</code>, <code>bun.lock</code>, and <code>bun.lockb</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1m2K9W" prefix="r3461" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5806042812668047284"],"question":[0,"What are the two formats for specifying loaders in Turbopack rules?"],"answer":[0,"String format for simple loaders: `loaders: ['@svgr/webpack']`. Object format for loaders with options: `loaders: [{ loader: '@svgr/webpack', options: { icon: true } }]`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-formats-for-specifying-loaders-in-turbopack-rules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-formats-for-specifying-loaders-in-turbopack-rules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-formats-for-specifying-loaders-in-turbopack-rules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two formats for specifying loaders in Turbopack rules?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>String format for simple loaders: <code>loaders: ['@svgr/webpack']</code>. Object format for loaders with options: <code>loaders: [{ loader: '@svgr/webpack', options: { icon: true } }]</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Dskc0" prefix="r3462" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6228236671586604234"],"question":[0,"Is logging.incomingRequests enabled by default in Next.js development mode?"],"answer":[0,"Yes, by default all incoming requests will be logged in the console during development. This is only logged in development and doesn't affect production builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/logging"]]],"topic":[0,"nextjs"],"slug":[0,"is-logging-incomingrequests-enabled-by-default-in-next-js-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-logging-incomingrequests-enabled-by-default-in-next-js-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-logging-incomingrequests-enabled-by-default-in-next-js-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is logging.incomingRequests enabled by default in Next.js development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, by default all incoming requests will be logged in the console during development. This is only logged in development and doesn't affect production builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/logging" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fLMUb" prefix="r3463" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6532978671703035536"],"question":[0,"What is the default value for onDemandEntries.maxInactiveAge in Next.js?"],"answer":[0,"The default value is `25 * 1000` (25,000 milliseconds or 25 seconds)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-ondemandentries-maxinactiveage-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-ondemandentries-maxinactiveage-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-ondemandentries-maxinactiveage-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for onDemandEntries.maxInactiveAge in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>25 * 1000</code> (25,000 milliseconds or 25 seconds).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZajVQ6" prefix="r3464" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6885450607003959852"],"question":[0,"Is logging.fetches.hmrRefreshes enabled by default in Next.js?"],"answer":[0,"No, the default value is `false`. Fetch requests that are restored from the Server Components HMR cache are not logged by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/logging"]]],"topic":[0,"nextjs"],"slug":[0,"is-logging-fetches-hmrrefreshes-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-logging-fetches-hmrrefreshes-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-logging-fetches-hmrrefreshes-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is logging.fetches.hmrRefreshes enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the default value is <code>false</code>. Fetch requests that are restored from the Server Components HMR cache are not logged by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/logging" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1d28wb" prefix="r3465" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7525549954357539919"],"question":[0,"What types of webpack loaders are currently supported in Turbopack?"],"answer":[0,"Only loaders that return JavaScript code are supported. Loaders that transform files like stylesheets or images are not currently supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-webpack-loaders-are-currently-supported-in-turbopack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-webpack-loaders-are-currently-supported-in-turbopack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-webpack-loaders-are-currently-supported-in-turbopack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of webpack loaders are currently supported in Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only loaders that return JavaScript code are supported. Loaders that transform files like stylesheets or images are not currently supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zhyPW" prefix="r3466" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7536354943401290628"],"question":[0,"How do you enable Turbopack in Next.js development mode?"],"answer":[0,"Run `next dev --turbo` to start the development server with Turbopack. You can also modify package.json by changing your dev script to `\"next dev --turbo\"`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-turbopack-in-next-js-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-turbopack-in-next-js-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-turbopack-in-next-js-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable Turbopack in Next.js development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Run <code>next dev --turbo</code> to start the development server with Turbopack. You can also modify package.json by changing your dev script to <code>"next dev --turbo"</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1epa0H" prefix="r3467" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8550578883391886456"],"question":[0,"Are changes to webpack configuration covered by Next.js semver?"],"answer":[0,"No, changes to webpack config are not covered by semver, so proceed at your own risk."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack"]]],"topic":[0,"nextjs"],"slug":[0,"are-changes-to-webpack-configuration-covered-by-next-js-semver"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-changes-to-webpack-configuration-covered-by-next-js-semver" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-changes-to-webpack-configuration-covered-by-next-js-semver" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are changes to webpack configuration covered by Next.js semver?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, changes to webpack config are not covered by semver, so proceed at your own risk.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zdlr9b" prefix="r3468" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9204466687503175316"],"question":[0,"What boolean operators are supported for Turbopack rules conditions?"],"answer":[0,"Turbopack supports three boolean operators: `{all: [...]}`, `{any: [...]}`, and `{not: ...}`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-boolean-operators-are-supported-for-turbopack-rules-conditions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-boolean-operators-are-supported-for-turbopack-rules-conditions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-boolean-operators-are-supported-for-turbopack-rules-conditions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What boolean operators are supported for Turbopack rules conditions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack supports three boolean operators: <code>{all: [...]}</code>, <code>{any: [...]}</code>, and <code>{not: ...}</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ocLPX" prefix="r3469" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9434621846552265681"],"question":[0,"Does setting custom resolveExtensions in Turbopack merge with or replace the defaults?"],"answer":[0,"It completely replaces the defaults. When you configure resolveExtensions, it overwrites the original resolve extensions with the provided list, so you must include all the default extensions if you want to preserve them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"does-setting-custom-resolveextensions-in-turbopack-merge-with-or-replace-the-def"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-setting-custom-resolveextensions-in-turbopack-merge-with-or-replace-the-def" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-setting-custom-resolveextensions-in-turbopack-merge-with-or-replace-the-def" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does setting custom resolveExtensions in Turbopack merge with or replace the defaults?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It completely replaces the defaults. When you configure resolveExtensions, it overwrites the original resolve extensions with the provided list, so you must include all the default extensions if you want to preserve them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3TX9M" prefix="r3470" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9782609444740958074"],"question":[0,"How can you filter specific incoming requests from being logged in Next.js development?"],"answer":[0,"Use the `logging.incomingRequests.ignore` property with an array of regex patterns. Example: `ignore: [/\\/api\\/v1\\/health/]`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/logging"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-filter-specific-incoming-requests-from-being-logged-in-next-js-devel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-filter-specific-incoming-requests-from-being-logged-in-next-js-devel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-filter-specific-incoming-requests-from-being-logged-in-next-js-devel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you filter specific incoming requests from being logged in Next.js development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>logging.incomingRequests.ignore</code> property with an array of regex patterns. Example: <code>ignore: [/\/api\/v1\/health/]</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/logging" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wh9I6" prefix="r3471" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10075744184605579758"],"question":[0,"What constant should be imported to conditionally apply config only during development?"],"answer":[0,"Import `PHASE_DEVELOPMENT_SERVER` from `next/constants`. Example: `const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')` then check `if (phase === PHASE_DEVELOPMENT_SERVER)`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-constant-should-be-imported-to-conditionally-apply-config-only-during-devel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-constant-should-be-imported-to-conditionally-apply-config-only-during-devel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-constant-should-be-imported-to-conditionally-apply-config-only-during-devel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What constant should be imported to conditionally apply config only during development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import <code>PHASE_DEVELOPMENT_SERVER</code> from <code>next/constants</code>. Example: <code>const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')</code> then check <code>if (phase === PHASE_DEVELOPMENT_SERVER)</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dHHq1" prefix="r3472" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10158650172005722634"],"question":[0,"What is the default value for the devIndicators position property in Next.js?"],"answer":[0,"The default position is `'bottom-left'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-devindicators-position-property-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-devindicators-position-property-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-devindicators-position-property-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the devIndicators position property in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default position is <code>'bottom-left'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/devIndicators" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16Q0sJ" prefix="r3473" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10546198528986908283"],"question":[0,"What is the minimum TypeScript version required for using next.config.ts?"],"answer":[0,"The minimum TypeScript version required is v5.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-typescript-version-required-for-using-next-config-ts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-typescript-version-required-for-using-next-config-ts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-typescript-version-required-for-using-next-config-ts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum TypeScript version required for using next.config.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The minimum TypeScript version required is v5.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2amRsI" prefix="r3474" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11155482760159964488"],"question":[0,"When was the debugIds option added to Turbopack configuration?"],"answer":[0,"The debugIds option was added in Next.js v16.0.0. It enables generation of debug IDs in JavaScript bundles and source maps."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-debugids-option-added-to-turbopack-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-debugids-option-added-to-turbopack-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-debugids-option-added-to-turbopack-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the debugIds option added to Turbopack configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The debugIds option was added in Next.js v16.0.0. It enables generation of debug IDs in JavaScript bundles and source maps.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23Pq6U" prefix="r3475" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11647088062809001674"],"question":[0,"What are the two possible values for Turbopack's moduleIds configuration?"],"answer":[0,"The two values are: `'named'` (uses readable, named module identifiers) and `'deterministic'` (uses hashed/deterministic module IDs)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-possible-values-for-turbopack-s-moduleids-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-possible-values-for-turbopack-s-moduleids-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-possible-values-for-turbopack-s-moduleids-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two possible values for Turbopack's moduleIds configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The two values are: <code>'named'</code> (uses readable, named module identifiers) and <code>'deterministic'</code> (uses hashed/deterministic module IDs).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="L2Su" prefix="r3476" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12331030737239756363"],"question":[0,"What is the default value for onDemandEntries.pagesBufferLength in Next.js?"],"answer":[0,"The default value is `2` pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-ondemandentries-pagesbufferlength-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-ondemandentries-pagesbufferlength-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-ondemandentries-pagesbufferlength-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for onDemandEntries.pagesBufferLength in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>2</code> pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DaCE1" prefix="r3477" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12756243392070730590"],"question":[0,"What environment variable can be used for comprehensive caching debug logging in Next.js?"],"answer":[0,"Use `NEXT_PRIVATE_DEBUG_CACHE=1 npm run dev`. This logs ISR and other caching mechanisms beyond just fetch logging."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/logging"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-can-be-used-for-comprehensive-caching-debug-logging-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-can-be-used-for-comprehensive-caching-debug-logging-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-can-be-used-for-comprehensive-caching-debug-logging-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable can be used for comprehensive caching debug logging in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>NEXT_PRIVATE_DEBUG_CACHE=1 npm run dev</code>. This logs ISR and other caching mechanisms beyond just fetch logging.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/logging" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1A3xoE" prefix="r3478" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13373813676105716113"],"question":[0,"What properties are available in the defaultLoaders.babel object in webpack configuration?"],"answer":[0,"The defaultLoaders.babel is an Object containing the default babel-loader configuration. It has an `options` property that contains babel configuration including a `presets` array."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-the-defaultloaders-babel-object-in-webpack-conf"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-the-defaultloaders-babel-object-in-webpack-conf" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-the-defaultloaders-babel-object-in-webpack-conf" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in the defaultLoaders.babel object in webpack configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The defaultLoaders.babel is an Object containing the default babel-loader configuration. It has an <code>options</code> property that contains babel configuration including a <code>presets</code> array.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BWnW5" prefix="r3479" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13577988921342528402"],"question":[0,"What is the exact boolean property type for logging.fetches.fullUrl?"],"answer":[0,"`logging.fetches.fullUrl` is a boolean property. When enabled (set to true), it logs the complete URL for fetch requests to the console."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/logging"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-boolean-property-type-for-logging-fetches-fullurl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-boolean-property-type-for-logging-fetches-fullurl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-boolean-property-type-for-logging-fetches-fullurl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact boolean property type for logging.fetches.fullUrl?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>logging.fetches.fullUrl</code> is a boolean property. When enabled (set to true), it logs the complete URL for fetch requests to the console.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/logging" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GB8T1" prefix="r3480" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13616269567045533699"],"question":[0,"What is the value of webpack config's buildId parameter during development?"],"answer":[0,"The buildId is set to `undefined` during development. During production builds, it contains the actual build identifier string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-value-of-webpack-config-s-buildid-parameter-during-development"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-value-of-webpack-config-s-buildid-parameter-during-development" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-value-of-webpack-config-s-buildid-parameter-during-development" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the value of webpack config's buildId parameter during development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The buildId is set to <code>undefined</code> during development. During production builds, it contains the actual build identifier string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="authentication-authorization-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Authentication > Authorization Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 31 questions </span> </div> <div class="space-y-4"> <astro-island uid="2inz3g" prefix="r3481" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"488543846863996620"],"question":[0,"What is a key limitation of React's taint API in Next.js?"],"answer":[0,"Tainting can only keep track of objects by reference. Copying an object creates an untainted version, which loses all guarantees given by the API. You'll need to taint the copy. Also, tainting cannot keep track of data derived from a tainted value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-key-limitation-of-react-s-taint-api-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-key-limitation-of-react-s-taint-api-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-key-limitation-of-react-s-taint-api-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a key limitation of React's taint API in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tainting can only keep track of objects by reference. Copying an object creates an untainted version, which loses all guarantees given by the API. You'll need to taint the copy. Also, tainting cannot keep track of data derived from a tainted value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z4Fp8q" prefix="r3482" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1337067769011189650"],"question":[0,"What environment variable can override the default Server Actions encryption key?"],"answer":[0,"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY. This variable must be AES-GCM encrypted and ensures encryption keys are persistent across builds and all server instances use the same key."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-can-override-the-default-server-actions-encryption-key"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-can-override-the-default-server-actions-encryption-key" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-can-override-the-default-server-actions-encryption-key" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable can override the default Server Actions encryption key?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_SERVER_ACTIONS_ENCRYPTION_KEY. This variable must be AES-GCM encrypted and ensures encryption keys are persistent across builds and all server instances use the same key.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bPCq" prefix="r3483" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1453411377330750179"],"question":[0,"What authorization approach is recommended for new Next.js projects?"],"answer":[0,"Create a dedicated Data Access Layer (DAL) - an internal library that controls how and when data is fetched. The DAL should centralize all data access logic, making it easier to enforce consistent data access and reduce the risk of authorization bugs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-authorization-approach-is-recommended-for-new-next-js-projects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-authorization-approach-is-recommended-for-new-next-js-projects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-authorization-approach-is-recommended-for-new-next-js-projects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What authorization approach is recommended for new Next.js projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a dedicated Data Access Layer (DAL) - an internal library that controls how and when data is fetched. The DAL should centralize all data access logic, making it easier to enforce consistent data access and reduce the risk of authorization bugs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JLeHn" prefix="r3484" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1885062514378284735"],"question":[0,"What is the default behavior regarding SameSite cookies in Next.js for CSRF protection?"],"answer":[0,"SameSite cookies are the default in Next.js, which prevents most CSRF vulnerabilities in modern browsers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-behavior-regarding-samesite-cookies-in-next-js-for-csrf-prot"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-behavior-regarding-samesite-cookies-in-next-js-for-csrf-prot" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-behavior-regarding-samesite-cookies-in-next-js-for-csrf-prot" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default behavior regarding SameSite cookies in Next.js for CSRF protection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SameSite cookies are the default in Next.js, which prevents most CSRF vulnerabilities in modern browsers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17Obje" prefix="r3485" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2091920987294979406"],"question":[0,"What package can be used to prevent server-only code from being executed on the client?"],"answer":[0,"The 'server-only' package. By importing 'server-only' at the top of a module, if you try to import that module into a Client Component, there will be a build-time error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-can-be-used-to-prevent-server-only-code-from-being-executed-on-the-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-can-be-used-to-prevent-server-only-code-from-being-executed-on-the-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-can-be-used-to-prevent-server-only-code-from-being-executed-on-the-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package can be used to prevent server-only code from being executed on the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'server-only' package. By importing 'server-only' at the top of a module, if you try to import that module into a Client Component, there will be a build-time error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gY38U" prefix="r3486" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4011997480776422233"],"question":[0,"What is a Data Access Layer (DAL) in Next.js?"],"answer":[0,"A DAL is an internal library that controls how and when data is fetched, and what gets passed to your render context. It should only run on the server, perform authorization checks, and return safe, minimal Data Transfer Objects (DTOs)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-data-access-layer-dal-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-data-access-layer-dal-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-data-access-layer-dal-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a Data Access Layer (DAL) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A DAL is an internal library that controls how and when data is fetched, and what gets passed to your render context. It should only run on the server, perform authorization checks, and return safe, minimal Data Transfer Objects (DTOs).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uBeuS" prefix="r3487" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4532778773397652458"],"question":[0,"Where should authorization checks be performed according to Next.js best practices?"],"answer":[0,"Authorization checks should be performed as close as possible to your data source. The majority of security checks should be performed in the Data Access Layer (DAL), not just in middleware or UI components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-authorization-checks-be-performed-according-to-next-js-best-practic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-authorization-checks-be-performed-according-to-next-js-best-practic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-authorization-checks-be-performed-according-to-next-js-best-practic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should authorization checks be performed according to Next.js best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Authorization checks should be performed as close as possible to your data source. The majority of security checks should be performed in the Data Access Layer (DAL), not just in middleware or UI components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HoHjW" prefix="r3488" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5179536224532234736"],"question":[0,"When was the middleware file convention deprecated in favor of proxy?"],"answer":[0,"The middleware file convention was deprecated and renamed to proxy starting with Next.js 15.5/16. A codemod is provided: npx @next/codemod@canary middleware-to-proxy ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-to-proxy"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-middleware-file-convention-deprecated-in-favor-of-proxy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-middleware-file-convention-deprecated-in-favor-of-proxy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-middleware-file-convention-deprecated-in-favor-of-proxy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the middleware file convention deprecated in favor of proxy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware file convention was deprecated and renamed to proxy starting with Next.js 15.5/16. A codemod is provided: npx @next/codemod@canary middleware-to-proxy .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-to-proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QVHE9" prefix="r3489" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5205880065098047097"],"question":[0,"What experimental configuration enables React's taint APIs in Next.js?"],"answer":[0,"Set experimental.taint: true in next.config.js. This enables experimental_taintObjectReference and experimental_taintUniqueValue APIs to prevent sensitive data from being accidentally passed to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-configuration-enables-react-s-taint-apis-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-configuration-enables-react-s-taint-apis-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-configuration-enables-react-s-taint-apis-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental configuration enables React's taint APIs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set experimental.taint: true in next.config.js. This enables experimental_taintObjectReference and experimental_taintUniqueValue APIs to prevent sensitive data from being accidentally passed to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="294KY7" prefix="r3490" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5239493057698368062"],"question":[0,"What are the two types of authorization checks recommended by Next.js?"],"answer":[0,"Next.js recommends two types of authorization checks: (1) Optimistic checks - verify authorization using session data stored in cookies, useful for quick operations like showing/hiding UI elements or redirecting users based on permissions or roles. (2) Secure checks - verify authorization using session data stored in the database, which are more secure and used for operations requiring access to sensitive data or actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-types-of-authorization-checks-recommended-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-types-of-authorization-checks-recommended-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-types-of-authorization-checks-recommended-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two types of authorization checks recommended by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends two types of authorization checks: (1) Optimistic checks - verify authorization using session data stored in cookies, useful for quick operations like showing/hiding UI elements or redirecting users based on permissions or roles. (2) Secure checks - verify authorization using session data stored in the database, which are more secure and used for operations requiring access to sensitive data or actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6OJ3e" prefix="r3491" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5318258204327374796"],"question":[0,"How should Server Action arguments be treated for security purposes?"],"answer":[0,"The argument list to Server Actions ('use server') must always be treated as hostile and the input has to be verified. TypeScript annotations are not enforced at runtime, so all arguments should be validated, preferably using tools like Zod."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-server-action-arguments-be-treated-for-security-purposes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-server-action-arguments-be-treated-for-security-purposes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-server-action-arguments-be-treated-for-security-purposes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should Server Action arguments be treated for security purposes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The argument list to Server Actions ('use server') must always be treated as hostile and the input has to be verified. TypeScript annotations are not enforced at runtime, so all arguments should be validated, preferably using tools like Zod.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HCgBT" prefix="r3492" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5359054104214689413"],"question":[0,"What trick can prevent accidentally exposing large objects to Client Components?"],"answer":[0,"Use JavaScript classes for data access records. Return class instances (e.g., new User(decodedToken.id)) instead of plain objects. Classes help prevent accidentally passing the whole object to the client, as they don't serialize the same way."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-trick-can-prevent-accidentally-exposing-large-objects-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-trick-can-prevent-accidentally-exposing-large-objects-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-trick-can-prevent-accidentally-exposing-large-objects-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What trick can prevent accidentally exposing large objects to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use JavaScript classes for data access records. Return class instances (e.g., new User(decodedToken.id)) instead of plain objects. Classes help prevent accidentally passing the whole object to the client, as they don't serialize the same way.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hOWvM" prefix="r3493" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5938464986013923688"],"question":[0,"What HTTP method is exclusively allowed to invoke Server Actions in Next.js?"],"answer":[0,"Server Actions can only be invoked using the POST HTTP method. This is enforced by Next.js to prevent CSRF vulnerabilities."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-is-exclusively-allowed-to-invoke-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-is-exclusively-allowed-to-invoke-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-is-exclusively-allowed-to-invoke-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method is exclusively allowed to invoke Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions can only be invoked using the POST HTTP method. This is enforced by Next.js to prevent CSRF vulnerabilities.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jW4Iu" prefix="r3494" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5978911587467342258"],"question":[0,"How can you configure a custom body size limit for Server Actions?"],"answer":[0,"Use the serverActions.bodySizeLimit option in next.config.js. It accepts the number of bytes or string formats like '500kb', '2mb', '3mb'. Example: experimental: { serverActions: { bodySizeLimit: '2mb' } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-configure-a-custom-body-size-limit-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-configure-a-custom-body-size-limit-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-configure-a-custom-body-size-limit-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you configure a custom body size limit for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the serverActions.bodySizeLimit option in next.config.js. It accepts the number of bytes or string formats like '500kb', '2mb', '3mb'. Example: experimental: { serverActions: { bodySizeLimit: '2mb' } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sYTQj" prefix="r3495" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6610742473425921978"],"question":[0,"What HTTP status code should Route Handlers return for unauthenticated users?"],"answer":[0,"Route Handlers should return status code 401 for unauthenticated users (no valid session)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-should-route-handlers-return-for-unauthenticated-users"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-should-route-handlers-return-for-unauthenticated-users" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-should-route-handlers-return-for-unauthenticated-users" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code should Route Handlers return for unauthenticated users?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers should return status code 401 for unauthenticated users (no valid session).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="65Vo9" prefix="r3496" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7149165037911652812"],"question":[0,"What security principle should Server Component function bodies follow regarding data access?"],"answer":[0,"The principle is that a Server Component function body should only see data that the current user issuing the request is authorized to have access to. Each API must verify user permissions before returning data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-principle-should-server-component-function-bodies-follow-regarding"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-principle-should-server-component-function-bodies-follow-regarding" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-principle-should-server-component-function-bodies-follow-regarding" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security principle should Server Component function bodies follow regarding data access?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The principle is that a Server Component function body should only see data that the current user issuing the request is authorized to have access to. Each API must verify user permissions before returning data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18J4qT" prefix="r3497" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7551234089267592925"],"question":[0,"What is the order of execution for proxy.ts in the Next.js request lifecycle?"],"answer":[0,"Proxy executes in this order: (1) Headers and redirects from next.config.js, (2) Proxy executes, (3) Filesystem routes and dynamic routing. Proxy runs after config headers/redirects but before routes are rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-order-of-execution-for-proxy-ts-in-the-next-js-request-lifecycle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-order-of-execution-for-proxy-ts-in-the-next-js-request-lifecycle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-order-of-execution-for-proxy-ts-in-the-next-js-request-lifecycle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the order of execution for proxy.ts in the Next.js request lifecycle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Proxy executes in this order: (1) Headers and redirects from next.config.js, (2) Proxy executes, (3) Filesystem routes and dynamic routing. Proxy runs after config headers/redirects but before routes are rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1VraRR" prefix="r3498" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8097458029040328278"],"question":[0,"What experimental configuration flag must be enabled to use the unauthorized() and forbidden() functions?"],"answer":[0,"You must enable the experimental authInterrupts option in next.config.js by setting experimental.authInterrupts: true."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/authInterrupts"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-configuration-flag-must-be-enabled-to-use-the-unauthorized-and"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-configuration-flag-must-be-enabled-to-use-the-unauthorized-and" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-configuration-flag-must-be-enabled-to-use-the-unauthorized-and" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental configuration flag must be enabled to use the unauthorized() and forbidden() functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must enable the experimental authInterrupts option in next.config.js by setting experimental.authInterrupts: true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/authInterrupts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2x2CpR" prefix="r3499" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8243687623470735930"],"question":[0,"What configuration option allows Server Actions to be invoked from different origin domains?"],"answer":[0,"Use the serverActions.allowedOrigins configuration option in next.config.js, which accepts an array of strings specifying safe origin domains. Example: allowedOrigins: ['my-proxy.com', '*.my-proxy.com']"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-allows-server-actions-to-be-invoked-from-different-ori"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-allows-server-actions-to-be-invoked-from-different-ori" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-allows-server-actions-to-be-invoked-from-different-ori" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option allows Server Actions to be invoked from different origin domains?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the serverActions.allowedOrigins configuration option in next.config.js, which accepts an array of strings specifying safe origin domains. Example: allowedOrigins: ['my-proxy.com', '*.my-proxy.com']</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RDQQL" prefix="r3500" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8980684792895948174"],"question":[0,"What are Data Transfer Objects (DTOs) used for in Next.js authorization patterns?"],"answer":[0,"DTOs represent selective data objects containing only necessary information. They clarify that data is ready to be consumed by the client and create a layering where security audits can focus primarily on the Data Access Layer. DTOs should return only the public fields that the current user is authorized to access."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-data-transfer-objects-dtos-used-for-in-next-js-authorization-patterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-data-transfer-objects-dtos-used-for-in-next-js-authorization-patterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-data-transfer-objects-dtos-used-for-in-next-js-authorization-patterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are Data Transfer Objects (DTOs) used for in Next.js authorization patterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>DTOs represent selective data objects containing only necessary information. They clarify that data is ready to be consumed by the client and create a layering where security audits can focus primarily on the Data Access Layer. DTOs should return only the public fields that the current user is authorized to access.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1PnNjw" prefix="r3501" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9383316522563588861"],"question":[0,"What React API should be used to memoize the verifySession() function in a Data Access Layer?"],"answer":[0,"Use React's cache() API to memoize the return value of the verifySession() function during a React render pass. This avoids unnecessary duplicate requests to the database."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-api-should-be-used-to-memoize-the-verifysession-function-in-a-data-ac"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-api-should-be-used-to-memoize-the-verifysession-function-in-a-data-ac" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-api-should-be-used-to-memoize-the-verifysession-function-in-a-data-ac" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React API should be used to memoize the verifySession() function in a Data Access Layer?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use React's cache() API to memoize the return value of the verifySession() function during a React render pass. This avoids unnecessary duplicate requests to the database.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6suCc" prefix="r3502" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9863332638417354713"],"question":[0,"In which Next.js version were the unauthorized() and forbidden() functions introduced?"],"answer":[0,"The unauthorized() and forbidden() functions were introduced in Next.js version 15.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/unauthorized"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-were-the-unauthorized-and-forbidden-functions-introduce"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-were-the-unauthorized-and-forbidden-functions-introduce" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-were-the-unauthorized-and-forbidden-functions-introduce" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version were the unauthorized() and forbidden() functions introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The unauthorized() and forbidden() functions were introduced in Next.js version 15.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/unauthorized" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kTt9A" prefix="r3503" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10307816895622806459"],"question":[0,"What CSRF protection mechanism do Server Actions use beyond requiring POST requests?"],"answer":[0,"Server Actions compare the Origin header to the Host header (or X-Forwarded-Host). If they don't match, the Action will be rejected. This ensures Server Actions can only be invoked on the same host as the page that hosts it."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-csrf-protection-mechanism-do-server-actions-use-beyond-requiring-post-reque"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-csrf-protection-mechanism-do-server-actions-use-beyond-requiring-post-reque" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-csrf-protection-mechanism-do-server-actions-use-beyond-requiring-post-reque" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSRF protection mechanism do Server Actions use beyond requiring POST requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions compare the Origin header to the Host header (or X-Forwarded-Host). If they don't match, the Action will be rejected. This ensures Server Actions can only be invoked on the same host as the page that hosts it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BzOff" prefix="r3504" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10658715008899176887"],"question":[0,"What is the default maximum request body size for Server Actions?"],"answer":[0,"The default maximum size is 1MB. This limit helps prevent consumption of excessive server resources and potential DDoS attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-request-body-size-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-request-body-size-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-request-body-size-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum request body size for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default maximum size is 1MB. This limit helps prevent consumption of excessive server resources and potential DDoS attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fkLjy" prefix="r3505" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11965055163381521596"],"question":[0,"What security checks should be performed when auditing 'use server' files?"],"answer":[0,"Check: (1) Are the Action arguments validated in the action or inside the Data Access Layer? (2) Is the user re-authorized inside the action? Server Actions create public HTTP endpoints and should be treated with the same security assumptions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-checks-should-be-performed-when-auditing-use-server-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-checks-should-be-performed-when-auditing-use-server-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-checks-should-be-performed-when-auditing-use-server-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security checks should be performed when auditing 'use server' files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Check: (1) Are the Action arguments validated in the action or inside the Data Access Layer? (2) Is the user re-authorized inside the action? Server Actions create public HTTP endpoints and should be treated with the same security assumptions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eCgUA" prefix="r3506" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12061075705541461203"],"question":[0,"What should session payload contain according to Next.js best practices?"],"answer":[0,"The session payload should contain the minimum, unique user data that'll be used in subsequent requests, such as the user's ID and role. It should NOT contain personally identifiable information like phone number, email address, credit card information, or passwords."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-session-payload-contain-according-to-next-js-best-practices"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-session-payload-contain-according-to-next-js-best-practices" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-session-payload-contain-according-to-next-js-best-practices" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should session payload contain according to Next.js best practices?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The session payload should contain the minimum, unique user data that'll be used in subsequent requests, such as the user's ID and role. It should NOT contain personally identifiable information like phone number, email address, credit card information, or passwords.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gN3uO" prefix="r3507" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12928073328163533947"],"question":[0,"Why is returning null in a layout for unauthorized users not recommended in Next.js applications?"],"answer":[0,"This pattern is not recommended because Next.js applications have multiple entry points, which will not prevent nested route segments and Server Actions from being accessed. Client-side UI restrictions alone are not sufficient for security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-returning-null-in-a-layout-for-unauthorized-users-not-recommended-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-returning-null-in-a-layout-for-unauthorized-users-not-recommended-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-returning-null-in-a-layout-for-unauthorized-users-not-recommended-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is returning null in a layout for unauthorized users not recommended in Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>This pattern is not recommended because Next.js applications have multiple entry points, which will not prevent nested route segments and Server Actions from being accessed. Client-side UI restrictions alone are not sufficient for security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAukUf" prefix="r3508" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12980000347513186661"],"question":[0,"What is the recommended approach for existing large applications to handle authorization with Server Components?"],"answer":[0,"The HTTP APIs approach with Zero Trust principles. Treat Server Components as unsafe/untrusted by default, call custom API endpoints (REST or GraphQL) using fetch() from Server Components just like if it was executing on the client, passing along any cookies with authentication tokens."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-existing-large-applications-to-handle-autho"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-existing-large-applications-to-handle-autho" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-existing-large-applications-to-handle-autho" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for existing large applications to handle authorization with Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The HTTP APIs approach with Zero Trust principles. Treat Server Components as unsafe/untrusted by default, call custom API endpoints (REST or GraphQL) using fetch() from Server Components just like if it was executing on the client, passing along any cookies with authentication tokens.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfQHSg" prefix="r3509" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14211982095049021097"],"question":[0,"What are the two React taint APIs available when experimental.taint is enabled?"],"answer":[0,"experimental_taintObjectReference (to taint object references) and experimental_taintUniqueValue (to taint unique values). When a tainted object or value is passed through the Server-Client boundary, React throws an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-react-taint-apis-available-when-experimental-taint-is-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-react-taint-apis-available-when-experimental-taint-is-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-react-taint-apis-available-when-experimental-taint-is-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two React taint APIs available when experimental.taint is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>experimental_taintObjectReference (to taint object references) and experimental_taintUniqueValue (to taint unique values). When a tainted object or value is passed through the Server-Client boundary, React throws an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZwxenR" prefix="r3510" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14530951941736155318"],"question":[0,"What is a common proxy matcher pattern to exclude static assets and Next.js internals?"],"answer":[0,"matcher: '/((?!api|_next/static|_next/image|favicon.ico).*)', which uses negative lookahead regex. Note that even when _next/data is excluded, proxy will still be invoked for _next/data routes to prevent accidental security issues."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-common-proxy-matcher-pattern-to-exclude-static-assets-and-next-js-inte"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-common-proxy-matcher-pattern-to-exclude-static-assets-and-next-js-inte" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-common-proxy-matcher-pattern-to-exclude-static-assets-and-next-js-inte" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a common proxy matcher pattern to exclude static assets and Next.js internals?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>matcher: '/((?!api|_next/static|_next/image|favicon.ico).*)', which uses negative lookahead regex. Note that even when _next/data is excluded, proxy will still be invoked for _next/data routes to prevent accidental security issues.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19eiC8" prefix="r3511" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15071370496844929406"],"question":[0,"How does Next.js encrypt closed-over variables in Server Actions by default?"],"answer":[0,"Next.js automatically encrypts closed-over variables when using closures in Server Actions. By default, a private key is generated automatically during the build. Each rebuild generates a new private key."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-encrypt-closed-over-variables-in-server-actions-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-encrypt-closed-over-variables-in-server-actions-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-encrypt-closed-over-variables-in-server-actions-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js encrypt closed-over variables in Server Actions by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically encrypts closed-over variables when using closures in Server Actions. By default, a private key is generated automatically during the build. Each rebuild generates a new private key.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="project-structure-configuration-files" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Project Structure > Configuration Files</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 31 questions </span> </div> <div class="space-y-4"> <astro-island uid="18TB4z" prefix="r3512" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"658519140164004593"],"question":[0,"Will NEXT_PUBLIC_ environment variables respond to changes after the build?"],"answer":[0,"No. After being built, your app will no longer respond to changes to NEXT_PUBLIC_ environment variables because they are inlined at build time into the JavaScript bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"will-next-public-environment-variables-respond-to-changes-after-the-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="will-next-public-environment-variables-respond-to-changes-after-the-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#will-next-public-environment-variables-respond-to-changes-after-the-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Will NEXT_PUBLIC_ environment variables respond to changes after the build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. After being built, your app will no longer respond to changes to NEXT_PUBLIC_ environment variables because they are inlined at build time into the JavaScript bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfW9Qk" prefix="r3513" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1757233744342754463"],"question":[0,"Can you use TypeScript for the Next.js configuration file?"],"answer":[0,"Yes. You can use next.config.ts in Next.js 15+. Simply rename your next.config.js or next.config.mjs to next.config.ts and it will work with no other steps required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-typescript-for-the-next-js-configuration-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-typescript-for-the-next-js-configuration-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-typescript-for-the-next-js-configuration-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use TypeScript for the Next.js configuration file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can use next.config.ts in Next.js 15+. Simply rename your next.config.js or next.config.mjs to next.config.ts and it will work with no other steps required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sYVfS" prefix="r3514" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1951198359005992775"],"question":[0,"What directories and files should be included in a Next.js .gitignore?"],"answer":[0,"Include: /node_modules, /.next/, /out/, /build, .DS_Store, *.pem, npm-debug.log*, .env*.local, .vercel, *.tsbuildinfo, next-env.d.ts."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/github/gitignore/blob/main/Nextjs.gitignore"]]],"topic":[0,"nextjs"],"slug":[0,"what-directories-and-files-should-be-included-in-a-next-js-gitignore"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directories-and-files-should-be-included-in-a-next-js-gitignore" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directories-and-files-should-be-included-in-a-next-js-gitignore" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directories and files should be included in a Next.js .gitignore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Include: /node_modules, /.next/, /out/, /build, .DS_Store, <em>.pem, npm-debug.log</em>, .env*.local, .vercel, *.tsbuildinfo, next-env.d.ts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/github/gitignore/blob/main/Nextjs.gitignore" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="10h6oG" prefix="r3515" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2103942904409728920"],"question":[0,"What is the priority order for loading environment variables in Next.js?"],"answer":[0,"1. Process environment variables (highest priority), 2. .env.[environment].local, 3. .env.local (not loaded in test), 4. .env.[environment], 5. .env (lowest priority)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-priority-order-for-loading-environment-variables-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-priority-order-for-loading-environment-variables-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-priority-order-for-loading-environment-variables-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the priority order for loading environment variables in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Process environment variables (highest priority), 2. .env.[environment].local, 3. .env.local (not loaded in test), 4. .env.[environment], 5. .env (lowest priority).</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27AE0O" prefix="r3516" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2419519275555239410"],"question":[0,"How many middleware.ts files are supported per Next.js project?"],"answer":[0,"Only one middleware.ts file is supported per project. You can still use multiple source files, but only a single entry file is allowed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-middleware-ts-files-are-supported-per-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-middleware-ts-files-are-supported-per-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-middleware-ts-files-are-supported-per-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many middleware.ts files are supported per Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only one middleware.ts file is supported per project. You can still use multiple source files, but only a single entry file is allowed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="B7QYG" prefix="r3517" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2642347595663270140"],"question":[0,"What is the performance threshold Next.js monitors for instrumentation-client.js initialization?"],"answer":[0,"Next.js monitors initialization time in development and will log warnings if instrumentation-client.js takes longer than 16ms, which could impact smooth page loading."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-performance-threshold-next-js-monitors-for-instrumentation-client-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-performance-threshold-next-js-monitors-for-instrumentation-client-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-performance-threshold-next-js-monitors-for-instrumentation-client-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the performance threshold Next.js monitors for instrumentation-client.js initialization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js monitors initialization time in development and will log warnings if instrumentation-client.js takes longer than 16ms, which could impact smooth page loading.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOXHmI" prefix="r3518" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3297290651766751774"],"question":[0,"What configuration options are available in tsconfig.json for module path aliases in Next.js?"],"answer":[0,"Next.js has in-built support for the 'paths' and 'baseUrl' options of tsconfig.json and jsconfig.json files, allowing you to alias project directories to absolute paths."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-options-are-available-in-tsconfig-json-for-module-path-aliase"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-options-are-available-in-tsconfig-json-for-module-path-aliase" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-options-are-available-in-tsconfig-json-for-module-path-aliase" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration options are available in tsconfig.json for module path aliases in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js has in-built support for the 'paths' and 'baseUrl' options of tsconfig.json and jsconfig.json files, allowing you to alias project directories to absolute paths.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hT7HU" prefix="r3519" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4859610526489596976"],"question":[0,"What ESLint configuration format does Next.js 16 use?"],"answer":[0,"Starting with Next.js 16, the newer versions use the flat config format (eslint.config.mjs) rather than the legacy .eslintrc.json format. The next lint command has been removed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-eslint-configuration-format-does-next-js-16-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-eslint-configuration-format-does-next-js-16-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-eslint-configuration-format-does-next-js-16-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What ESLint configuration format does Next.js 16 use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting with Next.js 16, the newer versions use the flat config format (eslint.config.mjs) rather than the legacy .eslintrc.json format. The next lint command has been removed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEQEDM" prefix="r3520" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5804084602533163997"],"question":[0,"What is the difference between eslint-config-next and eslint-config-next/core-web-vitals?"],"answer":[0,"eslint-config-next is the base configuration. eslint-config-next/core-web-vitals includes everything from the base config, plus upgrades rules that impact Core Web Vitals from warnings to errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between eslint-config-next and eslint-config-next/core-web-vitals?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-config-next is the base configuration. eslint-config-next/core-web-vitals includes everything from the base config, plus upgrades rules that impact Core Web Vitals from warnings to errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oT8V" prefix="r3521" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6380018335190223704"],"question":[0,"What is the default value of the pageExtensions configuration in Next.js?"],"answer":[0,"The default value is ['tsx', 'ts', 'jsx', 'js']. Next.js accepts files with these extensions by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-pageextensions-configuration-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-pageextensions-configuration-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-pageextensions-configuration-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the pageExtensions configuration in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is ['tsx', 'ts', 'jsx', 'js']. Next.js accepts files with these extensions by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zsw5fQ" prefix="r3522" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6755667648032112822"],"question":[0,"Where should the middleware.ts file be located in a Next.js project?"],"answer":[0,"Use the file middleware.ts (or .js) in the root of your project to define Middleware, at the same level as pages or app, or inside src if applicable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-middleware-ts-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-middleware-ts-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-middleware-ts-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the middleware.ts file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the file middleware.ts (or .js) in the root of your project to define Middleware, at the same level as pages or app, or inside src if applicable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="G67YL" prefix="r3523" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6893877224298807871"],"question":[0,"Should next-env.d.ts be committed to version control?"],"answer":[0,"No. It's recommended to add next-env.d.ts to your .gitignore file, as it is automatically generated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"should-next-env-d-ts-be-committed-to-version-control"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-next-env-d-ts-be-committed-to-version-control" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-next-env-d-ts-be-committed-to-version-control" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should next-env.d.ts be committed to version control?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It's recommended to add next-env.d.ts to your .gitignore file, as it is automatically generated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21bJe6" prefix="r3524" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7634426175818766913"],"question":[0,"Where should the instrumentation.ts file be located in a Next.js project?"],"answer":[0,"Create instrumentation.ts|js file in the root directory of your project (or inside the src folder if using one). The file should not be inside the app or pages directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-instrumentation-ts-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-instrumentation-ts-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-instrumentation-ts-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the instrumentation.ts file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create instrumentation.ts|js file in the root directory of your project (or inside the src folder if using one). The file should not be inside the app or pages directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1BiXLa" prefix="r3525" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7912057682899098119"],"question":[0,"Is .env.local loaded during test environment (NODE_ENV=test) in Next.js?"],"answer":[0,"No. .env.local won't be loaded in the test environment, as you expect tests to produce the same results for everyone."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"is-env-local-loaded-during-test-environment-node-env-test-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-env-local-loaded-during-test-environment-node-env-test-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-env-local-loaded-during-test-environment-node-env-test-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is .env.local loaded during test environment (NODE_ENV=test) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. .env.local won't be loaded in the test environment, as you expect tests to produce the same results for everyone.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgsodC" prefix="r3526" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9107800048780065694"],"question":[0,"What is the naming convention for private folders in Next.js?"],"answer":[0,"Private folders can be created by prefixing a folder with an underscore: _folderName. This opts the folder and all its sub-folders out of routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-naming-convention-for-private-folders-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-naming-convention-for-private-folders-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-naming-convention-for-private-folders-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the naming convention for private folders in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Private folders can be created by prefixing a folder with an underscore: _folderName. This opts the folder and all its sub-folders out of routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wTpql" prefix="r3527" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9381825931616288711"],"question":[0,"Is next.config.js included in the browser build?"],"answer":[0,"No. next.config.js is a regular Node.js module used by the Next.js server and build phases, and it's not included in the browser build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"is-next-config-js-included-in-the-browser-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-next-config-js-included-in-the-browser-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-next-config-js-included-in-the-browser-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is next.config.js included in the browser build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. next.config.js is a regular Node.js module used by the Next.js server and build phases, and it's not included in the browser build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rhQKI" prefix="r3528" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10296628030652091593"],"question":[0,"What is the environment variable NEXT_RUNTIME used for in instrumentation.ts?"],"answer":[0,"Use NEXT_RUNTIME to conditionally import code for different runtimes. Values are 'nodejs' or 'edge', allowing you to run different instrumentation code based on the runtime environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-environment-variable-next-runtime-used-for-in-instrumentation-ts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-environment-variable-next-runtime-used-for-in-instrumentation-ts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-environment-variable-next-runtime-used-for-in-instrumentation-ts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the environment variable NEXT_RUNTIME used for in instrumentation.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use NEXT_RUNTIME to conditionally import code for different runtimes. Values are 'nodejs' or 'edge', allowing you to run different instrumentation code based on the runtime environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BLs7O" prefix="r3529" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10871559498809219616"],"question":[0,"What package provides the loadEnvConfig function for loading environment variables in Next.js?"],"answer":[0,"The @next/env package provides the loadEnvConfig function. Use loadEnvConfig(projectDir) to load environment variables the same way Next.js does, commonly used in test setup files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-provides-the-loadenvconfig-function-for-loading-environment-variabl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-provides-the-loadenvconfig-function-for-loading-environment-variabl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-provides-the-loadenvconfig-function-for-loading-environment-variabl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package provides the loadEnvConfig function for loading environment variables in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The @next/env package provides the loadEnvConfig function. Use loadEnvConfig(projectDir) to load environment variables the same way Next.js does, commonly used in test setup files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HCVwQ" prefix="r3530" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10949748097346091543"],"question":[0,"What file does Next.js generate for TypeScript type definitions?"],"answer":[0,"Next.js generates a next-env.d.ts file in your project root. This file references Next.js type definitions, allowing TypeScript to recognize non-code imports and Next.js-specific types."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-generate-for-typescript-type-definitions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-generate-for-typescript-type-definitions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-generate-for-typescript-type-definitions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js generate for TypeScript type definitions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a next-env.d.ts file in your project root. This file references Next.js type definitions, allowing TypeScript to recognize non-code imports and Next.js-specific types.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CTOFe" prefix="r3531" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11120225099043057187"],"question":[0,"Where should package.json, next.config.js, and tsconfig.json be located when using the src folder?"],"answer":[0,"Config files like package.json, next.config.js and tsconfig.json should remain in the root of your project, even when using the src folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-package-json-next-config-js-and-tsconfig-json-be-located-when-using"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-package-json-next-config-js-and-tsconfig-json-be-located-when-using" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-package-json-next-config-js-and-tsconfig-json-be-located-when-using" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should package.json, next.config.js, and tsconfig.json be located when using the src folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Config files like package.json, next.config.js and tsconfig.json should remain in the root of your project, even when using the src folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cMP5O" prefix="r3532" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11342674696314633783"],"question":[0,"Does instrumentation-client.js require exporting specific functions?"],"answer":[0,"No. Unlike server-side instrumentation, you do not need to export any specific functions. You can write your monitoring code directly in the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"does-instrumentation-client-js-require-exporting-specific-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-instrumentation-client-js-require-exporting-specific-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-instrumentation-client-js-require-exporting-specific-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does instrumentation-client.js require exporting specific functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Unlike server-side instrumentation, you do not need to export any specific functions. You can write your monitoring code directly in the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28Uefo" prefix="r3533" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11525580099601787015"],"question":[0,"What runtime does proxy.ts use in Next.js 16?"],"answer":[0,"proxy.ts runs on the Node.js runtime. The edge runtime is NOT supported in proxy, and the runtime cannot be configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-does-proxy-ts-use-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-does-proxy-ts-use-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-does-proxy-ts-use-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime does proxy.ts use in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>proxy.ts runs on the Node.js runtime. The edge runtime is NOT supported in proxy, and the runtime cannot be configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pCGaA" prefix="r3534" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11895227614021264172"],"question":[0,"What function must be exported from instrumentation.ts?"],"answer":[0,"Export a register function in the instrumentation.ts file. The register function is called once when a new Next.js server instance is initiated and can be an async function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-must-be-exported-from-instrumentation-ts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-must-be-exported-from-instrumentation-ts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-must-be-exported-from-instrumentation-ts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function must be exported from instrumentation.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a register function in the instrumentation.ts file. The register function is called once when a new Next.js server instance is initiated and can be an async function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DMf8s" prefix="r3535" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12099006415781307929"],"question":[0,"Where should .env files be located in a Next.js project?"],"answer":[0,".env.* files should remain in the root of your project, not inside the src folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-env-files-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-env-files-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-env-files-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should .env files be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.env.* files should remain in the root of your project, not inside the src folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yjcTC" prefix="r3536" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13027699569540772088"],"question":[0,"What ESLint configuration package does Next.js provide?"],"answer":[0,"Next.js provides eslint-config-next, which includes the @next/eslint-plugin-next plugin along with recommended rule-sets from eslint-plugin-react and eslint-plugin-react-hooks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-eslint-configuration-package-does-next-js-provide"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-eslint-configuration-package-does-next-js-provide" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-eslint-configuration-package-does-next-js-provide" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What ESLint configuration package does Next.js provide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js provides eslint-config-next, which includes the @next/eslint-plugin-next plugin along with recommended rule-sets from eslint-plugin-react and eslint-plugin-react-hooks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mz7Xz" prefix="r3537" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13146887027500705597"],"question":[0,"What happens if both src/app and app exist in a Next.js project?"],"answer":[0,"src/app or src/pages will be ignored if app or pages are present in the root directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-both-src-app-and-app-exist-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-both-src-app-and-app-exist-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-both-src-app-and-app-exist-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if both src/app and app exist in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>src/app or src/pages will be ignored if app or pages are present in the root directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ByubL" prefix="r3538" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13559395705899453193"],"question":[0,"What are the allowed values for NODE_ENV in Next.js?"],"answer":[0,"The allowed values for NODE_ENV are production, development, and test."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-allowed-values-for-node-env-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-allowed-values-for-node-env-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-allowed-values-for-node-env-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the allowed values for NODE_ENV in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The allowed values for NODE_ENV are production, development, and test.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZF1uyc" prefix="r3539" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13651613461391235580"],"question":[0,"Where should the instrumentation-client.js file be located?"],"answer":[0,"Place instrumentation-client.js|ts in the root of your application or inside a src folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-instrumentation-client-js-file-be-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-instrumentation-client-js-file-be-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-instrumentation-client-js-file-be-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the instrumentation-client.js file be located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place instrumentation-client.js|ts in the root of your application or inside a src folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQI6bH" prefix="r3540" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14277715578935146584"],"question":[0,"Will dynamic lookups of NEXT_PUBLIC_ environment variables work in Next.js?"],"answer":[0,"No. Dynamic lookups will NOT be inlined. For example: const varName = 'NEXT_PUBLIC_ANALYTICS_ID'; process.env[varName] will not work because it uses a variable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"will-dynamic-lookups-of-next-public-environment-variables-work-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="will-dynamic-lookups-of-next-public-environment-variables-work-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#will-dynamic-lookups-of-next-public-environment-variables-work-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Will dynamic lookups of NEXT_PUBLIC_ environment variables work in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Dynamic lookups will NOT be inlined. For example: const varName = 'NEXT_PUBLIC_ANALYTICS_ID'; process.env[varName] will not work because it uses a variable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Uv3VW" prefix="r3541" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14576727122812945431"],"question":[0,"What TypeScript configuration options are available in next.config.js?"],"answer":[0,"The typescript option in next.config.js supports: ignoreBuildErrors (boolean to allow builds despite type errors, default false) and tsconfigPath (specify different TypeScript config file, default 'tsconfig.json')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-configuration-options-are-available-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-configuration-options-are-available-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-configuration-options-are-available-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript configuration options are available in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The typescript option in next.config.js supports: ignoreBuildErrors (boolean to allow builds despite type errors, default false) and tsconfigPath (specify different TypeScript config file, default 'tsconfig.json').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3wrVP" prefix="r3542" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15049421456684822264"],"question":[0,"What prefix must environment variables have to be exposed to the browser in Next.js?"],"answer":[0,"Environment variables must be prefixed with NEXT_PUBLIC_ to be exposed to the browser. Next.js inlines these values at build time into the JavaScript bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-prefix-must-environment-variables-have-to-be-exposed-to-the-browser-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prefix-must-environment-variables-have-to-be-exposed-to-the-browser-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prefix-must-environment-variables-have-to-be-exposed-to-the-browser-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prefix must environment variables have to be exposed to the browser in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables must be prefixed with NEXT_PUBLIC_ to be exposed to the browser. Next.js inlines these values at build time into the JavaScript bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="forms-and-mutations-server-function-fundamentals" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Forms and Mutations > Server Function Fundamentals</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 30 questions </span> </div> <div class="space-y-4"> <astro-island uid="OD2Ys" prefix="r3543" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"38997296953041399"],"question":[0,"Can inline Server Actions access variables from their parent component's scope?"],"answer":[0,"Yes. Defining a Server Action inside a component creates a closure where the action has access to the outer function's scope, capturing a snapshot of variables at rendering time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-inline-server-actions-access-variables-from-their-parent-component-s-scope"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-inline-server-actions-access-variables-from-their-parent-component-s-scope" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-inline-server-actions-access-variables-from-their-parent-component-s-scope" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can inline Server Actions access variables from their parent component's scope?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Defining a Server Action inside a component creates a closure where the action has access to the outer function's scope, capturing a snapshot of variables at rendering time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JUf3l" prefix="r3544" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"272253776826383480"],"question":[0,"What are the serialization requirements for Server Action arguments and return values?"],"answer":[0,"Both arguments and return values must be serializable by React. This includes JSON types plus Date, Map, Set, but excludes functions and custom class instances."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-serialization-requirements-for-server-action-arguments-and-return-v"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-serialization-requirements-for-server-action-arguments-and-return-v" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-serialization-requirements-for-server-action-arguments-and-return-v" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the serialization requirements for Server Action arguments and return values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both arguments and return values must be serializable by React. This includes JSON types plus Date, Map, Set, but excludes functions and custom class instances.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qG63m" prefix="r3545" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1234043923556939180"],"question":[0,"What HTTP method do Server Actions use?"],"answer":[0,"Server Actions use the POST method exclusively. Only this HTTP method can invoke them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-do-server-actions-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-do-server-actions-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-do-server-actions-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method do Server Actions use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions use the POST method exclusively. Only this HTTP method can invoke them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vbYcp" prefix="r3546" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3953145242538652047"],"question":[0,"What is the exact function signature of revalidatePath()?"],"answer":[0,"revalidatePath(path: string, type?: 'page' | 'layout'): void. The path parameter is required, type is optional and defaults to 'page'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-function-signature-of-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-function-signature-of-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-function-signature-of-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact function signature of revalidatePath()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidatePath(path: string, type?: 'page' | 'layout'): void. The path parameter is required, type is optional and defaults to 'page'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Pqkl3" prefix="r3547" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4641929617079422082"],"question":[0,"What happens to the encryption key when you rebuild a Next.js application?"],"answer":[0,"By default, a new private key is generated automatically during each build, meaning each Server Action can only be invoked for that specific build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-encryption-key-when-you-rebuild-a-next-js-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-encryption-key-when-you-rebuild-a-next-js-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-encryption-key-when-you-rebuild-a-next-js-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the encryption key when you rebuild a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, a new private key is generated automatically during each build, meaning each Server Action can only be invoked for that specific build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1EKkNF" prefix="r3548" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5316591191227328194"],"question":[0,"How can you pass additional arguments to a Server Action beyond FormData?"],"answer":[0,"Use JavaScript's .bind() method. Example: const updateUserWithId = updateUser.bind(null, userId). The bound argument(s) come before FormData in the function parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-pass-additional-arguments-to-a-server-action-beyond-formdata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-pass-additional-arguments-to-a-server-action-beyond-formdata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-pass-additional-arguments-to-a-server-action-beyond-formdata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you pass additional arguments to a Server Action beyond FormData?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use JavaScript's .bind() method. Example: const updateUserWithId = updateUser.bind(null, userId). The bound argument(s) come before FormData in the function parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1x2kHC" prefix="r3549" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5666534164765704038"],"question":[0,"Do Next.js Server Actions use CSRF tokens for protection?"],"answer":[0,"No. Server Actions don't use CSRF tokens. They rely on Origin/Host header comparison and SameSite cookies instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-server-actions-use-csrf-tokens-for-protection"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-server-actions-use-csrf-tokens-for-protection" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-server-actions-use-csrf-tokens-for-protection" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js Server Actions use CSRF tokens for protection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Actions don't use CSRF tokens. They rely on Origin/Host header comparison and SameSite cookies instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZljdG2" prefix="r3550" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6732790376062724126"],"question":[0,"What is the maximum character length for the path parameter in revalidatePath()?"],"answer":[0,"1024 characters. The path cannot exceed this length."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the path parameter in revalidatePath()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 characters. The path cannot exceed this length.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wY2bS" prefix="r3551" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7690074700040530275"],"question":[0,"What parameter does a Server Action automatically receive when invoked through a form submission?"],"answer":[0,"A FormData object containing the form fields. This happens automatically when the action is used with a form's action prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameter-does-a-server-action-automatically-receive-when-invoked-through-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameter-does-a-server-action-automatically-receive-when-invoked-through-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameter-does-a-server-action-automatically-receive-when-invoked-through-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameter does a Server Action automatically receive when invoked through a form submission?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A FormData object containing the form fields. This happens automatically when the action is used with a form's action prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1qLYoG" prefix="r3552" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7988268623096679553"],"question":[0,"Can Server Actions be synchronous functions?"],"answer":[0,"No. Server Actions must be asynchronous functions (defined with async) because they can be called from the client through a network request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-synchronous-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-synchronous-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-synchronous-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be synchronous functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Actions must be asynchronous functions (defined with async) because they can be called from the client through a network request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z169CzP" prefix="r3553" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8103296524834723503"],"question":[0,"In which Next.js version did Server Actions become stable and enabled by default?"],"answer":[0,"Next.js 14 (October 2023). In Next.js 13, they were experimental and required the experimental.serverActions flag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-14"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-server-actions-become-stable-and-enabled-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-server-actions-become-stable-and-enabled-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-server-actions-become-stable-and-enabled-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did Server Actions become stable and enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 14 (October 2023). In Next.js 13, they were experimental and required the experimental.serverActions flag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ADK75" prefix="r3554" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8622188067185167229"],"question":[0,"Can Server Actions be passed as props to Client Components?"],"answer":[0,"Yes. Server Actions can be passed to Client Components as props, providing an alternative to importing them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-passed-as-props-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-passed-as-props-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-passed-as-props-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be passed as props to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Actions can be passed to Client Components as props, providing an alternative to importing them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKtnKp" prefix="r3555" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8675675506099606797"],"question":[0,"What does redirect() do when called in a Server Action?"],"answer":[0,"It throws a NEXT_REDIRECT error (a control-flow exception) and terminates execution. Any code after redirect() won't execute."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-redirect-do-when-called-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-redirect-do-when-called-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-redirect-do-when-called-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does redirect() do when called in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It throws a NEXT_REDIRECT error (a control-flow exception) and terminates execution. Any code after redirect() won't execute.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="erPEl" prefix="r3556" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8796214377849735451"],"question":[0,"What does revalidatePath() return?"],"answer":[0,"Nothing (void). revalidatePath does not return a value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatepath-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatepath-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatepath-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidatePath() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Nothing (void). revalidatePath does not return a value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qbtnI" prefix="r3557" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9597406551289511489"],"question":[0,"What are the valid ways to invoke a Server Action?"],"answer":[0,"1) Form action prop, 2) Button/input formAction prop, 3) Event handlers (onClick, etc.) in Client Components, 4) useEffect for automatic triggers, 5) useActionState hook."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-ways-to-invoke-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-ways-to-invoke-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-ways-to-invoke-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid ways to invoke a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Form action prop, 2) Button/input formAction prop, 3) Event handlers (onClick, etc.) in Client Components, 4) useEffect for automatic triggers, 5) useActionState hook.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Sa5IH" prefix="r3558" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9646677459476528234"],"question":[0,"What gotcha exists when using Object.fromEntries() on FormData in Server Actions?"],"answer":[0,"The resulting object will contain extra properties prefixed with $ACTION_ in addition to your actual form fields."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-gotcha-exists-when-using-object-fromentries-on-formdata-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-gotcha-exists-when-using-object-fromentries-on-formdata-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-gotcha-exists-when-using-object-fromentries-on-formdata-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What gotcha exists when using Object.fromEntries() on FormData in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The resulting object will contain extra properties prefixed with $ACTION_ in addition to your actual form fields.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NnyjM" prefix="r3559" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9655419943538999614"],"question":[0,"What formats does the serverActions.bodySizeLimit configuration accept?"],"answer":[0,"It accepts numbers (bytes) or string formats like '500kb', '3mb'. Examples: 1000, '500kb', '2mb'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-formats-does-the-serveractions-bodysizelimit-configuration-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-formats-does-the-serveractions-bodysizelimit-configuration-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-formats-does-the-serveractions-bodysizelimit-configuration-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What formats does the serverActions.bodySizeLimit configuration accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It accepts numbers (bytes) or string formats like '500kb', '3mb'. Examples: 1000, '500kb', '2mb'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQ4mS0" prefix="r3560" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11301629400061432536"],"question":[0,"How does the function signature change when a Server Action is used with useActionState or useFormState?"],"answer":[0,"The action receives a prevState (or initialState) parameter as its first argument, before FormData. Signature: async function(prevState: any, formData: FormData)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-function-signature-change-when-a-server-action-is-used-with-useacti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-function-signature-change-when-a-server-action-is-used-with-useacti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-function-signature-change-when-a-server-action-is-used-with-useacti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the function signature change when a Server Action is used with useActionState or useFormState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The action receives a prevState (or initialState) parameter as its first argument, before FormData. Signature: async function(prevState: any, formData: FormData)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2thUal" prefix="r3561" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11694896321907296604"],"question":[0,"How does Next.js protect Server Actions from CSRF attacks?"],"answer":[0,"Server Actions compare the Origin header to the Host header (or X-Forwarded-Host). If they don't match, the request is aborted. They also rely on SameSite cookies being the default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-protect-server-actions-from-csrf-attacks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-protect-server-actions-from-csrf-attacks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-protect-server-actions-from-csrf-attacks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js protect Server Actions from CSRF attacks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions compare the Origin header to the Host header (or X-Forwarded-Host). If they don't match, the request is aborted. They also rely on SameSite cookies being the default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z283muX" prefix="r3562" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12734133111417402489"],"question":[0,"Do Server Actions support progressive enhancement by default in Server Components?"],"answer":[0,"Yes. Server Actions in Server Components support progressive enhancement, meaning forms will be submitted even if JavaScript hasn't loaded yet or is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-actions-support-progressive-enhancement-by-default-in-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-actions-support-progressive-enhancement-by-default-in-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-actions-support-progressive-enhancement-by-default-in-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Actions support progressive enhancement by default in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Actions in Server Components support progressive enhancement, meaning forms will be submitted even if JavaScript hasn't loaded yet or is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PdvQx" prefix="r3563" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12907994655753469257"],"question":[0,"When is the type parameter required in revalidatePath()?"],"answer":[0,"When the path contains dynamic segments (e.g., /product/[slug]). For specific URLs like /product/1, the type parameter should be omitted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-type-parameter-required-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-type-parameter-required-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-type-parameter-required-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the type parameter required in revalidatePath()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When the path contains dynamic segments (e.g., /product/[slug]). For specific URLs like /product/1, the type parameter should be omitted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26DVc1" prefix="r3564" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13103175973140401178"],"question":[0,"Are arguments passed via .bind() encrypted like closure variables?"],"answer":[0,"No. Variables passed using .bind() are NOT encrypted, which provides an opt-out for performance. However, they are still encoded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"are-arguments-passed-via-bind-encrypted-like-closure-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-arguments-passed-via-bind-encrypted-like-closure-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-arguments-passed-via-bind-encrypted-like-closure-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are arguments passed via .bind() encrypted like closure variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Variables passed using .bind() are NOT encrypted, which provides an opt-out for performance. However, they are still encoded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jvb7n" prefix="r3565" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13332129062267624457"],"question":[0,"What format does serverActions.allowedOrigins accept?"],"answer":[0,"An array of strings representing safe origin domains. It supports wildcards, e.g., ['my-proxy.com', '*.my-proxy.com']."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-does-serveractions-allowedorigins-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-does-serveractions-allowedorigins-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-does-serveractions-allowedorigins-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format does serverActions.allowedOrigins accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of strings representing safe origin domains. It supports wildcards, e.g., ['my-proxy.com', '*.my-proxy.com'].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZvOcBk" prefix="r3566" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13421561420677351036"],"question":[0,"How can you ensure consistent encryption keys across multiple server instances?"],"answer":[0,"Set the NEXT_SERVER_ACTIONS_ENCRYPTION_KEY environment variable. This ensures all server instances use the same encryption key instead of generating different keys per build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-ensure-consistent-encryption-keys-across-multiple-server-instances"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-ensure-consistent-encryption-keys-across-multiple-server-instances" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-ensure-consistent-encryption-keys-across-multiple-server-instances" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you ensure consistent encryption keys across multiple server instances?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set the NEXT_SERVER_ACTIONS_ENCRYPTION_KEY environment variable. This ensures all server instances use the same encryption key instead of generating different keys per build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSqOqE" prefix="r3567" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13715771342908248068"],"question":[0,"What HTML elements can use the formAction prop to invoke Server Actions?"],"answer":[0,"<button>, <input type=\"submit\">, and <input type=\"image\"> elements. This allows multiple Server Actions within a single form."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-elements-can-use-the-formaction-prop-to-invoke-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-elements-can-use-the-formaction-prop-to-invoke-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-elements-can-use-the-formaction-prop-to-invoke-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML elements can use the formAction prop to invoke Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><button>, <input type="submit">, and <input type="image"> elements. This allows multiple Server Actions within a single form.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jyLct" prefix="r3568" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13745386669008469948"],"question":[0,"What is the default value for serverActions.allowedOrigins?"],"answer":[0,"Only the same origin is allowed by default. No cross-origin requests are permitted unless explicitly configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-serveractions-allowedorigins"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-serveractions-allowedorigins" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-serveractions-allowedorigins" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for serverActions.allowedOrigins?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the same origin is allowed by default. No cross-origin requests are permitted unless explicitly configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tpOdV" prefix="r3569" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13773189303656000904"],"question":[0,"What React prop does Next.js extend to support Server Actions in forms?"],"answer":[0,"The action prop on the HTML <form> element. React extends it to allow Server Actions to be invoked, automatically passing the FormData object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/forms-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-prop-does-next-js-extend-to-support-server-actions-in-forms"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-prop-does-next-js-extend-to-support-server-actions-in-forms" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-prop-does-next-js-extend-to-support-server-actions-in-forms" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React prop does Next.js extend to support Server Actions in forms?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The action prop on the HTML <form> element. React extends it to allow Server Actions to be invoked, automatically passing the FormData object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/forms-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGrHt1" prefix="r3570" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13843697687661412942"],"question":[0,"What directive is used to mark a function as a Server Action in Next.js?"],"answer":[0,"The 'use server' directive (as a string literal). It can be placed at the top of an async function to mark that specific function, or at the top of a file to mark all exports as Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-is-used-to-mark-a-function-as-a-server-action-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-is-used-to-mark-a-function-as-a-server-action-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-is-used-to-mark-a-function-as-a-server-action-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive is used to mark a function as a Server Action in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use server' directive (as a string literal). It can be placed at the top of an async function to mark that specific function, or at the top of a file to mark all exports as Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YjXxt" prefix="r3571" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13954209231201879125"],"question":[0,"What happens to form submissions in Client Components if JavaScript hasn't loaded yet?"],"answer":[0,"Submissions are queued if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser won't refresh on submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-form-submissions-in-client-components-if-javascript-hasn-t-loade"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-form-submissions-in-client-components-if-javascript-hasn-t-loade" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-form-submissions-in-client-components-if-javascript-hasn-t-loade" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to form submissions in Client Components if JavaScript hasn't loaded yet?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Submissions are queued if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser won't refresh on submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kiTT5" prefix="r3572" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15002075930082882678"],"question":[0,"Can Client Components define Server Actions inline using 'use server'?"],"answer":[0,"No. Client Components can only import Server Actions from files that use the module-level 'use server' directive. They cannot define Server Actions directly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-define-server-actions-inline-using-use-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-define-server-actions-inline-using-use-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-define-server-actions-inline-using-use-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components define Server Actions inline using 'use server'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Client Components can only import Server Actions from files that use the module-level 'use server' directive. They cannot define Server Actions directly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-data-flow-and-props" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Data Flow and Props</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 30 questions </span> </div> <div class="space-y-4"> <astro-island uid="1GadvF" prefix="r3573" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"121622379372268750"],"question":[0,"Can you pass class instances as props from Server Components to Client Components?"],"answer":[0,"No, class instances (except built-in objects like Date, Map, Set, etc.) cannot be passed as props and are not serializable."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-class-instances-as-props-from-server-components-to-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-class-instances-as-props-from-server-components-to-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-class-instances-as-props-from-server-components-to-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass class instances as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, class instances (except built-in objects like Date, Map, Set, etc.) cannot be passed as props and are not serializable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2p0Nvf" prefix="r3574" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"834864465956257513"],"question":[0,"What happens to code flow when you need to access server data from within a Client Component subtree?"],"answer":[0,"You'll be making a new request to the server - not switching back and forth. It's a completely new request cycle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-code-flow-when-you-need-to-access-server-data-from-within-a-clie"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-code-flow-when-you-need-to-access-server-data-from-within-a-clie" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-code-flow-when-you-need-to-access-server-data-from-within-a-clie" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to code flow when you need to access server data from within a Client Component subtree?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You'll be making a new request to the server - not switching back and forth. It's a completely new request cycle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2825fY" prefix="r3575" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1063846442452844003"],"question":[0,"Can you pass Set objects as props from Server Components to Client Components?"],"answer":[0,"Yes, Set objects are serializable and can be passed directly from Server to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-set-objects-as-props-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-set-objects-as-props-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-set-objects-as-props-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass Set objects as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Set objects are serializable and can be passed directly from Server to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15J6dY" prefix="r3576" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2063387564274051562"],"question":[0,"What is the relationship between serializable return values for Server Actions and serializable props for Client Components?"],"answer":[0,"Supported serializable return values for Server Actions are the same as serializable props for a boundary Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-relationship-between-serializable-return-values-for-server-actions-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-relationship-between-serializable-return-values-for-server-actions-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-relationship-between-serializable-return-values-for-server-actions-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the relationship between serializable return values for Server Actions and serializable props for Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Supported serializable return values for Server Actions are the same as serializable props for a boundary Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2u51XN" prefix="r3577" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2805309795143603038"],"question":[0,"Can you pass event handler event objects as props from Server to Client Components?"],"answer":[0,"No, event handler events are explicitly not supported and cannot be serialized."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-event-handler-event-objects-as-props-from-server-to-client-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-event-handler-event-objects-as-props-from-server-to-client-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-event-handler-event-objects-as-props-from-server-to-client-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass event handler event objects as props from Server to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, event handler events are explicitly not supported and cannot be serialized.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqJM77" prefix="r3578" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3109239511204815381"],"question":[0,"What is required when using the use Hook to stream promises from Server to Client Components?"],"answer":[0,"The promise must be wrapped in a <Suspense> boundary in the parent component, and the Client Component receiving the promise must have 'use client' at the top."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-when-using-the-use-hook-to-stream-promises-from-server-to-clien"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-when-using-the-use-hook-to-stream-promises-from-server-to-clien" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-when-using-the-use-hook-to-stream-promises-from-server-to-clien" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required when using the use Hook to stream promises from Server to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The promise must be wrapped in a <Suspense> boundary in the parent component, and the Client Component receiving the promise must have 'use client' at the top.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjMUPK" prefix="r3579" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3597958356490958866"],"question":[0,"What happens when you try to pass a non-Server Action function from a Server Component to a Client Component?"],"answer":[0,"You will get an error: 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with \"use server\"'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-try-to-pass-a-non-server-action-function-from-a-server-com"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-try-to-pass-a-non-server-action-function-from-a-server-com" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-try-to-pass-a-non-server-action-function-from-a-server-com" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you try to pass a non-Server Action function from a Server Component to a Client Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You will get an error: 'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server"'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHrLK0" prefix="r3580" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3722117640481543154"],"question":[0,"When Server Components are passed as children to Client Components, when are they rendered?"],"answer":[0,"All Server Components are rendered on the server ahead of time, including those passed as props or children to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"when-server-components-are-passed-as-children-to-client-components-when-are-they"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-server-components-are-passed-as-children-to-client-components-when-are-they" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-server-components-are-passed-as-children-to-client-components-when-are-they" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When Server Components are passed as children to Client Components, when are they rendered?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All Server Components are rendered on the server ahead of time, including those passed as props or children to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2oU1aa" prefix="r3581" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4074709116332551038"],"question":[0,"How should you pass a Server Component to a Client Component - as a function reference or as JSX?"],"answer":[0,"You should pass a Server Component as a React Element using JSX (e.g., <ServerComponent />), not as a function reference."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-pass-a-server-component-to-a-client-component-as-a-function-refer"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-pass-a-server-component-to-a-client-component-as-a-function-refer" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-pass-a-server-component-to-a-client-component-as-a-function-refer" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you pass a Server Component to a Client Component - as a function reference or as JSX?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should pass a Server Component as a React Element using JSX (e.g., <ServerComponent />), not as a function reference.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rO7wg" prefix="r3582" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5031946350585563088"],"question":[0,"Can you pass props from Server Components to Client Components in Next.js?"],"answer":[0,"Yes, you can pass data from Server Components to Client Components using props."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-props-from-server-components-to-client-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-props-from-server-components-to-client-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-props-from-server-components-to-client-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass props from Server Components to Client Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can pass data from Server Components to Client Components using props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GKBxI" prefix="r3583" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6313094107701314995"],"question":[0,"Can you pass regular functions as props from Server Components to Client Components?"],"answer":[0,"No, functions cannot be passed directly to Client Components unless you explicitly expose them by marking them with 'use server'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-regular-functions-as-props-from-server-components-to-client-compone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-regular-functions-as-props-from-server-components-to-client-compone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-regular-functions-as-props-from-server-components-to-client-compone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass regular functions as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, functions cannot be passed directly to Client Components unless you explicitly expose them by marking them with 'use server'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11kxeX" prefix="r3584" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6408090538993920647"],"question":[0,"When a component imports values from a 'use client' module in a server context, what types of values are allowed?"],"answer":[0,"The values must either be a React component or supported serializable prop values to be passed to a Client Component. Any other use case will throw an exception."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"when-a-component-imports-values-from-a-use-client-module-in-a-server-context-wha"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-a-component-imports-values-from-a-use-client-module-in-a-server-context-wha" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-a-component-imports-values-from-a-use-client-module-in-a-server-context-wha" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When a component imports values from a 'use client' module in a server context, what types of values are allowed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The values must either be a React component or supported serializable prop values to be passed to a Client Component. Any other use case will throw an exception.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1O18id" prefix="r3585" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6684499373486470024"],"question":[0,"What three elements does the RSC Payload contain?"],"answer":[0,"The RSC Payload contains: (1) the rendered result of Server Components, (2) placeholders and references for where Client Components should render and their JavaScript file locations, and (3) props passed from Server Components to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-elements-does-the-rsc-payload-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-elements-does-the-rsc-payload-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-elements-does-the-rsc-payload-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three elements does the RSC Payload contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload contains: (1) the rendered result of Server Components, (2) placeholders and references for where Client Components should render and their JavaScript file locations, and (3) props passed from Server Components to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lUlzt" prefix="r3586" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7355478386251390099"],"question":[0,"Can you pass plain objects created with object initializers as props to Client Components?"],"answer":[0,"Yes, plain objects created with object initializers are serializable, as long as their properties are also serializable."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-plain-objects-created-with-object-initializers-as-props-to-client-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-plain-objects-created-with-object-initializers-as-props-to-client-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-plain-objects-created-with-object-initializers-as-props-to-client-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass plain objects created with object initializers as props to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, plain objects created with object initializers are serializable, as long as their properties are also serializable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LPcaN" prefix="r3587" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8026769042412606909"],"question":[0,"What is the fundamental requirement for props passed to Client Components?"],"answer":[0,"Props passed to Client Components need to be serializable by React."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-fundamental-requirement-for-props-passed-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-fundamental-requirement-for-props-passed-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-fundamental-requirement-for-props-passed-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the fundamental requirement for props passed to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Props passed to Client Components need to be serializable by React.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ny1MQ" prefix="r3588" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8326851106135601084"],"question":[0,"Can you pass objects with null prototypes as props to Client Components?"],"answer":[0,"No, objects with null prototypes are not supported and cannot be serialized."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-objects-with-null-prototypes-as-props-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-objects-with-null-prototypes-as-props-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-objects-with-null-prototypes-as-props-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass objects with null prototypes as props to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, objects with null prototypes are not supported and cannot be serialized.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gsOqa" prefix="r3589" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8737263915343234701"],"question":[0,"Can you pass Map objects as props from Server Components to Client Components?"],"answer":[0,"Yes, Map objects are serializable and can be passed directly from Server to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-map-objects-as-props-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-map-objects-as-props-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-map-objects-as-props-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass Map objects as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Map objects are serializable and can be passed directly from Server to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NovJ4" prefix="r3590" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9298577273326925490"],"question":[0,"What is the React Server Component Payload (RSC Payload)?"],"answer":[0,"The RSC Payload is a compact binary representation of the rendered React Server Components tree used by React on the client to update the browser's DOM."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-react-server-component-payload-rsc-payload"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-react-server-component-payload-rsc-payload" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-react-server-component-payload-rsc-payload" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the React Server Component Payload (RSC Payload)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload is a compact binary representation of the rendered React Server Components tree used by React on the client to update the browser's DOM.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zv4zdO" prefix="r3591" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9459728407887811804"],"question":[0,"Can you pass a Server Component as any prop (not just children) to a Client Component?"],"answer":[0,"Yes, you can use any prop that accepts React nodes or JSX elements to pass Server Components to Client Components, not just the children prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-a-server-component-as-any-prop-not-just-children-to-a-client-compon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-a-server-component-as-any-prop-not-just-children-to-a-client-compon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-a-server-component-as-any-prop-not-just-children-to-a-client-compon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass a Server Component as any prop (not just children) to a Client Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can use any prop that accepts React nodes or JSX elements to pass Server Components to Client Components, not just the children prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16GYVu" prefix="r3592" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9768861201859323915"],"question":[0,"Can you import a Server Component into a Client Component module?"],"answer":[0,"No, you cannot import a Server Component into a Client Component module (since it would require a new request back to the server)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-import-a-server-component-into-a-client-component-module"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-import-a-server-component-into-a-client-component-module" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-import-a-server-component-into-a-client-component-module" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you import a Server Component into a Client Component module?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot import a Server Component into a Client Component module (since it would require a new request back to the server).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHbdic" prefix="r3593" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10761230668207610199"],"question":[0,"Can you pass symbols as props from Server Components to Client Components?"],"answer":[0,"Only symbols registered globally via Symbol.for() can be passed. Symbols created with Symbol('name') are not serializable."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-symbols-as-props-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-symbols-as-props-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-symbols-as-props-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass symbols as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only symbols registered globally via Symbol.for() can be passed. Symbols created with Symbol('name') are not serializable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zm6XWn" prefix="r3594" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10880602752574030345"],"question":[0,"Can you pass Date objects as props from Server Components to Client Components?"],"answer":[0,"Yes, Date objects are serializable and can be passed directly from Server to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-date-objects-as-props-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-date-objects-as-props-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-date-objects-as-props-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass Date objects as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Date objects are serializable and can be passed directly from Server to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1FQyhM" prefix="r3595" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11089789239165114855"],"question":[0,"How can you pass a Server Component to a Client Component if you cannot import it?"],"answer":[0,"You can pass a Server Component as props (commonly using the children prop) to a Client Component. This creates a 'slot' where Server Components can be placed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-pass-a-server-component-to-a-client-component-if-you-cannot-import-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-pass-a-server-component-to-a-client-component-if-you-cannot-import-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-pass-a-server-component-to-a-client-component-if-you-cannot-import-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you pass a Server Component to a Client Component if you cannot import it?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can pass a Server Component as props (commonly using the children prop) to a Client Component. This creates a 'slot' where Server Components can be placed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rUfRu" prefix="r3596" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11122639551709916489"],"question":[0,"Can you pass TypedArray or ArrayBuffer as props from Server Components to Client Components?"],"answer":[0,"Yes, TypedArray and ArrayBuffer are serializable iterables with serializable values and can be passed as props."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-typedarray-or-arraybuffer-as-props-from-server-components-to-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-typedarray-or-arraybuffer-as-props-from-server-components-to-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-typedarray-or-arraybuffer-as-props-from-server-components-to-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass TypedArray or ArrayBuffer as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, TypedArray and ArrayBuffer are serializable iterables with serializable values and can be passed as props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZviscP" prefix="r3597" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11139183414499290670"],"question":[0,"Can you pass Promise objects as props from Server Components to Client Components?"],"answer":[0,"Yes, Promise objects are serializable and can be passed directly from Server to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-promise-objects-as-props-from-server-components-to-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-promise-objects-as-props-from-server-components-to-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-promise-objects-as-props-from-server-components-to-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass Promise objects as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Promise objects are serializable and can be passed directly from Server to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1z6LeH" prefix="r3598" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11355573706342112963"],"question":[0,"How do you use the React use Hook to stream data from Server to Client Components?"],"answer":[0,"In the Server Component, pass an unawaited Promise as a prop wrapped in a <Suspense> boundary. In the Client Component (marked with 'use client'), import use from React and call use(promiseProp) to read the promise."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-the-react-use-hook-to-stream-data-from-server-to-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-the-react-use-hook-to-stream-data-from-server-to-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-the-react-use-hook-to-stream-data-from-server-to-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use the React use Hook to stream data from Server to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the Server Component, pass an unawaited Promise as a prop wrapped in a <Suspense> boundary. In the Client Component (marked with 'use client'), import use from React and call use(promiseProp) to read the promise.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OFz2H" prefix="r3599" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11819790314433155303"],"question":[0,"Can you pass Server Actions (functions marked with 'use server') as props to Client Components?"],"answer":[0,"Yes, functions that are Server Actions (marked with 'use server') are serializable and can be passed as props to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-server-actions-functions-marked-with-use-server-as-props-to-client-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-server-actions-functions-marked-with-use-server-as-props-to-client-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-server-actions-functions-marked-with-use-server-as-props-to-client-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass Server Actions (functions marked with 'use server') as props to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, functions that are Server Actions (marked with 'use server') are serializable and can be passed as props to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KxNXX" prefix="r3600" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12766461991953960625"],"question":[0,"Can you pass bigint values as props from Server Components to Client Components?"],"answer":[0,"Yes, bigint is a serializable primitive and can be passed as props."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-bigint-values-as-props-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-bigint-values-as-props-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-bigint-values-as-props-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass bigint values as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, bigint is a serializable primitive and can be passed as props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFJqaC" prefix="r3601" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13054403616556324372"],"question":[0,"Can you pass FormData instances as props from Server Components to Client Components?"],"answer":[0,"Yes, FormData instances are serializable and can be passed as props."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-formdata-instances-as-props-from-server-components-to-client-compon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-formdata-instances-as-props-from-server-components-to-client-compon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-formdata-instances-as-props-from-server-components-to-client-compon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass FormData instances as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, FormData instances are serializable and can be passed as props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bDdAv" prefix="r3602" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13054652153449724245"],"question":[0,"Can you stream data from a Server Component to a Client Component without using props?"],"answer":[0,"Yes, you can stream data from a Server Component to a Client Component with the use Hook from React."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-stream-data-from-a-server-component-to-a-client-component-without-using-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-stream-data-from-a-server-component-to-a-client-component-without-using-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-stream-data-from-a-server-component-to-a-client-component-without-using-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you stream data from a Server Component to a Client Component without using props?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can stream data from a Server Component to a Client Component with the use Hook from React.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="authentication-authentication-libraries-providers" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Authentication > Authentication Libraries & Providers</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 30 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2m55lg" prefix="r3603" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"190559873053552579"],"question":[0,"What changed in adapter package naming from NextAuth.js v4 to v5?"],"answer":[0,"Database adapters moved from @next-auth/*-adapter scope to @auth/*-adapter scope (e.g., @next-auth/prisma-adapter became @auth/prisma-adapter)."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/migrating-to-v5"]]],"topic":[0,"nextjs"],"slug":[0,"what-changed-in-adapter-package-naming-from-nextauth-js-v4-to-v5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-changed-in-adapter-package-naming-from-nextauth-js-v4-to-v5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-changed-in-adapter-package-naming-from-nextauth-js-v4-to-v5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What changed in adapter package naming from NextAuth.js v4 to v5?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Database adapters moved from @next-auth/<em>-adapter scope to @auth/</em>-adapter scope (e.g., @next-auth/prisma-adapter became @auth/prisma-adapter).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/migrating-to-v5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2duG68" prefix="r3604" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"992318572940597862"],"question":[0,"Where should SessionProvider be implemented for Pages Router applications?"],"answer":[0,"In pages/_app.jsx (or .tsx), wrapping the Component with <SessionProvider session={session}>."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/getting-started/client"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-sessionprovider-be-implemented-for-pages-router-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-sessionprovider-be-implemented-for-pages-router-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-sessionprovider-be-implemented-for-pages-router-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should SessionProvider be implemented for Pages Router applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In pages/_app.jsx (or .tsx), wrapping the Component with <SessionProvider session={session}>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/getting-started/client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23p5Ei" prefix="r3605" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1005301094337968754"],"question":[0,"What methods does the auth.ts file export in Auth.js v5?"],"answer":[0,"handlers, signIn, signOut, and auth: export const { handlers, signIn, signOut, auth } = NextAuth({ providers: [] })"],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-does-the-auth-ts-file-export-in-auth-js-v5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-does-the-auth-ts-file-export-in-auth-js-v5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-does-the-auth-ts-file-export-in-auth-js-v5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods does the auth.ts file export in Auth.js v5?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>handlers, signIn, signOut, and auth: export const { handlers, signIn, signOut, auth } = NextAuth({ providers: [] })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z76y7c" prefix="r3606" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1414946792586001323"],"question":[0,"What is the catch-all syntax used in NextAuth.js file naming?"],"answer":[0,"[...nextauth] - this is Next.js catch-all route syntax."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/initialization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-catch-all-syntax-used-in-nextauth-js-file-naming"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-catch-all-syntax-used-in-nextauth-js-file-naming" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-catch-all-syntax-used-in-nextauth-js-file-naming" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the catch-all syntax used in NextAuth.js file naming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[...nextauth] - this is Next.js catch-all route syntax.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/initialization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2f8mT1" prefix="r3607" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1822246915306381590"],"question":[0,"Is OAuth 1.0 supported in Auth.js v5?"],"answer":[0,"No. OAuth 1.0 support is deprecated in Auth.js v5."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/migrating-to-v5"]]],"topic":[0,"nextjs"],"slug":[0,"is-oauth-1-0-supported-in-auth-js-v5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-oauth-1-0-supported-in-auth-js-v5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-oauth-1-0-supported-in-auth-js-v5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is OAuth 1.0 supported in Auth.js v5?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. OAuth 1.0 support is deprecated in Auth.js v5.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/migrating-to-v5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzCidy" prefix="r3608" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2181370332729911219"],"question":[0,"Where should the auth.ts configuration file be located in Auth.js v5?"],"answer":[0,"At the root of your repository (or in the src/ directory if your project uses one)."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-auth-ts-configuration-file-be-located-in-auth-js-v5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-auth-ts-configuration-file-be-located-in-auth-js-v5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-auth-ts-configuration-file-be-located-in-auth-js-v5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the auth.ts configuration file be located in Auth.js v5?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At the root of your repository (or in the src/ directory if your project uses one).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2i3mmf" prefix="r3609" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2272622324523939016"],"question":[0,"What command can generate a secure secret for NextAuth.js?"],"answer":[0,"openssl rand -base64 32"],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/options"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-can-generate-a-secure-secret-for-nextauth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-can-generate-a-secure-secret-for-nextauth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-can-generate-a-secure-secret-for-nextauth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command can generate a secure secret for NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>openssl rand -base64 32</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/options" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1K1oia" prefix="r3610" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2496739051434587093"],"question":[0,"What is the minimum required version of NextAuth.js to use middleware for route protection?"],"answer":[0,"NextAuth.js 4.2.0 (with Next.js 12)."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-required-version-of-nextauth-js-to-use-middleware-for-route-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-required-version-of-nextauth-js-to-use-middleware-for-route-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-required-version-of-nextauth-js-to-use-middleware-for-route-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum required version of NextAuth.js to use middleware for route protection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextAuth.js 4.2.0 (with Next.js 12).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mq9Nx" prefix="r3611" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3158547015780698075"],"question":[0,"What are the two required parameters for most built-in OAuth providers in NextAuth.js?"],"answer":[0,"clientId and clientSecret."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/providers/oauth"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-required-parameters-for-most-built-in-oauth-providers-in-nextau"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-required-parameters-for-most-built-in-oauth-providers-in-nextau" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-required-parameters-for-most-built-in-oauth-providers-in-nextau" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two required parameters for most built-in OAuth providers in NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>clientId and clientSecret.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/providers/oauth" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19JoYi" prefix="r3612" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3648072851012358380"],"question":[0,"What encryption algorithm does Auth.js v5 use for JWTs by default?"],"answer":[0,"A256CBC-HS512 (JWE format)."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/reference/core/jwt"]]],"topic":[0,"nextjs"],"slug":[0,"what-encryption-algorithm-does-auth-js-v5-use-for-jwts-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-encryption-algorithm-does-auth-js-v5-use-for-jwts-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-encryption-algorithm-does-auth-js-v5-use-for-jwts-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What encryption algorithm does Auth.js v5 use for JWTs by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A256CBC-HS512 (JWE format).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/reference/core/jwt" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16VIJA" prefix="r3613" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5032493260372597292"],"question":[0,"What is the minimum required Next.js version for Auth.js v5 (NextAuth.js v5)?"],"answer":[0,"The minimum required Next.js version is 14.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/migrating-to-v5"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-required-next-js-version-for-auth-js-v5-nextauth-js-v5"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-required-next-js-version-for-auth-js-v5-nextauth-js-v5" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-required-next-js-version-for-auth-js-v5-nextauth-js-v5" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum required Next.js version for Auth.js v5 (NextAuth.js v5)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The minimum required Next.js version is 14.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/migrating-to-v5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVl0Ys" prefix="r3614" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5199780014041781717"],"question":[0,"What are the required database tables for NextAuth.js with a database adapter?"],"answer":[0,"User, Account, Session, and VerificationRequest (or VerificationToken)."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/databases"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-database-tables-for-nextauth-js-with-a-database-adapter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-database-tables-for-nextauth-js-with-a-database-adapter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-database-tables-for-nextauth-js-with-a-database-adapter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required database tables for NextAuth.js with a database adapter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>User, Account, Session, and VerificationRequest (or VerificationToken).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/databases" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25yAcF" prefix="r3615" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6586463766418877255"],"question":[0,"What is the default value for session.updateAge in NextAuth.js?"],"answer":[0,"86400 seconds (24 hours). If set to 0, session is updated every time."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/reference/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-session-updateage-in-nextauth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-session-updateage-in-nextauth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-session-updateage-in-nextauth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for session.updateAge in NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>86400 seconds (24 hours). If set to 0, session is updated every time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/reference/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi9rT6" prefix="r3616" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6841855330473515094"],"question":[0,"What is the default session maxAge in NextAuth.js?"],"answer":[0,"The default is 30 days (calculated as 30 * 24 * 60 * 60 seconds)."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/options"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-session-maxage-in-nextauth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-session-maxage-in-nextauth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-session-maxage-in-nextauth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default session maxAge in NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is 30 days (calculated as 30 * 24 * 60 * 60 seconds).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/options" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SF1vu" prefix="r3617" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6847846693695620597"],"question":[0,"What authentication libraries does the official Next.js documentation recommend?"],"answer":[0,"Auth0, Better Auth, Clerk, Descope, Kinde, Logto, NextAuth.js, Ory, Stack Auth, Supabase, Stytch, and WorkOS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-authentication-libraries-does-the-official-next-js-documentation-recommend"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-authentication-libraries-does-the-official-next-js-documentation-recommend" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-authentication-libraries-does-the-official-next-js-documentation-recommend" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What authentication libraries does the official Next.js documentation recommend?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Auth0, Better Auth, Clerk, Descope, Kinde, Logto, NextAuth.js, Ory, Stack Auth, Supabase, Stytch, and WorkOS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1I5XDz" prefix="r3618" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7578222037209339697"],"question":[0,"What session management libraries does the official Next.js documentation list?"],"answer":[0,"Iron Session and Jose."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-session-management-libraries-does-the-official-next-js-documentation-list"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-session-management-libraries-does-the-official-next-js-documentation-list" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-session-management-libraries-does-the-official-next-js-documentation-list" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What session management libraries does the official Next.js documentation list?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Iron Session and Jose.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sfBG6" prefix="r3619" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8383285498640904435"],"question":[0,"Is NEXTAUTH_SECRET required in production for NextAuth.js?"],"answer":[0,"Yes. Not providing any secret or NEXTAUTH_SECRET will throw an error in production."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/options"]]],"topic":[0,"nextjs"],"slug":[0,"is-nextauth-secret-required-in-production-for-nextauth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-nextauth-secret-required-in-production-for-nextauth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-nextauth-secret-required-in-production-for-nextauth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is NEXTAUTH_SECRET required in production for NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Not providing any secret or NEXTAUTH_SECRET will throw an error in production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/options" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi2kDb" prefix="r3620" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8420033647463253779"],"question":[0,"How many built-in authentication providers does Auth.js come with?"],"answer":[0,"Auth.js comes with over 80 providers preconfigured."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/getting-started/authentication/oauth"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-built-in-authentication-providers-does-auth-js-come-with"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-built-in-authentication-providers-does-auth-js-come-with" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-built-in-authentication-providers-does-auth-js-come-with" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many built-in authentication providers does Auth.js come with?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Auth.js comes with over 80 providers preconfigured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/getting-started/authentication/oauth" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wpoNR" prefix="r3621" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9533232388036532127"],"question":[0,"What is the exact file path for NextAuth.js API routes in the Pages Router?"],"answer":[0,"pages/api/auth/[...nextauth].js (or .ts for TypeScript)."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/getting-started/example"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-file-path-for-nextauth-js-api-routes-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-file-path-for-nextauth-js-api-routes-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-file-path-for-nextauth-js-api-routes-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact file path for NextAuth.js API routes in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>pages/api/auth/[...nextauth].js (or .ts for TypeScript).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/getting-started/example" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Fnnh" prefix="r3622" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9641277502804839615"],"question":[0,"What HTTP methods must be exported in the App Router route handler for Auth.js?"],"answer":[0,"Both GET and POST must be exported: export { handler as GET, handler as POST }"],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/initialization"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-must-be-exported-in-the-app-router-route-handler-for-auth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-must-be-exported-in-the-app-router-route-handler-for-auth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-must-be-exported-in-the-app-router-route-handler-for-auth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods must be exported in the App Router route handler for Auth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both GET and POST must be exported: export { handler as GET, handler as POST }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/initialization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="i1L9f" prefix="r3623" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10126362876243616659"],"question":[0,"What is the exact file path for NextAuth.js API routes in the App Router?"],"answer":[0,"app/api/auth/[...nextauth]/route.ts (or .js), where [...nextauth] is a folder containing a route.ts file."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/initialization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-file-path-for-nextauth-js-api-routes-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-file-path-for-nextauth-js-api-routes-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-file-path-for-nextauth-js-api-routes-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact file path for NextAuth.js API routes in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>app/api/auth/[...nextauth]/route.ts (or .js), where [...nextauth] is a folder containing a route.ts file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/initialization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8aVxG" prefix="r3624" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10332057469446444991"],"question":[0,"What CLI command can auto-generate and save a NextAuth.js secret?"],"answer":[0,"npx auth secret - this will autogenerate a random value and put it in your .env.local file."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/options"]]],"topic":[0,"nextjs"],"slug":[0,"what-cli-command-can-auto-generate-and-save-a-nextauth-js-secret"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cli-command-can-auto-generate-and-save-a-nextauth-js-secret" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cli-command-can-auto-generate-and-save-a-nextauth-js-secret" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CLI command can auto-generate and save a NextAuth.js secret?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx auth secret - this will autogenerate a random value and put it in your .env.local file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/options" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dXheh" prefix="r3625" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10494310519900269023"],"question":[0,"What is the recommended server-side method for getting session data in NextAuth.js?"],"answer":[0,"getServerSession instead of getSession, as it avoids an extra fetch to an API Route and increases performance significantly."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-server-side-method-for-getting-session-data-in-nextauth-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-server-side-method-for-getting-session-data-in-nextauth-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-server-side-method-for-getting-session-data-in-nextauth-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended server-side method for getting session data in NextAuth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>getServerSession instead of getSession, as it avoids an extra fetch to an API Route and increases performance significantly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9StV" prefix="r3626" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11382231241787736099"],"question":[0,"What session strategy does NextAuth.js middleware (withAuth) support?"],"answer":[0,"Only \"jwt\" as session strategy."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-session-strategy-does-nextauth-js-middleware-withauth-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-session-strategy-does-nextauth-js-middleware-withauth-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-session-strategy-does-nextauth-js-middleware-withauth-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What session strategy does NextAuth.js middleware (withAuth) support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only "jwt" as session strategy.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIGPD1" prefix="r3627" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12227898078359330802"],"question":[0,"What is the default session strategy in NextAuth.js when a database adapter is configured?"],"answer":[0,"When you use an adapter, the default session strategy changes to \"database\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/configuration/options"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-session-strategy-in-nextauth-js-when-a-database-adapter-is-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-session-strategy-in-nextauth-js-when-a-database-adapter-is-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-session-strategy-in-nextauth-js-when-a-database-adapter-is-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default session strategy in NextAuth.js when a database adapter is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When you use an adapter, the default session strategy changes to "database".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/configuration/options" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cdbEl" prefix="r3628" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12731826635133136882"],"question":[0,"What encryption algorithm did NextAuth.js v4 use for JWTs by default?"],"answer":[0,"A256GCM. Since v4, all JWT tokens are encrypted by default with A256GCM."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/faq"]]],"topic":[0,"nextjs"],"slug":[0,"what-encryption-algorithm-did-nextauth-js-v4-use-for-jwts-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-encryption-algorithm-did-nextauth-js-v4-use-for-jwts-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-encryption-algorithm-did-nextauth-js-v4-use-for-jwts-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What encryption algorithm did NextAuth.js v4 use for JWTs by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A256GCM. Since v4, all JWT tokens are encrypted by default with A256GCM.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/faq" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHDFgX" prefix="r3629" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13124149235500101085"],"question":[0,"What is the default basePath for NextAuth.js API endpoints?"],"answer":[0,"/api/auth for next-auth; /auth with all other frameworks."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/reference/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-basepath-for-nextauth-js-api-endpoints"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-basepath-for-nextauth-js-api-endpoints" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-basepath-for-nextauth-js-api-endpoints" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default basePath for NextAuth.js API endpoints?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>/api/auth for next-auth; /auth with all other frameworks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/reference/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZiWd7U" prefix="r3630" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13374798654694992553"],"question":[0,"Is SessionProvider mandatory in NextAuth.js v4?"],"answer":[0,"Yes. Version 4 makes using the SessionProvider mandatory. You must wrap any part of your application using useSession in this provider."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/getting-started/upgrade-v4"]]],"topic":[0,"nextjs"],"slug":[0,"is-sessionprovider-mandatory-in-nextauth-js-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-sessionprovider-mandatory-in-nextauth-js-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-sessionprovider-mandatory-in-nextauth-js-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is SessionProvider mandatory in NextAuth.js v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Version 4 makes using the SessionProvider mandatory. You must wrap any part of your application using useSession in this provider.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/getting-started/upgrade-v4" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zXRUz" prefix="r3631" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14671490474660299340"],"question":[0,"What is the environment variable naming convention for OAuth provider credentials in Auth.js v5?"],"answer":[0,"AUTH_[PROVIDER]_ID and AUTH_[PROVIDER]_SECRET (e.g., AUTH_GITHUB_ID and AUTH_GITHUB_SECRET)."],"confidence":[0,0.95],"sources":[1,[[0,"https://authjs.dev/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-environment-variable-naming-convention-for-oauth-provider-credential"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-environment-variable-naming-convention-for-oauth-provider-credential" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-environment-variable-naming-convention-for-oauth-provider-credential" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the environment variable naming convention for OAuth provider credentials in Auth.js v5?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AUTH_[PROVIDER]<em>ID and AUTH</em>[PROVIDER]_SECRET (e.g., AUTH_GITHUB_ID and AUTH_GITHUB_SECRET).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://authjs.dev/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>authjs.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rcTYv" prefix="r3632" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14695050871842098250"],"question":[0,"What is the default refetchInterval for SessionProvider in Auth.js?"],"answer":[0,"0 (zero) seconds, which means session polling is disabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-auth.js.org/getting-started/client"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-refetchinterval-for-sessionprovider-in-auth-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-refetchinterval-for-sessionprovider-in-auth-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-refetchinterval-for-sessionprovider-in-auth-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default refetchInterval for SessionProvider in Auth.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 (zero) seconds, which means session polling is disabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-auth.js.org/getting-started/client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-auth.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="next-js-compiler" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Next.js Compiler</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 30 questions </span> </div> <div class="space-y-4"> <astro-island uid="lgpQ3" prefix="r3633" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"329351032133551572"],"question":[0,"What is the default value for the styled-components ssr option in the Next.js Compiler?"],"answer":[0,"ssr is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-ssr-option-in-the-next-js-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-ssr-option-in-the-next-js-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-ssr-option-in-the-next-js-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components ssr option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ssr is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpTjux" prefix="r3634" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"531476615346204042"],"question":[0,"What is the default value for the emotion sourceMap option in the Next.js Compiler?"],"answer":[0,"sourceMap is true by default, but it will be disabled when build type is production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-emotion-sourcemap-option-in-the-next-js-compil"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-emotion-sourcemap-option-in-the-next-js-compil" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-emotion-sourcemap-option-in-the-next-js-compil" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the emotion sourceMap option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sourceMap is true by default, but it will be disabled when build type is production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Q02Oy" prefix="r3635" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"745219002443213317"],"question":[0,"What is the default artifactDirectory value for the relay compiler in Next.js?"],"answer":[0,"The default artifactDirectory is './__generated__'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-artifactdirectory-value-for-the-relay-compiler-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-artifactdirectory-value-for-the-relay-compiler-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-artifactdirectory-value-for-the-relay-compiler-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default artifactDirectory value for the relay compiler in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default artifactDirectory is './<strong>generated</strong>'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sJgQd" prefix="r3636" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1273397495378606634"],"question":[0,"What performance improvements did Next.js achieve with Fast Refresh and builds using SWC?"],"answer":[0,"Next.js achieved ~3x faster Fast Refresh and ~5x faster builds by switching to SWC."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-improvements-did-next-js-achieve-with-fast-refresh-and-builds-u"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-improvements-did-next-js-achieve-with-fast-refresh-and-builds-u" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-improvements-did-next-js-achieve-with-fast-refresh-and-builds-u" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance improvements did Next.js achieve with Fast Refresh and builds using SWC?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js achieved ~3x faster Fast Refresh and ~5x faster builds by switching to SWC.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vRSY9" prefix="r3637" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2366010451422248096"],"question":[0,"What is the default value for the styled-components minify option in the Next.js Compiler?"],"answer":[0,"minify is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-minify-option-in-the-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-minify-option-in-the-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-minify-option-in-the-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components minify option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>minify is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1a45AD" prefix="r3638" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2971189407061381921"],"question":[0,"When did SWC minification become stable in Next.js?"],"answer":[0,"SWC minification became stable in Next.js 12.3 (September 2022), though it only became the default in Next.js 13."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-12-3"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-swc-minification-become-stable-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-swc-minification-become-stable-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-swc-minification-become-stable-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did SWC minification become stable in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC minification became stable in Next.js 12.3 (September 2022), though it only became the default in Next.js 13.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-12-3" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ulNT2" prefix="r3639" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3707544577995379422"],"question":[0,"What is the purpose of the emotion importMap option in Next.js Compiler?"],"answer":[0,"The importMap option allows you to tell the compiler what imports it should look at to determine what to transform, which is useful if you re-export Emotion's exports from your own packages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-emotion-importmap-option-in-next-js-compiler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-emotion-importmap-option-in-next-js-compiler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-emotion-importmap-option-in-next-js-compiler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the emotion importMap option in Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The importMap option allows you to tell the compiler what imports it should look at to determine what to transform, which is useful if you re-export Emotion's exports from your own packages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tW5oT" prefix="r3640" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4014150528368236021"],"question":[0,"What is the default value for the styled-components cssProp option in the Next.js Compiler?"],"answer":[0,"cssProp is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-cssprop-option-in-the-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-cssprop-option-in-the-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-cssprop-option-in-the-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components cssProp option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cssProp is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gzIKk" prefix="r3641" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4657273009237728996"],"question":[0,"How much faster is compilation using the Next.js Compiler compared to Babel?"],"answer":[0,"Compilation using the Next.js Compiler is 17x faster than Babel."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-faster-is-compilation-using-the-next-js-compiler-compared-to-babel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-faster-is-compilation-using-the-next-js-compiler-compared-to-babel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-faster-is-compilation-using-the-next-js-compiler-compared-to-babel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much faster is compilation using the Next.js Compiler compared to Babel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Compilation using the Next.js Compiler is 17x faster than Babel.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wkFCL" prefix="r3642" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4676016287294942900"],"question":[0,"What values can the relay compiler language option accept in Next.js?"],"answer":[0,"The language option can be set to 'javascript', 'typescript', or 'flow'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-values-can-the-relay-compiler-language-option-accept-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-values-can-the-relay-compiler-language-option-accept-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-values-can-the-relay-compiler-language-option-accept-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What values can the relay compiler language option accept in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The language option can be set to 'javascript', 'typescript', or 'flow'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JW87l" prefix="r3643" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4840324925565464401"],"question":[0,"What is the default value for the styled-components transpileTemplateLiterals option in the Next.js Compiler?"],"answer":[0,"transpileTemplateLiterals is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-transpiletemplateliterals-op"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-transpiletemplateliterals-op" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-transpiletemplateliterals-op" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components transpileTemplateLiterals option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>transpileTemplateLiterals is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1V0jPb" prefix="r3644" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6044867550927840597"],"question":[0,"What is the default value for the relay compiler eagerEsModules option in Next.js?"],"answer":[0,"eagerEsModules defaults to false."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-relay-compiler-eageresmodules-option-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-relay-compiler-eageresmodules-option-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-relay-compiler-eageresmodules-option-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the relay compiler eagerEsModules option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eagerEsModules defaults to false.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZP3MEA" prefix="r3645" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6422662165826701057"],"question":[0,"What is the default value for the styled-components pure option in the Next.js Compiler?"],"answer":[0,"pure is disabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-pure-option-in-the-next-js-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-pure-option-in-the-next-js-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-pure-option-in-the-next-js-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components pure option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>pure is disabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zk5ddx" prefix="r3646" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6672347056698365985"],"question":[0,"How much faster is SWC minification compared to Terser?"],"answer":[0,"SWC minification is 7x faster than Terser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-faster-is-swc-minification-compared-to-terser"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-faster-is-swc-minification-compared-to-terser" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-faster-is-swc-minification-compared-to-terser" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much faster is SWC minification compared to Terser?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC minification is 7x faster than Terser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1p8BKf" prefix="r3647" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7204277700936246632"],"question":[0,"What is the default value for the styled-components displayName option in the Next.js Compiler?"],"answer":[0,"displayName is enabled by default in development but disabled in production to reduce file size."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-displayname-option-in-the-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-displayname-option-in-the-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-displayname-option-in-the-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components displayName option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>displayName is enabled by default in development but disabled in production to reduce file size.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1e1fm9" prefix="r3648" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7452251368961318126"],"question":[0,"What performance improvement did Next.js 13.5 achieve with optimizePackageImports in serverless environments?"],"answer":[0,"Next.js measured up to 40% faster cold starts in serverless environments paired with other improvements included in Next.js 13.5."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/blog/how-we-optimized-package-imports-in-next-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-improvement-did-next-js-13-5-achieve-with-optimizepackageimport"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-improvement-did-next-js-13-5-achieve-with-optimizepackageimport" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-improvement-did-next-js-13-5-achieve-with-optimizepackageimport" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance improvement did Next.js 13.5 achieve with optimizePackageImports in serverless environments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js measured up to 40% faster cold starts in serverless environments paired with other improvements included in Next.js 13.5.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/blog/how-we-optimized-package-imports-in-next-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jaNxA" prefix="r3649" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7700813877400268217"],"question":[0,"What is the stability status of SWC plugins in Next.js?"],"answer":[0,"SWC plugins are experimental and unstable. SWC and Next.js might not follow semver when it comes to plugin compatibility."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-stability-status-of-swc-plugins-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-stability-status-of-swc-plugins-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-stability-status-of-swc-plugins-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the stability status of SWC plugins in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC plugins are experimental and unstable. SWC and Next.js might not follow semver when it comes to plugin compatibility.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xL1pV" prefix="r3650" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8026391004393219896"],"question":[0,"What is the default value for the styled-components meaninglessFileNames option in the Next.js Compiler?"],"answer":[0,"meaninglessFileNames defaults to [\"index\"]."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-meaninglessfilenames-option-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-meaninglessfilenames-option-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-meaninglessfilenames-option-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components meaninglessFileNames option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>meaninglessFileNames defaults to ["index"].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhbvCx" prefix="r3651" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9036234222039743529"],"question":[0,"What is the purpose of the transpilePackages option in Next.js?"],"answer":[0,"transpilePackages allows Next.js to automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (node_modules). It replaces the next-transpile-modules package."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/transpilePackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-transpilepackages-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-transpilepackages-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-transpilepackages-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the transpilePackages option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>transpilePackages allows Next.js to automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (node_modules). It replaces the next-transpile-modules package.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/transpilePackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2u9LXB" prefix="r3652" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9371522093192961711"],"question":[0,"What is the default value for the emotion labelFormat option in the Next.js Compiler?"],"answer":[0,"labelFormat defaults to '[local]'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-emotion-labelformat-option-in-the-next-js-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-emotion-labelformat-option-in-the-next-js-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-emotion-labelformat-option-in-the-next-js-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the emotion labelFormat option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>labelFormat defaults to '[local]'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29SkaU" prefix="r3653" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10125710453671387784"],"question":[0,"In which Next.js version did SWC become the default minifier?"],"answer":[0,"SWC became the default minifier in Next.js version 13."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/swc-minify-enabled"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-swc-become-the-default-minifier"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-swc-become-the-default-minifier" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-swc-become-the-default-minifier" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did SWC become the default minifier?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC became the default minifier in Next.js version 13.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/swc-minify-enabled" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vYh4O" prefix="r3654" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10154874913299747752"],"question":[0,"What is the default value for the emotion autoLabel option in the Next.js Compiler?"],"answer":[0,"autoLabel defaults to 'dev-only'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-emotion-autolabel-option-in-the-next-js-compil"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-emotion-autolabel-option-in-the-next-js-compil" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-emotion-autolabel-option-in-the-next-js-compil" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the emotion autoLabel option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>autoLabel defaults to 'dev-only'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2etThU" prefix="r3655" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11119756409284230035"],"question":[0,"Do removeConsole and reactRemoveProperties transformations apply to node_modules?"],"answer":[0,"No, both removeConsole and reactRemoveProperties only work on application code, not on node_modules."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"do-removeconsole-and-reactremoveproperties-transformations-apply-to-node-modules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-removeconsole-and-reactremoveproperties-transformations-apply-to-node-modules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-removeconsole-and-reactremoveproperties-transformations-apply-to-node-modules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do removeConsole and reactRemoveProperties transformations apply to node_modules?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, both removeConsole and reactRemoveProperties only work on application code, not on node_modules.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="o1oeB" prefix="r3656" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11139090016778149964"],"question":[0,"What is the Next.js Compiler written in and what does it replace?"],"answer":[0,"The Next.js Compiler is written in Rust using SWC (Speedy Web Compiler). It replaces Babel for individual files and Terser for minifying output bundles."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-next-js-compiler-written-in-and-what-does-it-replace"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-next-js-compiler-written-in-and-what-does-it-replace" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-next-js-compiler-written-in-and-what-does-it-replace" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Next.js Compiler written in and what does it replace?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Next.js Compiler is written in Rust using SWC (Speedy Web Compiler). It replaces Babel for individual files and Terser for minifying output bundles.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gq1KR" prefix="r3657" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11215871248742569480"],"question":[0,"In which Next.js version was the SWC compiler enabled by default?"],"answer":[0,"The SWC compiler was enabled by default since Next.js version 12."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-swc-compiler-enabled-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-swc-compiler-enabled-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-swc-compiler-enabled-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the SWC compiler enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The SWC compiler was enabled by default since Next.js version 12.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RSYah" prefix="r3658" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11391416643975382601"],"question":[0,"Which packages are optimized by default with optimizePackageImports in Next.js?"],"answer":[0,"The following packages are optimized by default: lucide-react, date-fns, lodash-es, ramda, antd, react-bootstrap, ahooks, @ant-design/icons, @headlessui/react, @headlessui-float/react, @heroicons/react/20/solid, @heroicons/react/24/solid, @heroicons/react/24/outline, @visx/visx, @tremor/react, rxjs, @mui/material, @mui/icons-material, recharts, react-use, @material-ui/core, @material-ui/icons, @tabler/icons-react, mui-core, react-icons/*, effect, and @effect/*."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"which-packages-are-optimized-by-default-with-optimizepackageimports-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-packages-are-optimized-by-default-with-optimizepackageimports-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-packages-are-optimized-by-default-with-optimizepackageimports-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which packages are optimized by default with optimizePackageImports in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The following packages are optimized by default: lucide-react, date-fns, lodash-es, ramda, antd, react-bootstrap, ahooks, @ant-design/icons, @headlessui/react, @headlessui-float/react, @heroicons/react/20/solid, @heroicons/react/24/solid, @heroicons/react/24/outline, @visx/visx, @tremor/react, rxjs, @mui/material, @mui/icons-material, recharts, react-use, @material-ui/core, @material-ui/icons, @tabler/icons-react, mui-core, react-icons/<em>, effect, and @effect/</em>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3oNH1" prefix="r3659" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11563990185136498484"],"question":[0,"How are experimental SWC plugins configured in Next.js?"],"answer":[0,"SWC plugins are configured using experimental.swcPlugins with an array of tuples, where each tuple contains the plugin name and an options object: experimental: { swcPlugins: [['plugin-name', { ...options }]] }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-experimental-swc-plugins-configured-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-experimental-swc-plugins-configured-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-experimental-swc-plugins-configured-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are experimental SWC plugins configured in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC plugins are configured using experimental.swcPlugins with an array of tuples, where each tuple contains the plugin name and an options object: experimental: { swcPlugins: [['plugin-name', { ...options }]] }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xj1r" prefix="r3660" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11926193216888543504"],"question":[0,"What happened to the swcMinify configuration option in Next.js 15?"],"answer":[0,"Support for the swcMinify flag was removed in Next.js 15. Starting with v15, minification cannot be customized using next.config.js as SWC is the exclusive minification method."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-happened-to-the-swcminify-configuration-option-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happened-to-the-swcminify-configuration-option-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happened-to-the-swcminify-configuration-option-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happened to the swcMinify configuration option in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Support for the swcMinify flag was removed in Next.js 15. Starting with v15, minification cannot be customized using next.config.js as SWC is the exclusive minification method.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkrAhr" prefix="r3661" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14215940587509511563"],"question":[0,"What is the default value for the styled-components fileName option in the Next.js Compiler?"],"answer":[0,"fileName is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-styled-components-filename-option-in-the-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-styled-components-filename-option-in-the-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-styled-components-filename-option-in-the-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the styled-components fileName option in the Next.js Compiler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fileName is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23nOgO" prefix="r3662" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15023390680530838850"],"question":[0,"What is the default regex pattern for reactRemoveProperties when set to true?"],"answer":[0,"The default regex pattern is ^data-test, which removes properties matching ^data-test."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-regex-pattern-for-reactremoveproperties-when-set-to-true"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-regex-pattern-for-reactremoveproperties-when-set-to-true" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-regex-pattern-for-reactremoveproperties-when-set-to-true" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default regex pattern for reactRemoveProperties when set to true?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default regex pattern is ^data-test, which removes properties matching ^data-test.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="project-structure-top-level-structure" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Project Structure > Top-level Structure</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 30 questions </span> </div> <div class="space-y-4"> <astro-island uid="pvwVN" prefix="r3663" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"711294670362402099"],"question":[0,"What is the auto-generated TypeScript declaration file in Next.js projects called?"],"answer":[0,"The auto-generated TypeScript declaration file is called `next-env.d.ts`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-auto-generated-typescript-declaration-file-in-next-js-projects-calle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-auto-generated-typescript-declaration-file-in-next-js-projects-calle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-auto-generated-typescript-declaration-file-in-next-js-projects-calle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the auto-generated TypeScript declaration file in Next.js projects called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The auto-generated TypeScript declaration file is called <code>next-env.d.ts</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NLRB2" prefix="r3664" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1045272546196858542"],"question":[0,"What is the recommended ESLint configuration for most Next.js projects?"],"answer":[0,"The recommended configuration is `eslint-config-next/core-web-vitals`, which upgrades rules affecting Core Web Vitals from warnings to errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-eslint-configuration-for-most-next-js-projects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-eslint-configuration-for-most-next-js-projects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-eslint-configuration-for-most-next-js-projects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended ESLint configuration for most Next.js projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended configuration is <code>eslint-config-next/core-web-vitals</code>, which upgrades rules affecting Core Web Vitals from warnings to errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DTBp3" prefix="r3665" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2081066202171786223"],"question":[0,"Can the `distDir` configuration option point to a directory outside the project root?"],"answer":[0,"No, the `distDir` should not leave your project directory. For example, `../build` is an invalid directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-distdir-configuration-option-point-to-a-directory-outside-the-project-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-distdir-configuration-option-point-to-a-directory-outside-the-project-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-distdir-configuration-option-point-to-a-directory-outside-the-project-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the `distDir` configuration option point to a directory outside the project root?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the <code>distDir</code> should not leave your project directory. For example, <code>../build</code> is an invalid directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Cce6p" prefix="r3666" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2483101466849394241"],"question":[0,"What is the default runtime for Next.js proxy files?"],"answer":[0,"The default runtime for proxy files is Node.js runtime. The `runtime` config option is not available in Proxy files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-next-js-proxy-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-next-js-proxy-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-next-js-proxy-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for Next.js proxy files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default runtime for proxy files is Node.js runtime. The <code>runtime</code> config option is not available in Proxy files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GvNKT" prefix="r3667" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2755217051078974221"],"question":[0,"What is the default build output directory name in Next.js?"],"answer":[0,"The default build output directory is `.next`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-build-output-directory-name-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-build-output-directory-name-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-build-output-directory-name-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default build output directory name in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default build output directory is <code>.next</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZM5ijN" prefix="r3668" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3249641904747508214"],"question":[0,"What is the current name for the middleware file in Next.js?"],"answer":[0,"The middleware file convention is deprecated and has been renamed to `proxy`. The file should be named `proxy.ts` or `proxy.js`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-current-name-for-the-middleware-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-current-name-for-the-middleware-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-current-name-for-the-middleware-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the current name for the middleware file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware file convention is deprecated and has been renamed to <code>proxy</code>. The file should be named <code>proxy.ts</code> or <code>proxy.js</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="180MXm" prefix="r3669" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3303643930535264311"],"question":[0,"What file extensions are supported for the Next.js configuration file?"],"answer":[0,"Next.js supports `next.config.js`, `next.config.mjs`, and `next.config.ts`. The `.cjs` or `.cts` extensions are currently not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-the-next-js-configuration-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-the-next-js-configuration-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-the-next-js-configuration-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for the Next.js configuration file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports <code>next.config.js</code>, <code>next.config.mjs</code>, and <code>next.config.ts</code>. The <code>.cjs</code> or <code>.cts</code> extensions are currently not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9jWsd" prefix="r3670" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3542948526934929435"],"question":[0,"In which Next.js version did the instrumentation feature become stable?"],"answer":[0,"The instrumentation feature became stable in v15.0.0. It was introduced as experimental in v13.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-the-instrumentation-feature-become-stable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-the-instrumentation-feature-become-stable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-the-instrumentation-feature-become-stable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did the instrumentation feature become stable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The instrumentation feature became stable in v15.0.0. It was introduced as experimental in v13.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1T6oCM" prefix="r3671" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3580904315563745647"],"question":[0,"Which environment variable files should be committed to version control in Next.js?"],"answer":[0,"`.env`, `.env.development`, and `.env.production` files should be included in your repository as they define defaults. `.env*.local` should be added to `.gitignore`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"which-environment-variable-files-should-be-committed-to-version-control-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-environment-variable-files-should-be-committed-to-version-control-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-environment-variable-files-should-be-committed-to-version-control-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which environment variable files should be committed to version control in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>.env</code>, <code>.env.development</code>, and <code>.env.production</code> files should be included in your repository as they define defaults. <code>.env*.local</code> should be added to <code>.gitignore</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vwhE7" prefix="r3672" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4152195391971580183"],"question":[0,"Do Next.js configuration files support the `.cjs` or `.cts` extensions?"],"answer":[0,"No, `.cjs` or `.cts` extensions are currently not supported for Next.js configuration files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-configuration-files-support-the-cjs-or-cts-extensions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-configuration-files-support-the-cjs-or-cts-extensions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-configuration-files-support-the-cjs-or-cts-extensions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js configuration files support the `.cjs` or `.cts` extensions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, <code>.cjs</code> or <code>.cts</code> extensions are currently not supported for Next.js configuration files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MgdiA" prefix="r3673" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4392682672899497966"],"question":[0,"Can the `public` folder be moved inside the `src` directory?"],"answer":[0,"No, the `/public` directory should remain in the root of your project, even when using the src directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-public-folder-be-moved-inside-the-src-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-public-folder-be-moved-inside-the-src-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-public-folder-be-moved-inside-the-src-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the `public` folder be moved inside the `src` directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the <code>/public</code> directory should remain in the root of your project, even when using the src directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ah6uA" prefix="r3674" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4771184668908279707"],"question":[0,"When using Tailwind CSS with the `src` folder, what configuration adjustment is needed?"],"answer":[0,"You must add the `/src` prefix to the content section of `tailwind.config.js` when using the src folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-tailwind-css-with-the-src-folder-what-configuration-adjustment-is-nee"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-tailwind-css-with-the-src-folder-what-configuration-adjustment-is-nee" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-tailwind-css-with-the-src-folder-what-configuration-adjustment-is-nee" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using Tailwind CSS with the `src` folder, what configuration adjustment is needed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must add the <code>/src</code> prefix to the content section of <code>tailwind.config.js</code> when using the src folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2b3oH2" prefix="r3675" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4904835296190981489"],"question":[0,"How many proxy functions can be exported from a single proxy file in Next.js?"],"answer":[0,"Multiple proxy functions from the same file are not supported. The file must export either a default function or a single named `proxy` function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-proxy-functions-can-be-exported-from-a-single-proxy-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-proxy-functions-can-be-exported-from-a-single-proxy-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-proxy-functions-can-be-exported-from-a-single-proxy-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many proxy functions can be exported from a single proxy file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Multiple proxy functions from the same file are not supported. The file must export either a default function or a single named <code>proxy</code> function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ndz2b" prefix="r3676" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5328865973150067855"],"question":[0,"What function must be exported from the `instrumentation.ts` file?"],"answer":[0,"The file must export a `register` function (optional) that runs at server startup, and/or an `onRequestError` function (optional) for tracking server errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-must-be-exported-from-the-instrumentation-ts-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-must-be-exported-from-the-instrumentation-ts-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-must-be-exported-from-the-instrumentation-ts-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function must be exported from the `instrumentation.ts` file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The file must export a <code>register</code> function (optional) that runs at server startup, and/or an <code>onRequestError</code> function (optional) for tracking server errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27y6jp" prefix="r3677" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6453116850752958195"],"question":[0,"In which Next.js version was the `next lint` command removed?"],"answer":[0,"`next lint` and the `eslint` configuration option in `next.config.js` were removed starting with Next.js v16.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-next-lint-command-removed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-next-lint-command-removed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-next-lint-command-removed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the `next lint` command removed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>next lint</code> and the <code>eslint</code> configuration option in <code>next.config.js</code> were removed starting with Next.js v16.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dzPq" prefix="r3678" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6462232650853597700"],"question":[0,"What is the name of the optional top-level folder that can contain application source code in Next.js?"],"answer":[0,"The optional top-level folder for application source code is named `src`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-name-of-the-optional-top-level-folder-that-can-contain-application-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-name-of-the-optional-top-level-folder-that-can-contain-application-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-name-of-the-optional-top-level-folder-that-can-contain-application-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the name of the optional top-level folder that can contain application source code in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The optional top-level folder for application source code is named <code>src</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fHi4f" prefix="r3679" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6759513715718145741"],"question":[0,"What is the default bundler used by `next dev` in modern Next.js versions?"],"answer":[0,"Turbopack is the default bundler. To use Webpack, you must run `next dev --webpack` or `next build --webpack`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bundler-used-by-next-dev-in-modern-next-js-versions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bundler-used-by-next-dev-in-modern-next-js-versions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bundler-used-by-next-dev-in-modern-next-js-versions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bundler used by `next dev` in modern Next.js versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack is the default bundler. To use Webpack, you must run <code>next dev --webpack</code> or <code>next build --webpack</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdOixG" prefix="r3680" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7072651468187779981"],"question":[0,"What adjustment is needed in `tsconfig.json` when using path aliases with the `src` folder?"],"answer":[0,"You must update the `paths` object in `tsconfig.json` to include `src/` when using path aliases like `@/*`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-adjustment-is-needed-in-tsconfig-json-when-using-path-aliases-with-the-src-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-adjustment-is-needed-in-tsconfig-json-when-using-path-aliases-with-the-src-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-adjustment-is-needed-in-tsconfig-json-when-using-path-aliases-with-the-src-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What adjustment is needed in `tsconfig.json` when using path aliases with the `src` folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must update the <code>paths</code> object in <code>tsconfig.json</code> to include <code>src/</code> when using path aliases like <code>@/*</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1gFBRS" prefix="r3681" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7638604578219643825"],"question":[0,"What codemod command migrates from middleware to proxy in Next.js?"],"answer":[0,"The codemod command is `npx @next/codemod@canary middleware-to-proxy .`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-command-migrates-from-middleware-to-proxy-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-command-migrates-from-middleware-to-proxy-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-command-migrates-from-middleware-to-proxy-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod command migrates from middleware to proxy in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The codemod command is <code>npx @next/codemod@canary middleware-to-proxy .</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EwlxY" prefix="r3682" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8571824514915997614"],"question":[0,"What is the exact precedence order for environment variable files in Next.js?"],"answer":[0,"Environment variables are looked up in this order (stopping once found): 1. `process.env`, 2. `.env.$(NODE_ENV).local`, 3. `.env.local` (skipped when NODE_ENV is test), 4. `.env.$(NODE_ENV)`, 5. `.env`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-precedence-order-for-environment-variable-files-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-precedence-order-for-environment-variable-files-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-precedence-order-for-environment-variable-files-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact precedence order for environment variable files in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables are looked up in this order (stopping once found): 1. <code>process.env</code>, 2. <code>.env.$(NODE_ENV).local</code>, 3. <code>.env.local</code> (skipped when NODE_ENV is test), 4. <code>.env.$(NODE_ENV)</code>, 5. <code>.env</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VFWHo" prefix="r3683" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8771436570156385693"],"question":[0,"What is the default `Cache-Control` header value for assets in the Next.js `public` folder?"],"answer":[0,"The default header is `Cache-Control: public, max-age=0`, meaning no caching occurs because Next.js cannot safely cache assets in the `public` folder as they may change."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-control-header-value-for-assets-in-the-next-js-public-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-control-header-value-for-assets-in-the-next-js-public-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-control-header-value-for-assets-in-the-next-js-public-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default `Cache-Control` header value for assets in the Next.js `public` folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default header is <code>Cache-Control: public, max-age=0</code>, meaning no caching occurs because Next.js cannot safely cache assets in the <code>public</code> folder as they may change.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="128H7b" prefix="r3684" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8856818393747769697"],"question":[0,"Is `.env.local` loaded during test runs in Next.js?"],"answer":[0,"No, `.env.local` is intentionally skipped when `NODE_ENV=test` to ensure consistent test results across different machines."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"is-env-local-loaded-during-test-runs-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-env-local-loaded-during-test-runs-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-env-local-loaded-during-test-runs-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is `.env.local` loaded during test runs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, <code>.env.local</code> is intentionally skipped when <code>NODE_ENV=test</code> to ensure consistent test results across different machines.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtOiir" prefix="r3685" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8950553696422377563"],"question":[0,"What happens when both `app` (or `pages`) exists in the root directory and `src/app` (or `src/pages`) exists?"],"answer":[0,"`src/app` or `src/pages` will be ignored if `app` or `pages` are present in the root directory. The root-level directories take precedence."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-both-app-or-pages-exists-in-the-root-directory-and-src-app-or-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-both-app-or-pages-exists-in-the-root-directory-and-src-app-or-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-both-app-or-pages-exists-in-the-root-directory-and-src-app-or-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when both `app` (or `pages`) exists in the root directory and `src/app` (or `src/pages`) exists?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>src/app</code> or <code>src/pages</code> will be ignored if <code>app</code> or <code>pages</code> are present in the root directory. The root-level directories take precedence.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="109VAd" prefix="r3686" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10277113528581308418"],"question":[0,"What is the name of the top-level folder used for the App Router in Next.js?"],"answer":[0,"The top-level folder for the App Router is named `app`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-name-of-the-top-level-folder-used-for-the-app-router-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-name-of-the-top-level-folder-used-for-the-app-router-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-name-of-the-top-level-folder-used-for-the-app-router-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the name of the top-level folder used for the App Router in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The top-level folder for the App Router is named <code>app</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kdsfs" prefix="r3687" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12161264445293646801"],"question":[0,"What configuration files must stay in the root directory and cannot be moved to the `src` folder?"],"answer":[0,"Configuration files like `package.json`, `next.config.js`, and `tsconfig.json` should remain in the root of your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-files-must-stay-in-the-root-directory-and-cannot-be-moved-to-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-files-must-stay-in-the-root-directory-and-cannot-be-moved-to-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-files-must-stay-in-the-root-directory-and-cannot-be-moved-to-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration files must stay in the root directory and cannot be moved to the `src` folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Configuration files like <code>package.json</code>, <code>next.config.js</code>, and <code>tsconfig.json</code> should remain in the root of your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mjwU8" prefix="r3688" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12900029996230421100"],"question":[0,"Should `next-env.d.ts` be committed to version control?"],"answer":[0,"No, `next-env.d.ts` should not be committed and should be ignored by version control (added to `.gitignore`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"should-next-env-d-ts-be-committed-to-version-control"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-next-env-d-ts-be-committed-to-version-control" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-next-env-d-ts-be-committed-to-version-control" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should `next-env.d.ts` be committed to version control?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, <code>next-env.d.ts</code> should not be committed and should be ignored by version control (added to <code>.gitignore</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2v346j" prefix="r3689" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13819949166986106643"],"question":[0,"What is the name of Next.js's official ESLint configuration package?"],"answer":[0,"The official ESLint configuration package is `eslint-config-next`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-name-of-next-js-s-official-eslint-configuration-package"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-name-of-next-js-s-official-eslint-configuration-package" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-name-of-next-js-s-official-eslint-configuration-package" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the name of Next.js's official ESLint configuration package?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The official ESLint configuration package is <code>eslint-config-next</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="12CsnR" prefix="r3690" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14213056322665131470"],"question":[0,"Should static metadata files like `robots.txt` and `favicon.ico` be placed in the `public` folder?"],"answer":[0,"No, static metadata files such as `robots.txt` and `favicon.ico` should not go in the `public` folder—they belong in special metadata file locations within the `app` folder instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"should-static-metadata-files-like-robots-txt-and-favicon-ico-be-placed-in-the-pu"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-static-metadata-files-like-robots-txt-and-favicon-ico-be-placed-in-the-pu" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-static-metadata-files-like-robots-txt-and-favicon-ico-be-placed-in-the-pu" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should static metadata files like `robots.txt` and `favicon.ico` be placed in the `public` folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, static metadata files such as <code>robots.txt</code> and <code>favicon.ico</code> should not go in the <code>public</code> folder—they belong in special metadata file locations within the <code>app</code> folder instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24V3DE" prefix="r3691" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14316522821372278316"],"question":[0,"What is the base URL path for files stored in the `public` folder?"],"answer":[0,"Files in the `public` folder are referenced from the base URL `/`. For example, `public/avatars/me.png` is accessed via `/avatars/me.png`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-base-url-path-for-files-stored-in-the-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-base-url-path-for-files-stored-in-the-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-base-url-path-for-files-stored-in-the-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the base URL path for files stored in the `public` folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Files in the <code>public</code> folder are referenced from the base URL <code>/</code>. For example, <code>public/avatars/me.png</code> is accessed via <code>/avatars/me.png</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lVWSm" prefix="r3692" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14760068529159082441"],"question":[0,"What Node.js version features are required for native TypeScript support in `next.config.ts`?"],"answer":[0,"Next.js detects the Node.js native TypeScript resolver via `process.features.typescript`, added in v22.10.0. In Node.js v22.18.0+, it's enabled by default. For v22.10.0 to v22.17.x, opt in with `NODE_OPTIONS=--experimental-transform-types`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-node-js-version-features-are-required-for-native-typescript-support-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-node-js-version-features-are-required-for-native-typescript-support-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-node-js-version-features-are-required-for-native-typescript-support-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Node.js version features are required for native TypeScript support in `next.config.ts`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js detects the Node.js native TypeScript resolver via <code>process.features.typescript</code>, added in v22.10.0. In Node.js v22.18.0+, it's enabled by default. For v22.10.0 to v22.17.x, opt in with <code>NODE_OPTIONS=--experimental-transform-types</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-file-based-assets" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > File-Based Assets</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 30 questions </span> </div> <div class="space-y-4"> <astro-island uid="1aShWF" prefix="r3693" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1255040053935775463"],"question":[0,"What is the maximum bundle size for ImageResponse in Next.js?"],"answer":[0,"500KB. The bundle size includes your JSX, CSS, fonts, images, and any other assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-bundle-size-for-imageresponse-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-bundle-size-for-imageresponse-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-bundle-size-for-imageresponse-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum bundle size for ImageResponse in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>500KB. The bundle size includes your JSX, CSS, fonts, images, and any other assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKUfcU" prefix="r3694" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1489976260147942668"],"question":[0,"What parameters does the default export function receive for generated icon and apple-icon in Next.js?"],"answer":[0,"Optional params: Promise<{ [dynamicRouteParam]: string }>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-default-export-function-receive-for-generated-icon-and-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-default-export-function-receive-for-generated-icon-and-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-default-export-function-receive-for-generated-icon-and-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the default export function receive for generated icon and apple-icon in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Optional params: Promise<{ [dynamicRouteParam]: string }></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DkGyE" prefix="r3695" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1699064411421436687"],"question":[0,"What file types are supported for static opengraph-image and twitter-image in Next.js?"],"answer":[0,".jpg, .jpeg, .png, .gif"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-types-are-supported-for-static-opengraph-image-and-twitter-image-in-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-types-are-supported-for-static-opengraph-image-and-twitter-image-in-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-types-are-supported-for-static-opengraph-image-and-twitter-image-in-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file types are supported for static opengraph-image and twitter-image in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.jpg, .jpeg, .png, .gif</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zQUSb" prefix="r3696" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3306917796368754569"],"question":[0,"What are the default width and height values for ImageResponse in Next.js?"],"answer":[0,"Width: 1200px, Height: 630px"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-width-and-height-values-for-imageresponse-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-width-and-height-values-for-imageresponse-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-width-and-height-values-for-imageresponse-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default width and height values for ImageResponse in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Width: 1200px, Height: 630px</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23BHHY" prefix="r3697" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4296185545956139025"],"question":[0,"Can you generate a favicon icon programmatically in Next.js?"],"answer":[0,"No, you cannot generate a favicon icon. Use icon or a favicon.ico file instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-generate-a-favicon-icon-programmatically-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-generate-a-favicon-icon-programmatically-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-generate-a-favicon-icon-programmatically-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you generate a favicon icon programmatically in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot generate a favicon icon. Use icon or a favicon.ico file instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pGS8d" prefix="r3698" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4741854303915140434"],"question":[0,"What are the valid values for the changeFrequency field in a Next.js sitemap?"],"answer":[0,"\"always\", \"hourly\", \"daily\", \"weekly\", \"monthly\", \"yearly\", \"never\""],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-changefrequency-field-in-a-next-js-sitemap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-changefrequency-field-in-a-next-js-sitemap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-changefrequency-field-in-a-next-js-sitemap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the changeFrequency field in a Next.js sitemap?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"always", "hourly", "daily", "weekly", "monthly", "yearly", "never"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rvOkQ" prefix="r3699" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5042162908544174950"],"question":[0,"What parameters does the default export function receive for generated sitemap in Next.js?"],"answer":[0,"Optional props: { id: Promise<string> }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-default-export-function-receive-for-generated-sitemap-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-default-export-function-receive-for-generated-sitemap-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-default-export-function-receive-for-generated-sitemap-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the default export function receive for generated sitemap in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Optional props: { id: Promise<string> }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jVUAH" prefix="r3700" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5686847471080015980"],"question":[0,"What file formats are supported for sitemap in Next.js?"],"answer":[0,"sitemap.xml (static XML), sitemap.js, sitemap.ts (dynamic generation)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-sitemap-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-sitemap-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-sitemap-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for sitemap in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sitemap.xml (static XML), sitemap.js, sitemap.ts (dynamic generation)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WWv9T" prefix="r3701" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5818648547238233958"],"question":[0,"Can you place sitemap files in nested route segments in Next.js?"],"answer":[0,"Yes, you can place nested sitemap.(xml|js|ts) inside multiple route segments. Generated sitemaps are available at /.../sitemap/[id]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-place-sitemap-files-in-nested-route-segments-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-place-sitemap-files-in-nested-route-segments-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-place-sitemap-files-in-nested-route-segments-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you place sitemap files in nested route segments in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can place nested sitemap.(xml|js|ts) inside multiple route segments. Generated sitemaps are available at /.../sitemap/[id]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGlXfn" prefix="r3702" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6046403564812212440"],"question":[0,"What optional metadata exports are available for generated icon and apple-icon in Next.js?"],"answer":[0,"size (object with width and height numbers) and contentType (image MIME type string)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-metadata-exports-are-available-for-generated-icon-and-apple-icon-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-metadata-exports-are-available-for-generated-icon-and-apple-icon-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-metadata-exports-are-available-for-generated-icon-and-apple-icon-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional metadata exports are available for generated icon and apple-icon in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>size (object with width and height numbers) and contentType (image MIME type string)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="28SbAT" prefix="r3703" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6733938705202655024"],"question":[0,"What file types are supported for the icon file convention in Next.js?"],"answer":[0,".ico, .jpg, .jpeg, .png, .svg"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-types-are-supported-for-the-icon-file-convention-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-types-are-supported-for-the-icon-file-convention-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-types-are-supported-for-the-icon-file-convention-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file types are supported for the icon file convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.ico, .jpg, .jpeg, .png, .svg</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWcwkV" prefix="r3704" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7102701440120541640"],"question":[0,"What file extension is used for alt text files for opengraph-image and twitter-image in Next.js?"],"answer":[0,".txt (e.g., opengraph-image.alt.txt, twitter-image.alt.txt)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extension-is-used-for-alt-text-files-for-opengraph-image-and-twitter-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extension-is-used-for-alt-text-files-for-opengraph-image-and-twitter-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extension-is-used-for-alt-text-files-for-opengraph-image-and-twitter-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extension is used for alt text files for opengraph-image and twitter-image in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.txt (e.g., opengraph-image.alt.txt, twitter-image.alt.txt)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1H4TCs" prefix="r3705" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8272102134152918763"],"question":[0,"Where can the favicon file be placed in a Next.js app directory?"],"answer":[0,"Root /app directory only"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-the-favicon-file-be-placed-in-a-next-js-app-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-the-favicon-file-be-placed-in-a-next-js-app-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-the-favicon-file-be-placed-in-a-next-js-app-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can the favicon file be placed in a Next.js app directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Root /app directory only</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTnw2j" prefix="r3706" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8323462958329548561"],"question":[0,"What return types are supported for programmatically generated opengraph-image and twitter-image in Next.js?"],"answer":[0,"Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-types-are-supported-for-programmatically-generated-opengraph-image-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-types-are-supported-for-programmatically-generated-opengraph-image-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-types-are-supported-for-programmatically-generated-opengraph-image-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return types are supported for programmatically generated opengraph-image and twitter-image in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IKsh8" prefix="r3707" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8614671577356498950"],"question":[0,"What options are available in the ImageResponse constructor in Next.js?"],"answer":[0,"width (number, default 1200), height (number, default 630), emoji (string, default 'twemoji'), fonts (array), debug (boolean, default false), status (number, default 200), statusText (string), headers (record)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-options-are-available-in-the-imageresponse-constructor-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-options-are-available-in-the-imageresponse-constructor-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-options-are-available-in-the-imageresponse-constructor-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What options are available in the ImageResponse constructor in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>width (number, default 1200), height (number, default 630), emoji (string, default 'twemoji'), fonts (array), debug (boolean, default false), status (number, default 200), statusText (string), headers (record)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="b8F7" prefix="r3708" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9628802123132964120"],"question":[0,"What file formats are supported for the manifest file in Next.js?"],"answer":[0,"manifest.json, manifest.webmanifest, manifest.js, manifest.ts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-the-manifest-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-the-manifest-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-the-manifest-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for the manifest file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>manifest.json, manifest.webmanifest, manifest.js, manifest.ts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aIDND" prefix="r3709" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9716874895973021664"],"question":[0,"What layout system does ImageResponse support in Next.js?"],"answer":[0,"Flexbox and a subset of CSS properties. Advanced layouts (e.g. display: grid) will not work."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-layout-system-does-imageresponse-support-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-layout-system-does-imageresponse-support-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-layout-system-does-imageresponse-support-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What layout system does ImageResponse support in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Flexbox and a subset of CSS properties. Advanced layouts (e.g. display: grid) will not work.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15yCz5" prefix="r3710" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9746712442737419536"],"question":[0,"What properties are available in a rule object for robots.ts in Next.js?"],"answer":[0,"userAgent (required string or string array), allow (optional string or string array), disallow (optional string or string array), crawlDelay (optional number)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-a-rule-object-for-robots-ts-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-a-rule-object-for-robots-ts-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-a-rule-object-for-robots-ts-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in a rule object for robots.ts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>userAgent (required string or string array), allow (optional string or string array), disallow (optional string or string array), crawlDelay (optional number)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1T5Sb0" prefix="r3711" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9833858132353821261"],"question":[0,"What return types are supported for programmatically generated icon and apple-icon in Next.js?"],"answer":[0,"Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-types-are-supported-for-programmatically-generated-icon-and-apple-ic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-types-are-supported-for-programmatically-generated-icon-and-apple-ic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-types-are-supported-for-programmatically-generated-icon-and-apple-ic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return types are supported for programmatically generated icon and apple-icon in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Blob | ArrayBuffer | TypedArray | DataView | ReadableStream | Response</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23X3h" prefix="r3712" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10144642104925683393"],"question":[0,"How do you create multiple icons in the same route segment in Next.js?"],"answer":[0,"Add a number suffix to the file name (e.g., icon1.png, icon2.png). Numbered files will sort lexically."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-multiple-icons-in-the-same-route-segment-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-multiple-icons-in-the-same-route-segment-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-multiple-icons-in-the-same-route-segment-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create multiple icons in the same route segment in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add a number suffix to the file name (e.g., icon1.png, icon2.png). Numbered files will sort lexically.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1G8RlB" prefix="r3713" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11158820828381752039"],"question":[0,"What file types are supported for the apple-icon file convention in Next.js?"],"answer":[0,".jpg, .jpeg, .png"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-types-are-supported-for-the-apple-icon-file-convention-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-types-are-supported-for-the-apple-icon-file-convention-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-types-are-supported-for-the-apple-icon-file-convention-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file types are supported for the apple-icon file convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.jpg, .jpeg, .png</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrjMNq" prefix="r3714" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11732600671399028265"],"question":[0,"What font formats are supported by ImageResponse in Next.js?"],"answer":[0,"TTF, OTF, and WOFF. TTF or OTF are preferred over WOFF for parsing speed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-font-formats-are-supported-by-imageresponse-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-font-formats-are-supported-by-imageresponse-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-font-formats-are-supported-by-imageresponse-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What font formats are supported by ImageResponse in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TTF, OTF, and WOFF. TTF or OTF are preferred over WOFF for parsing speed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hutuw" prefix="r3715" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12180212859682862656"],"question":[0,"What optional metadata exports are available for generated opengraph-image and twitter-image in Next.js?"],"answer":[0,"alt (string), size (object with width and height numbers), and contentType (image MIME type string)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-metadata-exports-are-available-for-generated-opengraph-image-and-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-metadata-exports-are-available-for-generated-opengraph-image-and-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-metadata-exports-are-available-for-generated-opengraph-image-and-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional metadata exports are available for generated opengraph-image and twitter-image in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>alt (string), size (object with width and height numbers), and contentType (image MIME type string)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pyyRb" prefix="r3716" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12810336685260561973"],"question":[0,"What attribute does Next.js apply to .svg icon files?"],"answer":[0,"sizes=\"any\""],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-attribute-does-next-js-apply-to-svg-icon-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-attribute-does-next-js-apply-to-svg-icon-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-attribute-does-next-js-apply-to-svg-icon-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What attribute does Next.js apply to .svg icon files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sizes="any"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1oMtxR" prefix="r3717" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13069537752015698339"],"question":[0,"Are generated metadata files like sitemap.ts and opengraph-image.tsx cached by default in Next.js?"],"answer":[0,"Yes, they are cached by default unless they use a Dynamic API or dynamic config option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-generated-metadata-files-like-sitemap-ts-and-opengraph-image-tsx-cached-by-d"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-generated-metadata-files-like-sitemap-ts-and-opengraph-image-tsx-cached-by-d" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-generated-metadata-files-like-sitemap-ts-and-opengraph-image-tsx-cached-by-d" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are generated metadata files like sitemap.ts and opengraph-image.tsx cached by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, they are cached by default unless they use a Dynamic API or dynamic config option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xhPK2" prefix="r3718" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13474555361905415876"],"question":[0,"What optional properties are available in the sitemap return array in Next.js?"],"answer":[0,"lastModified (string or Date), changeFrequency (enum), priority (number), alternates (object with languages), images (string array), videos (object array)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-properties-are-available-in-the-sitemap-return-array-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-properties-are-available-in-the-sitemap-return-array-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-properties-are-available-in-the-sitemap-return-array-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional properties are available in the sitemap return array in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>lastModified (string or Date), changeFrequency (enum), priority (number), alternates (object with languages), images (string array), videos (object array)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mSLRr" prefix="r3719" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13490389384964914489"],"question":[0,"What file formats are supported for robots.txt in Next.js?"],"answer":[0,"robots.txt (static text file), robots.js, robots.ts (dynamic handlers)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-robots-txt-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-robots-txt-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-robots-txt-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for robots.txt in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>robots.txt (static text file), robots.js, robots.ts (dynamic handlers)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16jEva" prefix="r3720" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13880804868797752785"],"question":[0,"Where must the robots.txt file be placed in a Next.js app directory?"],"answer":[0,"Root of the app directory"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-robots-txt-file-be-placed-in-a-next-js-app-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-robots-txt-file-be-placed-in-a-next-js-app-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-robots-txt-file-be-placed-in-a-next-js-app-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the robots.txt file be placed in a Next.js app directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Root of the app directory</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1julAD" prefix="r3721" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14592787497805561086"],"question":[0,"What file types are supported for the favicon file convention in Next.js?"],"answer":[0,".ico only"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-types-are-supported-for-the-favicon-file-convention-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-types-are-supported-for-the-favicon-file-convention-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-types-are-supported-for-the-favicon-file-convention-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file types are supported for the favicon file convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.ico only</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DqKcd" prefix="r3722" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14737893520886191761"],"question":[0,"What properties are required in the sitemap return array in Next.js?"],"answer":[0,"url (string) is required"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-required-in-the-sitemap-return-array-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-required-in-the-sitemap-return-array-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-required-in-the-sitemap-return-array-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are required in the sitemap return array in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>url (string) is required</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="testing-testing-tools-frameworks" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Testing > Testing Tools & Frameworks</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="1pOj7H" prefix="r3723" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"222245224271698666"],"question":[0,"What is the default coverageProvider value recommended for Jest in Next.js?"],"answer":[0,"v8"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-coverageprovider-value-recommended-for-jest-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-coverageprovider-value-recommended-for-jest-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-coverageprovider-value-recommended-for-jest-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default coverageProvider value recommended for Jest in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v8</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zv5UHb" prefix="r3724" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"226531793046101318"],"question":[0,"What is the name of the Playwright configuration file?"],"answer":[0,"playwright.config.ts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-name-of-the-playwright-configuration-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-name-of-the-playwright-configuration-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-name-of-the-playwright-configuration-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the name of the Playwright configuration file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>playwright.config.ts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Znu7SP" prefix="r3725" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"254200553669135280"],"question":[0,"What is the default execution mode when running Vitest in Next.js with the 'vitest' command?"],"answer":[0,"Vitest runs in watch mode by default in development/interactive environments, but switches to run mode in CI environments or non-interactive shells."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-execution-mode-when-running-vitest-in-next-js-with-the-vites"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-execution-mode-when-running-vitest-in-next-js-with-the-vites" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-execution-mode-when-running-vitest-in-next-js-with-the-vites" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default execution mode when running Vitest in Next.js with the 'vitest' command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Vitest runs in watch mode by default in development/interactive environments, but switches to run mode in CI environments or non-interactive shells.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2h9MhE" prefix="r3726" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"334187345336369912"],"question":[0,"Which four testing tools does Next.js officially provide setup guides for?"],"answer":[0,"Next.js officially provides setup guides for: Cypress (for E2E and Component Testing), Jest (for Unit Testing and Snapshot Testing), Playwright (for E2E Testing), and Vitest (for Unit Testing)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing"]]],"topic":[0,"nextjs"],"slug":[0,"which-four-testing-tools-does-next-js-officially-provide-setup-guides-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-four-testing-tools-does-next-js-officially-provide-setup-guides-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-four-testing-tools-does-next-js-officially-provide-setup-guides-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which four testing tools does Next.js officially provide setup guides for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js officially provides setup guides for: Cypress (for E2E and Component Testing), Jest (for Unit Testing and Snapshot Testing), Playwright (for E2E Testing), and Vitest (for Unit Testing).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgcXL8" prefix="r3727" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"707588392817787525"],"question":[0,"What is the command to manually set up Playwright in an existing Next.js project?"],"answer":[0,"npm init playwright (also available via yarn create playwright or pnpm create playwright)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-manually-set-up-playwright-in-an-existing-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-manually-set-up-playwright-in-an-existing-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-manually-set-up-playwright-in-an-existing-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to manually set up Playwright in an existing Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm init playwright (also available via yarn create playwright or pnpm create playwright)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KD9LD" prefix="r3728" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1348830923097973751"],"question":[0,"What is the exact command to create a Next.js app with Cypress using npx?"],"answer":[0,"npx create-next-app@latest --example with-cypress with-cypress-app"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-command-to-create-a-next-js-app-with-cypress-using-npx"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-command-to-create-a-next-js-app-with-cypress-using-npx" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-command-to-create-a-next-js-app-with-cypress-using-npx" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact command to create a Next.js app with Cypress using npx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx create-next-app@latest --example with-cypress with-cypress-app</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rNvTx" prefix="r3729" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2421725667577033509"],"question":[0,"What is the difference in Vitest dependencies between TypeScript and JavaScript Next.js projects?"],"answer":[0,"JavaScript projects omit vite-tsconfig-paths from the dependencies, while TypeScript projects include it."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-in-vitest-dependencies-between-typescript-and-javascript-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-in-vitest-dependencies-between-typescript-and-javascript-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-in-vitest-dependencies-between-typescript-and-javascript-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference in Vitest dependencies between TypeScript and JavaScript Next.js projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>JavaScript projects omit vite-tsconfig-paths from the dependencies, while TypeScript projects include it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzIPxo" prefix="r3730" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2484793410151769820"],"question":[0,"What does next/jest automatically configure for auto-mocking?"],"answer":[0,"next/jest automatically configures auto-mocking for stylesheets (.css, .module.css, and their scss variants) and image imports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-jest-automatically-configure-for-auto-mocking"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-jest-automatically-configure-for-auto-mocking" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-jest-automatically-configure-for-auto-mocking" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does next/jest automatically configure for auto-mocking?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next/jest automatically configures auto-mocking for stylesheets (.css, .module.css, and their scss variants) and image imports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sH8PU" prefix="r3731" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2987233567291541143"],"question":[0,"What is the dir parameter value typically used when configuring next/jest?"],"answer":[0,"./ (the current directory, pointing to your Next.js app root)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-dir-parameter-value-typically-used-when-configuring-next-jest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-dir-parameter-value-typically-used-when-configuring-next-jest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-dir-parameter-value-typically-used-when-configuring-next-jest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the dir parameter value typically used when configuring next/jest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>./ (the current directory, pointing to your Next.js app root)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GLJSF" prefix="r3732" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4092451201035180236"],"question":[0,"What file names can be used for the Jest configuration file in Next.js?"],"answer":[0,"jest.config.ts or jest.config.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-names-can-be-used-for-the-jest-configuration-file-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-names-can-be-used-for-the-jest-configuration-file-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-names-can-be-used-for-the-jest-configuration-file-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file names can be used for the Jest configuration file in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>jest.config.ts or jest.config.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11TbB7" prefix="r3733" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4263816293317557307"],"question":[0,"Does Cypress currently support Component Testing for async Server Components in Next.js?"],"answer":[0,"No, Cypress currently doesn't support Component Testing for async Server Components. E2E testing is recommended instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"does-cypress-currently-support-component-testing-for-async-server-components-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-cypress-currently-support-component-testing-for-async-server-components-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-cypress-currently-support-component-testing-for-async-server-components-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Cypress currently support Component Testing for async Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Cypress currently doesn't support Component Testing for async Server Components. E2E testing is recommended instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BJjt3" prefix="r3734" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4335600447657748402"],"question":[0,"What is the npm script command to open Cypress in interactive mode?"],"answer":[0,"cypress:open"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-npm-script-command-to-open-cypress-in-interactive-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-npm-script-command-to-open-cypress-in-interactive-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-npm-script-command-to-open-cypress-in-interactive-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the npm script command to open Cypress in interactive mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cypress:open</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5w0K4" prefix="r3735" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4608102159760090131"],"question":[0,"What is the exact npm package name for the Next.js Jest transformer?"],"answer":[0,"next/jest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-npm-package-name-for-the-next-js-jest-transformer"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-npm-package-name-for-the-next-js-jest-transformer" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-npm-package-name-for-the-next-js-jest-transformer" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact npm package name for the Next.js Jest transformer?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next/jest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1PjdCS" prefix="r3736" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4728406928135260508"],"question":[0,"What is the recommended baseURL value for Playwright when testing Next.js locally?"],"answer":[0,"http://localhost:3000"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-baseurl-value-for-playwright-when-testing-next-js-locall"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-baseurl-value-for-playwright-when-testing-next-js-locall" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-baseurl-value-for-playwright-when-testing-next-js-locall" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended baseURL value for Playwright when testing Next.js locally?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><a href="http://localhost:3000">http://localhost:3000</a></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iz2yV" prefix="r3737" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6515874382828650695"],"question":[0,"What is the command to install Cypress as a dev dependency in Next.js?"],"answer":[0,"npm install -D cypress (also supports yarn and pnpm)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-command-to-install-cypress-as-a-dev-dependency-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-command-to-install-cypress-as-a-dev-dependency-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-command-to-install-cypress-as-a-dev-dependency-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the command to install Cypress as a dev dependency in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm install -D cypress (also supports yarn and pnpm)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoQysx" prefix="r3738" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7022491825003211271"],"question":[0,"Which three browsers does Playwright automate for Next.js E2E testing?"],"answer":[0,"Chromium, Firefox, and WebKit"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"which-three-browsers-does-playwright-automate-for-next-js-e2e-testing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-three-browsers-does-playwright-automate-for-next-js-e2e-testing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-three-browsers-does-playwright-automate-for-next-js-e2e-testing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which three browsers does Playwright automate for Next.js E2E testing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Chromium, Firefox, and WebKit</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27EHE6" prefix="r3739" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7240572185830384571"],"question":[0,"Which directories does next/jest automatically ignore from test transforms?"],"answer":[0,"node_modules and .next"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"which-directories-does-next-jest-automatically-ignore-from-test-transforms"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-directories-does-next-jest-automatically-ignore-from-test-transforms" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-directories-does-next-jest-automatically-ignore-from-test-transforms" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which directories does next/jest automatically ignore from test transforms?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>node_modules and .next</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jvCai" prefix="r3740" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7388424420480488391"],"question":[0,"What are the required dev dependencies to set up Vitest with Next.js for TypeScript?"],"answer":[0,"vitest, @vitejs/plugin-react, jsdom, @testing-library/react, @testing-library/dom, and vite-tsconfig-paths"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-dev-dependencies-to-set-up-vitest-with-next-js-for-typescr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-dev-dependencies-to-set-up-vitest-with-next-js-for-typescr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-dev-dependencies-to-set-up-vitest-with-next-js-for-typescr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required dev dependencies to set up Vitest with Next.js for TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>vitest, @vitejs/plugin-react, jsdom, @testing-library/react, @testing-library/dom, and vite-tsconfig-paths</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27G8yy" prefix="r3741" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7786237883900833732"],"question":[0,"What are the required dev dependencies to set up Jest with Next.js?"],"answer":[0,"jest, jest-environment-jsdom, @testing-library/react, @testing-library/dom, @testing-library/jest-dom, ts-node, and @types/jest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-dev-dependencies-to-set-up-jest-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-dev-dependencies-to-set-up-jest-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-dev-dependencies-to-set-up-jest-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required dev dependencies to set up Jest with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>jest, jest-environment-jsdom, @testing-library/react, @testing-library/dom, @testing-library/jest-dom, ts-node, and @types/jest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuOczk" prefix="r3742" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8053244176397743796"],"question":[0,"What command installs Playwright dependencies for CI/CD environments?"],"answer":[0,"npx playwright install-deps"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-installs-playwright-dependencies-for-ci-cd-environments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-installs-playwright-dependencies-for-ci-cd-environments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-installs-playwright-dependencies-for-ci-cd-environments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command installs Playwright dependencies for CI/CD environments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx playwright install-deps</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jYKY0" prefix="r3743" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8168364204147965489"],"question":[0,"Since which version of Next.js does Next.js have built-in configuration for Jest?"],"answer":[0,"Since Next.js 12, Next.js now has built-in configuration for Jest."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"since-which-version-of-next-js-does-next-js-have-built-in-configuration-for-jest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="since-which-version-of-next-js-does-next-js-have-built-in-configuration-for-jest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#since-which-version-of-next-js-does-next-js-have-built-in-configuration-for-jest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Since which version of Next.js does Next.js have built-in configuration for Jest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since Next.js 12, Next.js now has built-in configuration for Jest.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMiSaC" prefix="r3744" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8775988463682885537"],"question":[0,"Does Jest currently support testing async Server Components in Next.js?"],"answer":[0,"No, Jest currently does not support async Server Components. E2E testing is recommended instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"does-jest-currently-support-testing-async-server-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-jest-currently-support-testing-async-server-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-jest-currently-support-testing-async-server-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Jest currently support testing async Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Jest currently does not support async Server Components. E2E testing is recommended instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zBYaf" prefix="r3745" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9681833511007953740"],"question":[0,"What are the Cypress commands to run tests in headless mode for CI/CD?"],"answer":[0,"cypress run --e2e for E2E tests and cypress run --component for component tests"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-cypress-commands-to-run-tests-in-headless-mode-for-ci-cd"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-cypress-commands-to-run-tests-in-headless-mode-for-ci-cd" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-cypress-commands-to-run-tests-in-headless-mode-for-ci-cd" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the Cypress commands to run tests in headless mode for CI/CD?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cypress run --e2e for E2E tests and cypress run --component for component tests</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eAi3x" prefix="r3746" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11395516765028001549"],"question":[0,"Does next/jest automatically load environment variables?"],"answer":[0,"Yes, next/jest automatically loads .env files (and all variants) into process.env."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-jest-automatically-load-environment-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-jest-automatically-load-environment-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-jest-automatically-load-environment-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does next/jest automatically load environment variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, next/jest automatically loads .env files (and all variants) into process.env.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2drmqG" prefix="r3747" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12374278392002526530"],"question":[0,"What is the exact command to create a Next.js app with Playwright configured using npx?"],"answer":[0,"npx create-next-app@latest --example with-playwright with-playwright-app"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/playwright"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-command-to-create-a-next-js-app-with-playwright-configured-usi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-command-to-create-a-next-js-app-with-playwright-configured-usi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-command-to-create-a-next-js-app-with-playwright-configured-usi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact command to create a Next.js app with Playwright configured using npx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx create-next-app@latest --example with-playwright with-playwright-app</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/playwright" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GJdGS" prefix="r3748" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12442329669474897950"],"question":[0,"Does Vitest currently support testing async Server Components in Next.js?"],"answer":[0,"No, Vitest currently does not support async Server Components. E2E tests are recommended for async components, while unit tests work for synchronous Server and Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"does-vitest-currently-support-testing-async-server-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-vitest-currently-support-testing-async-server-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-vitest-currently-support-testing-async-server-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Vitest currently support testing async Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Vitest currently does not support async Server Components. E2E tests are recommended for async components, while unit tests work for synchronous Server and Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Cn9i3" prefix="r3749" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12672685016738557649"],"question":[0,"What is the default testEnvironment value recommended for Jest in Next.js?"],"answer":[0,"jsdom"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/jest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-testenvironment-value-recommended-for-jest-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-testenvironment-value-recommended-for-jest-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-testenvironment-value-recommended-for-jest-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default testEnvironment value recommended for Jest in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>jsdom</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/jest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pULIp" prefix="r3750" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13225584787860138666"],"question":[0,"What file name should be used for Vitest configuration in a TypeScript Next.js project?"],"answer":[0,"vitest.config.mts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/testing/vitest"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-name-should-be-used-for-vitest-configuration-in-a-typescript-next-js-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-name-should-be-used-for-vitest-configuration-in-a-typescript-next-js-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-name-should-be-used-for-vitest-configuration-in-a-typescript-next-js-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file name should be used for Vitest configuration in a TypeScript Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>vitest.config.mts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/testing/vitest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1X5vHc" prefix="r3751" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13238837529940439468"],"question":[0,"What is the minimum Cypress version required for TypeScript 5 support with moduleResolution:'bundler'?"],"answer":[0,"Cypress 13.6.3 or later"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/testing/cypress"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-cypress-version-required-for-typescript-5-support-with-modul"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-cypress-version-required-for-typescript-5-support-with-modul" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-cypress-version-required-for-typescript-5-support-with-modul" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Cypress version required for TypeScript 5 support with moduleResolution:'bundler'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cypress 13.6.3 or later</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/testing/cypress" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="mdx" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">MDX</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z232Bd8" prefix="r3752" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"226622315440275069"],"question":[0,"What is the basic next.config.mjs structure for enabling MDX with Next.js using ESM?"],"answer":[0,"import createMDX from '@next/mdx'\nconst nextConfig = { pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'] }\nconst withMDX = createMDX({ options: { remarkPlugins: [], rehypePlugins: [] } })\nexport default withMDX(nextConfig)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-next-config-mjs-structure-for-enabling-mdx-with-next-js-using-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-next-config-mjs-structure-for-enabling-mdx-with-next-js-using-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-next-config-mjs-structure-for-enabling-mdx-with-next-js-using-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic next.config.mjs structure for enabling MDX with Next.js using ESM?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import createMDX from '@next/mdx'<br>const nextConfig = { pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'] }<br>const withMDX = createMDX({ options: { remarkPlugins: [], rehypePlugins: [] } })<br>export default withMDX(nextConfig)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZcSbj4" prefix="r3753" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"890501446721931528"],"question":[0,"In what Next.js version was the mdx-components file feature introduced?"],"answer":[0,"The mdx-components file feature was introduced in Next.js version 13.1.2."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-next-js-version-was-the-mdx-components-file-feature-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-next-js-version-was-the-mdx-components-file-feature-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-next-js-version-was-the-mdx-components-file-feature-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what Next.js version was the mdx-components file feature introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The mdx-components file feature was introduced in Next.js version 13.1.2.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18AFTU" prefix="r3754" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1180487375652647954"],"question":[0,"How do you add remarkPlugins with options to the MDX configuration?"],"answer":[0,"Pass plugins as arrays where the first element is the plugin and the second is the options object: remarkPlugins: [['remark-toc', { heading: 'The Table' }]]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-add-remarkplugins-with-options-to-the-mdx-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-add-remarkplugins-with-options-to-the-mdx-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-add-remarkplugins-with-options-to-the-mdx-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you add remarkPlugins with options to the MDX configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pass plugins as arrays where the first element is the plugin and the second is the options object: remarkPlugins: [['remark-toc', { heading: 'The Table' }]]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="K9vWg" prefix="r3755" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1792138921614547320"],"question":[0,"Can remark and rehype plugins with non-serializable options be used with Turbopack?"],"answer":[0,"No, remark and rehype plugins without serializable options cannot be used yet with Turbopack, since JavaScript functions can't be passed to Rust."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"can-remark-and-rehype-plugins-with-non-serializable-options-be-used-with-turbopa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-remark-and-rehype-plugins-with-non-serializable-options-be-used-with-turbopa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-remark-and-rehype-plugins-with-non-serializable-options-be-used-with-turbopa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can remark and rehype plugins with non-serializable options be used with Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, remark and rehype plugins without serializable options cannot be used yet with Turbopack, since JavaScript functions can't be passed to Rust.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wvU35" prefix="r3756" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2384471897249458714"],"question":[0,"How do you override the default img element with Next.js Image component in MDX?"],"answer":[0,"In mdx-components.tsx, return an object with img mapped to Image: { img: (props) => <Image sizes=\"100vw\" style={{ width: '100%', height: 'auto' }} {...props} /> }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-override-the-default-img-element-with-next-js-image-component-in-mdx"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-override-the-default-img-element-with-next-js-image-component-in-mdx" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-override-the-default-img-element-with-next-js-image-component-in-mdx" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you override the default img element with Next.js Image component in MDX?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In mdx-components.tsx, return an object with img mapped to Image: { img: (props) => <Image sizes="100vw" style={{ width: '100%', height: 'auto' }} {...props} /> }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SJ0CS" prefix="r3757" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2721749931931320805"],"question":[0,"What file extension does @next/mdx compile by default?"],"answer":[0,"By default, @next/mdx only compiles files with the .mdx extension."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extension-does-next-mdx-compile-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extension-does-next-mdx-compile-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extension-does-next-mdx-compile-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extension does @next/mdx compile by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, @next/mdx only compiles files with the .mdx extension.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29u1Qu" prefix="r3758" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3586699456194858088"],"question":[0,"How do you import both the MDX component and its metadata?"],"answer":[0,"Import both the default export and named exports: import BlogPost, { metadata } from '@/content/blog-post.mdx'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-import-both-the-mdx-component-and-its-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-import-both-the-mdx-component-and-its-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-import-both-the-mdx-component-and-its-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you import both the MDX component and its metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import both the default export and named exports: import BlogPost, { metadata } from '@/content/blog-post.mdx'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="A1hKs" prefix="r3759" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3969095066230014018"],"question":[0,"Is the mdx-components.tsx file required when using @next/mdx with App Router?"],"answer":[0,"Yes, mdx-components.tsx is required to use @next/mdx with App Router and will not work without it."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-mdx-components-tsx-file-required-when-using-next-mdx-with-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-mdx-components-tsx-file-required-when-using-next-mdx-with-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-mdx-components-tsx-file-required-when-using-next-mdx-with-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the mdx-components.tsx file required when using @next/mdx with App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, mdx-components.tsx is required to use @next/mdx with App Router and will not work without it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pSFTb" prefix="r3760" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4810356312150809380"],"question":[0,"What is the basic next.config.js structure for enabling MDX with Next.js using CommonJS?"],"answer":[0,"const withMDX = require('@next/mdx')()\nconst nextConfig = { pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'] }\nmodule.exports = withMDX(nextConfig)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-next-config-js-structure-for-enabling-mdx-with-next-js-using-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-next-config-js-structure-for-enabling-mdx-with-next-js-using-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-next-config-js-structure-for-enabling-mdx-with-next-js-using-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic next.config.js structure for enabling MDX with Next.js using CommonJS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>const withMDX = require('@next/mdx')()<br>const nextConfig = { pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'] }<br>module.exports = withMDX(nextConfig)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pp4Wu" prefix="r3761" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4875642408860182599"],"question":[0,"What configuration file format is required when using remark and rehype plugins with Next.js MDX?"],"answer":[0,"Since the remark and rehype ecosystem is ESM only, you'll need to use next.config.mjs or next.config.ts as the configuration file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-file-format-is-required-when-using-remark-and-rehype-plugins-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-file-format-is-required-when-using-remark-and-rehype-plugins-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-file-format-is-required-when-using-remark-and-rehype-plugins-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration file format is required when using remark and rehype plugins with Next.js MDX?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since the remark and rehype ecosystem is ESM only, you'll need to use next.config.mjs or next.config.ts as the configuration file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10WP72" prefix="r3762" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4946300175524636253"],"question":[0,"Does configuring pageExtensions affect other Next.js files besides pages?"],"answer":[0,"Yes, configuring pageExtensions also affects _document.js, _app.js, _middleware.js as well as files under pages/api/."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"does-configuring-pageextensions-affect-other-next-js-files-besides-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-configuring-pageextensions-affect-other-next-js-files-besides-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-configuring-pageextensions-affect-other-next-js-files-besides-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does configuring pageExtensions affect other Next.js files besides pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, configuring pageExtensions also affects _document.js, _app.js, _middleware.js as well as files under pages/api/.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2v0dAR" prefix="r3763" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5383414438238969890"],"question":[0,"What are the required packages to install for using MDX with Next.js?"],"answer":[0,"Four packages are required: @next/mdx, @mdx-js/loader, @mdx-js/react, and @types/mdx."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-packages-to-install-for-using-mdx-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-packages-to-install-for-using-mdx-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-packages-to-install-for-using-mdx-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required packages to install for using MDX with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Four packages are required: @next/mdx, @mdx-js/loader, @mdx-js/react, and @types/mdx.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Gu5AC" prefix="r3764" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5706636483441349962"],"question":[0,"What library is commonly recommended for adding frontmatter support to Next.js MDX?"],"answer":[0,"gray-matter is the most commonly recommended library for parsing frontmatter from MDX content in Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-library-is-commonly-recommended-for-adding-frontmatter-support-to-next-js-m"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-library-is-commonly-recommended-for-adding-frontmatter-support-to-next-js-m" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-library-is-commonly-recommended-for-adding-frontmatter-support-to-next-js-m" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What library is commonly recommended for adding frontmatter support to Next.js MDX?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>gray-matter is the most commonly recommended library for parsing frontmatter from MDX content in Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Wmciq" prefix="r3765" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6670285381750091810"],"question":[0,"How do you apply a layout wrapper to an MDX page in Next.js?"],"answer":[0,"Import the layout component in the MDX file and export a default function that wraps children with the layout: export default function MDXPage({ children }) { return <MdxLayout>{children}</MdxLayout> }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-apply-a-layout-wrapper-to-an-mdx-page-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-apply-a-layout-wrapper-to-an-mdx-page-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-apply-a-layout-wrapper-to-an-mdx-page-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you apply a layout wrapper to an MDX page in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import the layout component in the MDX file and export a default function that wraps children with the layout: export default function MDXPage({ children }) { return <MdxLayout>{children}</MdxLayout> }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2reagX" prefix="r3766" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7271260455696251355"],"question":[0,"Where should the mdx-components.tsx file be located in a Next.js project?"],"answer":[0,"The mdx-components.tsx file should be placed at the project root - at the same level as pages or app directories, or inside src if applicable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-mdx-components-tsx-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-mdx-components-tsx-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-mdx-components-tsx-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the mdx-components.tsx file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The mdx-components.tsx file should be placed at the project root - at the same level as pages or app directories, or inside src if applicable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rmA55" prefix="r3767" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7693954191860814326"],"question":[0,"What function must the mdx-components.tsx file export?"],"answer":[0,"It must export a function named useMDXComponents that returns an MDXComponents object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-must-the-mdx-components-tsx-file-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-must-the-mdx-components-tsx-file-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-must-the-mdx-components-tsx-file-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function must the mdx-components.tsx file export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It must export a function named useMDXComponents that returns an MDXComponents object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZutN5" prefix="r3768" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7726944130226997052"],"question":[0,"How do you enable the experimental Rust-based MDX compiler in Next.js?"],"answer":[0,"Set mdxRs: true in the experimental section of next.config.js when using @next/mdx."],"confidence":[0,0.95],"sources":[1,[[0,"https://en.nextjs.im/docs/app/api-reference/config/next-config-js/mdxRs"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-the-experimental-rust-based-mdx-compiler-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-the-experimental-rust-based-mdx-compiler-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-the-experimental-rust-based-mdx-compiler-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable the experimental Rust-based MDX compiler in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set mdxRs: true in the experimental section of next.config.js when using @next/mdx.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://en.nextjs.im/docs/app/api-reference/config/next-config-js/mdxRs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>en.nextjs.im</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DRlTI" prefix="r3769" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8072354941166673436"],"question":[0,"Is the mdx-components.tsx file required for the Pages Router?"],"answer":[0,"No, the file is not required for the Pages Router, but can still be used for customizing MDX components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-mdx-components-tsx-file-required-for-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-mdx-components-tsx-file-required-for-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-mdx-components-tsx-file-required-for-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the mdx-components.tsx file required for the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the file is not required for the Pages Router, but can still be used for customizing MDX components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ldWU4" prefix="r3770" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9844174677100196885"],"question":[0,"What TypeScript type should you import for typing MDX components?"],"answer":[0,"Import the MDXComponents type from 'mdx/types': import type { MDXComponents } from 'mdx/types'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-should-you-import-for-typing-mdx-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-should-you-import-for-typing-mdx-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-should-you-import-for-typing-mdx-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type should you import for typing MDX components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import the MDXComponents type from 'mdx/types': import type { MDXComponents } from 'mdx/types'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8UDxB" prefix="r3771" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9863483964407158070"],"question":[0,"How can you export metadata from MDX files without using frontmatter?"],"answer":[0,"Use JavaScript exports directly in your MDX files: export const metadata = { title: 'My Post', author: 'John Doe' }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-export-metadata-from-mdx-files-without-using-frontmatter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-export-metadata-from-mdx-files-without-using-frontmatter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-export-metadata-from-mdx-files-without-using-frontmatter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you export metadata from MDX files without using frontmatter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use JavaScript exports directly in your MDX files: export const metadata = { title: 'My Post', author: 'John Doe' }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15oI2S" prefix="r3772" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10088883932011898523"],"question":[0,"What is the basic structure required for a useMDXComponents function with TypeScript?"],"answer":[0,"import type { MDXComponents } from 'mdx/types'\nexport function useMDXComponents(components: MDXComponents): MDXComponents {\n return { ...components }\n}"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-structure-required-for-a-usemdxcomponents-function-with-typesc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-structure-required-for-a-usemdxcomponents-function-with-typesc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-structure-required-for-a-usemdxcomponents-function-with-typesc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic structure required for a useMDXComponents function with TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import type { MDXComponents } from 'mdx/types'<br>export function useMDXComponents(components: MDXComponents): MDXComponents {<br> return { ...components }<br>}</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/mdx-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="VbM1z" prefix="r3773" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11883008337133709306"],"question":[0,"Should @next/mdx package version match the Next.js version?"],"answer":[0,"Yes, the @next/mdx package is designed to have version parity with Next.js itself (e.g., @next/mdx 16.0.8 works with Next.js 16.0.8)."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@next/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"should-next-mdx-package-version-match-the-next-js-version"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-next-mdx-package-version-match-the-next-js-version" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-next-mdx-package-version-match-the-next-js-version" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should @next/mdx package version match the Next.js version?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the @next/mdx package is designed to have version parity with Next.js itself (e.g., @next/mdx 16.0.8 works with Next.js 16.0.8).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@next/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NdH6d" prefix="r3774" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12596181937610958105"],"question":[0,"Can you use React Context (like MDXProvider from @mdx-js/react) with MDX in Next.js App Router?"],"answer":[0,"No, custom components can no longer be provided using MDXProvider context from @mdx-js/react, as React Server Components (RSC) do not support React Context."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/50897"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-react-context-like-mdxprovider-from-mdx-js-react-with-mdx-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-react-context-like-mdxprovider-from-mdx-js-react-with-mdx-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-react-context-like-mdxprovider-from-mdx-js-react-with-mdx-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use React Context (like MDXProvider from @mdx-js/react) with MDX in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, custom components can no longer be provided using MDXProvider context from @mdx-js/react, as React Server Components (RSC) do not support React Context.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/50897" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="faAYM" prefix="r3775" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12874065803037037005"],"question":[0,"What pageExtensions configuration is recommended when using MDX with Next.js?"],"answer":[0,"pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx']"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-pageextensions-configuration-is-recommended-when-using-mdx-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-pageextensions-configuration-is-recommended-when-using-mdx-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-pageextensions-configuration-is-recommended-when-using-mdx-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What pageExtensions configuration is recommended when using MDX with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx']</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MJ3Vg" prefix="r3776" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13344493614928191147"],"question":[0,"Are MDX pages rendered as Server Components or Client Components by default in App Router?"],"answer":[0,"MDX pages render as Server Components by default in the App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"are-mdx-pages-rendered-as-server-components-or-client-components-by-default-in-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-mdx-pages-rendered-as-server-components-or-client-components-by-default-in-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-mdx-pages-rendered-as-server-components-or-client-components-by-default-in-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are MDX pages rendered as Server Components or Client Components by default in App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>MDX pages render as Server Components by default in the App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yFrLB" prefix="r3777" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13564757925454369574"],"question":[0,"Is the experimental mdxRs Rust-based MDX compiler recommended for production?"],"answer":[0,"No, the Rust-based MDX compiler is still experimental and is not recommended for production use."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-2"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-experimental-mdxrs-rust-based-mdx-compiler-recommended-for-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-experimental-mdxrs-rust-based-mdx-compiler-recommended-for-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-experimental-mdxrs-rust-based-mdx-compiler-recommended-for-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the experimental mdxRs Rust-based MDX compiler recommended for production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the Rust-based MDX compiler is still experimental and is not recommended for production use.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-2" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pgD7X" prefix="r3778" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14114628250419073738"],"question":[0,"What is the security risk when fetching remote MDX content?"],"answer":[0,"MDX compiles to JavaScript and is executed on the server. You should only fetch MDX content from a trusted source, otherwise this can lead to remote code execution (RCE)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-security-risk-when-fetching-remote-mdx-content"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-security-risk-when-fetching-remote-mdx-content" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-security-risk-when-fetching-remote-mdx-content" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the security risk when fetching remote MDX content?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>MDX compiles to JavaScript and is executed on the server. You should only fetch MDX content from a trusted source, otherwise this can lead to remote code execution (RCE).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xkvSR" prefix="r3779" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14409501905352133464"],"question":[0,"Can components in mdx-components.tsx be overridden on a per-page basis?"],"answer":[0,"Yes, you can pass custom components directly to imported MDX files using a components prop, which will merge with and override global styles and components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/mdx"]]],"topic":[0,"nextjs"],"slug":[0,"can-components-in-mdx-components-tsx-be-overridden-on-a-per-page-basis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-components-in-mdx-components-tsx-be-overridden-on-a-per-page-basis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-components-in-mdx-components-tsx-be-overridden-on-a-per-page-basis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can components in mdx-components.tsx be overridden on a per-page basis?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can pass custom components directly to imported MDX files using a components prop, which will merge with and override global styles and components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uVtMG" prefix="r3780" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14471714255655889569"],"question":[0,"What are the default pageExtensions in Next.js before adding MDX support?"],"answer":[0,"By default, Next.js accepts files with the following extensions: .tsx, .ts, .jsx, .js (in that order: ['tsx', 'ts', 'jsx', 'js'])."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-pageextensions-in-next-js-before-adding-mdx-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-pageextensions-in-next-js-before-adding-mdx-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-pageextensions-in-next-js-before-adding-mdx-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default pageExtensions in Next.js before adding MDX support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js accepts files with the following extensions: .tsx, .ts, .jsx, .js (in that order: ['tsx', 'ts', 'jsx', 'js']).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="partial-prerendering" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Partial Prerendering</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="1J4l9Q" prefix="r3781" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"434656732612041910"],"question":[0,"How does time-based revalidation work with the revalidate export?"],"answer":[0,"After the revalidation time window (e.g., export const revalidate = 60 for 60 seconds), the next request will still show the cached (stale) page, and Next.js triggers a regeneration of the page in the background."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-time-based-revalidation-work-with-the-revalidate-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-time-based-revalidation-work-with-the-revalidate-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-time-based-revalidation-work-with-the-revalidate-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does time-based revalidation work with the revalidate export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>After the revalidation time window (e.g., export const revalidate = 60 for 60 seconds), the next request will still show the cached (stale) page, and Next.js triggers a regeneration of the page in the background.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gfwa6" prefix="r3782" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"772792714944668117"],"question":[0,"Can PPR work with the useSearchParams hook?"],"answer":[0,"Yes, but the behavior differs: searchParams from page props triggers dynamic (server-side, request time) rendering, while useSearchParams keeps the page static but uses client-side rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/58351"]]],"topic":[0,"nextjs"],"slug":[0,"can-ppr-work-with-the-usesearchparams-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-ppr-work-with-the-usesearchparams-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-ppr-work-with-the-usesearchparams-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can PPR work with the useSearchParams hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but the behavior differs: searchParams from page props triggers dynamic (server-side, request time) rendering, while useSearchParams keeps the page static but uses client-side rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/58351" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="V5HMt" prefix="r3783" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"880407578548916772"],"question":[0,"How can you use draftMode() while keeping a page static with PPR?"],"answer":[0,"Check isEnabled from draftMode() and conditionally call dynamic APIs like cookies() only when enabled. Next.js can switch between static and dynamic runtime strategies based on this check."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/50399"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-use-draftmode-while-keeping-a-page-static-with-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-use-draftmode-while-keeping-a-page-static-with-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-use-draftmode-while-keeping-a-page-static-with-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you use draftMode() while keeping a page static with PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Check isEnabled from draftMode() and conditionally call dynamic APIs like cookies() only when enabled. Next.js can switch between static and dynamic runtime strategies based on this check.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/50399" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="AlzkX" prefix="r3784" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2342728948201492527"],"question":[0,"How does PPR work in self-hosted/standalone deployments?"],"answer":[0,"With standalone or next start deployments, PPR is not served from the CDN. The server fetches the static shell from the filesystem (or external cache handler), then starts streaming, but everything happens on the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/58350"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-ppr-work-in-self-hosted-standalone-deployments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-ppr-work-in-self-hosted-standalone-deployments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-ppr-work-in-self-hosted-standalone-deployments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does PPR work in self-hosted/standalone deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With standalone or next start deployments, PPR is not served from the CDN. The server fetches the static shell from the filesystem (or external cache handler), then starts streaming, but everything happens on the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/58350" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IAlen" prefix="r3785" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2364754343375312017"],"question":[0,"Is PPR available in stable Next.js releases?"],"answer":[0,"No, PPR is only available in the canary version of Next.js (next@canary or next@rc), not in stable releases."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/ppr-preview"]]],"topic":[0,"nextjs"],"slug":[0,"is-ppr-available-in-stable-next-js-releases"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-ppr-available-in-stable-next-js-releases" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-ppr-available-in-stable-next-js-releases" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is PPR available in stable Next.js releases?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, PPR is only available in the canary version of Next.js (next@canary or next@rc), not in stable releases.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/ppr-preview" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZeNhM6" prefix="r3786" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2440171411986136796"],"question":[0,"What happens if you wrap dynamic APIs in a try/catch block with PPR?"],"answer":[0,"You must re-throw the original error so it can be caught by Next.js. Alternatively, insert unstable_noStore() before the try/catch. Otherwise, Next.js cannot properly detect which parts cannot be statically generated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/ppr-caught-error"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-wrap-dynamic-apis-in-a-try-catch-block-with-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-wrap-dynamic-apis-in-a-try-catch-block-with-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-wrap-dynamic-apis-in-a-try-catch-block-with-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you wrap dynamic APIs in a try/catch block with PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must re-throw the original error so it can be caught by Next.js. Alternatively, insert unstable_noStore() before the try/catch. Otherwise, Next.js cannot properly detect which parts cannot be statically generated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/ppr-caught-error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ocDUN" prefix="r3787" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3364581401952917729"],"question":[0,"What happens if you use a dynamic API outside of a Suspense boundary in PPR?"],"answer":[0,"Using dynamic APIs outside of Suspense boundaries causes a build error. React throws a special error object to inform Next.js that the component cannot be statically rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-use-a-dynamic-api-outside-of-a-suspense-boundary-in-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-use-a-dynamic-api-outside-of-a-suspense-boundary-in-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-use-a-dynamic-api-outside-of-a-suspense-boundary-in-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you use a dynamic API outside of a Suspense boundary in PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using dynamic APIs outside of Suspense boundaries causes a build error. React throws a special error object to inform Next.js that the component cannot be statically rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bccU4" prefix="r3788" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4520585250832387365"],"question":[0,"What is the difference between revalidatePath and revalidateTag?"],"answer":[0,"revalidatePath invalidates a specific page or layout path, while revalidateTag invalidates cached data with specific tags across all pages that use those tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://anjitpariyar.medium.com/revalidate-path-vs-revalidate-tag-vs-revalidate-time-next-js-v15-app-router-89db505c2f3f"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-revalidatepath-and-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-revalidatepath-and-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-revalidatepath-and-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between revalidatePath and revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidatePath invalidates a specific page or layout path, while revalidateTag invalidates cached data with specific tags across all pages that use those tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://anjitpariyar.medium.com/revalidate-path-vs-revalidate-tag-vs-revalidate-time-next-js-v15-app-router-89db505c2f3f" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>anjitpariyar.medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1cxinl" prefix="r3789" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5245994662965200030"],"question":[0,"What happens to dynamic holes when they are streamed in PPR?"],"answer":[0,"The dynamic holes are streamed in parallel, reducing the overall load time of the page. Dynamic components render in parallel and stream to clients as chunks become ready."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-dynamic-holes-when-they-are-streamed-in-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-dynamic-holes-when-they-are-streamed-in-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-dynamic-holes-when-they-are-streamed-in-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to dynamic holes when they are streamed in PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The dynamic holes are streamed in parallel, reducing the overall load time of the page. Dynamic components render in parallel and stream to clients as chunks become ready.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27fQ2T" prefix="r3790" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5966816952578697854"],"question":[0,"How does revalidatePath work differently in Server Functions vs Route Handlers?"],"answer":[0,"In Server Functions, revalidatePath updates the UI immediately if viewing the affected path. In Route Handlers, it marks the path for revalidation, with revalidation done on the next visit to the specified path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-revalidatepath-work-differently-in-server-functions-vs-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-revalidatepath-work-differently-in-server-functions-vs-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-revalidatepath-work-differently-in-server-functions-vs-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does revalidatePath work differently in Server Functions vs Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Server Functions, revalidatePath updates the UI immediately if viewing the affected path. In Route Handlers, it marks the path for revalidation, with revalidation done on the next visit to the specified path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="avvXn" prefix="r3791" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6281298315596593103"],"question":[0,"How does PPR work on Vercel deployments?"],"answer":[0,"On Vercel, the static shell is served from the edge (Vercel's Edge Network/CDN), with dynamic content streaming from the nearest Vercel Region."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/58350"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-ppr-work-on-vercel-deployments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-ppr-work-on-vercel-deployments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-ppr-work-on-vercel-deployments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does PPR work on Vercel deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On Vercel, the static shell is served from the edge (Vercel's Edge Network/CDN), with dynamic content streaming from the nearest Vercel Region.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/58350" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1rH72n" prefix="r3792" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6964840819957737642"],"question":[0,"How should you pass dynamic values like searchParams to child components in PPR?"],"answer":[0,"Passing dynamic values as props to child components defers dynamic rendering to the consuming component, maintaining static prerendering of parent content. Components only opt into dynamic rendering when the value is accessed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-pass-dynamic-values-like-searchparams-to-child-components-in-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-pass-dynamic-values-like-searchparams-to-child-components-in-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-pass-dynamic-values-like-searchparams-to-child-components-in-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you pass dynamic values like searchParams to child components in PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Passing dynamic values as props to child components defers dynamic rendering to the consuming component, maintaining static prerendering of parent content. Components only opt into dynamic rendering when the value is accessed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1M1A5P" prefix="r3793" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7081810839373687869"],"question":[0,"What is the current status of Partial Prerendering (PPR) in Next.js?"],"answer":[0,"PPR is currently experimental and subject to change. It is not recommended for production environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-current-status-of-partial-prerendering-ppr-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-current-status-of-partial-prerendering-ppr-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-current-status-of-partial-prerendering-ppr-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the current status of Partial Prerendering (PPR) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PPR is currently experimental and subject to change. It is not recommended for production environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2uMbDd" prefix="r3794" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7148485035643511386"],"question":[0,"In which Next.js version was the 'incremental' value for PPR introduced?"],"answer":[0,"The 'incremental' value for PPR was introduced in Next.js v15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-incremental-value-for-ppr-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-incremental-value-for-ppr-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-incremental-value-for-ppr-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the 'incremental' value for PPR introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'incremental' value for PPR was introduced in Next.js v15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eMG5R" prefix="r3795" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7254940660732290535"],"question":[0,"How do you opt a specific route into PPR after enabling incremental mode?"],"answer":[0,"Export the experimental_ppr constant set to true at the top of your layout or page file: export const experimental_ppr = true"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-opt-a-specific-route-into-ppr-after-enabling-incremental-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-opt-a-specific-route-into-ppr-after-enabling-incremental-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-opt-a-specific-route-into-ppr-after-enabling-incremental-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you opt a specific route into PPR after enabling incremental mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export the experimental_ppr constant set to true at the top of your layout or page file: export const experimental_ppr = true</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29lqrV" prefix="r3796" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7258366414592732056"],"question":[0,"Does wrapping a component in Suspense make it dynamic in PPR?"],"answer":[0,"No, wrapping a component in Suspense doesn't make the component itself dynamic (your API usage does). Suspense is used as a boundary that encapsulates dynamic content and enables streaming."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/api-reference/next-config-js/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"does-wrapping-a-component-in-suspense-make-it-dynamic-in-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-wrapping-a-component-in-suspense-make-it-dynamic-in-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-wrapping-a-component-in-suspense-make-it-dynamic-in-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does wrapping a component in Suspense make it dynamic in PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, wrapping a component in Suspense doesn't make the component itself dynamic (your API usage does). Suspense is used as a boundary that encapsulates dynamic content and enables streaming.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/api-reference/next-config-js/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZATheL" prefix="r3797" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7371186696670523385"],"question":[0,"What revalidation methods can be used with PPR's static shell?"],"answer":[0,"PPR static shells support time-based revalidation (using the revalidate export), on-demand revalidation (using revalidatePath or revalidateTag), and tag-based revalidation for surgical cache invalidation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-revalidation-methods-can-be-used-with-ppr-s-static-shell"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-revalidation-methods-can-be-used-with-ppr-s-static-shell" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-revalidation-methods-can-be-used-with-ppr-s-static-shell" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What revalidation methods can be used with PPR's static shell?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PPR static shells support time-based revalidation (using the revalidate export), on-demand revalidation (using revalidatePath or revalidateTag), and tag-based revalidation for surgical cache invalidation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="u1RQn" prefix="r3798" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7691506442077525830"],"question":[0,"What is prerendered in the static shell during build time with PPR?"],"answer":[0,"At build time, Next.js prerenders the static content and the fallback UI from Suspense boundaries. The dynamic content is postponed until the user requests the route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-prerendered-in-the-static-shell-during-build-time-with-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-prerendered-in-the-static-shell-during-build-time-with-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-prerendered-in-the-static-shell-during-build-time-with-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is prerendered in the static shell during build time with PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At build time, Next.js prerenders the static content and the fallback UI from Suspense boundaries. The dynamic content is postponed until the user requests the route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kAsiy" prefix="r3799" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8084638650327803176"],"question":[0,"What React version is required for PPR?"],"answer":[0,"PPR requires React 18 or newer. Next.js 15 App Router uses React 19 RC, while maintaining backward compatibility for the Pages Router with React 18."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-version-is-required-for-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-version-is-required-for-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-version-is-required-for-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React version is required for PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PPR requires React 18 or newer. Next.js 15 App Router uses React 19 RC, while maintaining backward compatibility for the Pages Router with React 18.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ljgaA" prefix="r3800" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8698248510283348311"],"question":[0,"What is the configuration value to enable incremental PPR adoption in Next.js 15?"],"answer":[0,"Set experimental.ppr to 'incremental' in next.config.ts: experimental: { ppr: 'incremental' }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-configuration-value-to-enable-incremental-ppr-adoption-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-configuration-value-to-enable-incremental-ppr-adoption-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-configuration-value-to-enable-incremental-ppr-adoption-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the configuration value to enable incremental PPR adoption in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set experimental.ppr to 'incremental' in next.config.ts: experimental: { ppr: 'incremental' }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGHnqK" prefix="r3801" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9552287372315924430"],"question":[0,"What Next.js configuration was used for PPR in Next.js 14?"],"answer":[0,"In Next.js 14, you enable PPR with ppr: true in the experimental section: experimental: { ppr: true }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/api-reference/next-config-js/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-configuration-was-used-for-ppr-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-configuration-was-used-for-ppr-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-configuration-was-used-for-ppr-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js configuration was used for PPR in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 14, you enable PPR with ppr: true in the experimental section: experimental: { ppr: true }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/api-reference/next-config-js/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="141DEf" prefix="r3802" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9622005503928331423"],"question":[0,"Can child segments override a parent's PPR configuration?"],"answer":[0,"Yes, to disable PPR for children segments, you can set experimental_ppr to false in the child segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr"]]],"topic":[0,"nextjs"],"slug":[0,"can-child-segments-override-a-parent-s-ppr-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-child-segments-override-a-parent-s-ppr-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-child-segments-override-a-parent-s-ppr-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can child segments override a parent's PPR configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, to disable PPR for children segments, you can set experimental_ppr to false in the child segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24GfkL" prefix="r3803" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11010189681948558213"],"question":[0,"Which Next.js router is required to use Partial Prerendering?"],"answer":[0,"PPR requires the App Router (/app directory). It is not available in the Pages Router and there are no plans to bring PPR support to the Pages Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr"]]],"topic":[0,"nextjs"],"slug":[0,"which-next-js-router-is-required-to-use-partial-prerendering"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-next-js-router-is-required-to-use-partial-prerendering" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-next-js-router-is-required-to-use-partial-prerendering" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Next.js router is required to use Partial Prerendering?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PPR requires the App Router (/app directory). It is not available in the Pages Router and there are no plans to bring PPR support to the Pages Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="x4qEk" prefix="r3804" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13278013308265870867"],"question":[0,"Does PPR support Incremental Static Regeneration (ISR)?"],"answer":[0,"Yes, because PPR is based on ISR, you can take advantage of the same on-demand, time-based, and tag-based revalidation for the static shell that is available to ISR."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"does-ppr-support-incremental-static-regeneration-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-ppr-support-incremental-static-regeneration-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-ppr-support-incremental-static-regeneration-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does PPR support Incremental Static Regeneration (ISR)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, because PPR is based on ISR, you can take advantage of the same on-demand, time-based, and tag-based revalidation for the static shell that is available to ISR.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2h6eSU" prefix="r3805" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13314528481436790889"],"question":[0,"Can PPR be used with static exports (output: 'export')?"],"answer":[0,"No, ISR is not supported when creating a Static Export, which means PPR with revalidation capabilities requires a Node.js runtime and cannot be used with fully static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"can-ppr-be-used-with-static-exports-output-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-ppr-be-used-with-static-exports-output-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-ppr-be-used-with-static-exports-output-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can PPR be used with static exports (output: 'export')?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, ISR is not supported when creating a Static Export, which means PPR with revalidation capabilities requires a Node.js runtime and cannot be used with fully static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LpC2P" prefix="r3806" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13363556599042866236"],"question":[0,"What are the dynamic APIs that trigger dynamic rendering in PPR?"],"answer":[0,"cookies(), headers(), connection(), draftMode(), searchParams prop, unstable_noStore(), and fetch() with cache: 'no-store' or revalidate: 0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-dynamic-apis-that-trigger-dynamic-rendering-in-ppr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-dynamic-apis-that-trigger-dynamic-rendering-in-ppr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-dynamic-apis-that-trigger-dynamic-rendering-in-ppr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the dynamic APIs that trigger dynamic rendering in PPR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cookies(), headers(), connection(), draftMode(), searchParams prop, unstable_noStore(), and fetch() with cache: 'no-store' or revalidate: 0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Mr5zA" prefix="r3807" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13840891679227720846"],"question":[0,"Does experimental_ppr apply to child segments?"],"answer":[0,"Yes, experimental_ppr will apply to all children of the route segment, including nested layouts and pages. You don't have to add it to every file, only the top segment of a route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr"]]],"topic":[0,"nextjs"],"slug":[0,"does-experimental-ppr-apply-to-child-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-experimental-ppr-apply-to-child-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-experimental-ppr-apply-to-child-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does experimental_ppr apply to child segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, experimental_ppr will apply to all children of the route segment, including nested layouts and pages. You don't have to add it to every file, only the top segment of a route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yfyph" prefix="r3808" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13946412201215915561"],"question":[0,"What is the default value for experimental_ppr if not specified in a route?"],"answer":[0,"Routes that don't have experimental_ppr will default to false and will not be prerendered using PPR."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-experimental-ppr-if-not-specified-in-a-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-experimental-ppr-if-not-specified-in-a-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-experimental-ppr-if-not-specified-in-a-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for experimental_ppr if not specified in a route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Routes that don't have experimental_ppr will default to false and will not be prerendered using PPR.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/ppr" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kA4vW" prefix="r3809" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14295672692496227696"],"question":[0,"Where should Suspense boundaries be placed for optimal PPR performance?"],"answer":[0,"Place Suspense boundaries as close as possible to the components that need them to maximize the amount of content in the static shell, since everything outside the boundary can still prerender normally."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-suspense-boundaries-be-placed-for-optimal-ppr-performance"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-suspense-boundaries-be-placed-for-optimal-ppr-performance" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-suspense-boundaries-be-placed-for-optimal-ppr-performance" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should Suspense boundaries be placed for optimal PPR performance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place Suspense boundaries as close as possible to the components that need them to maximize the amount of content in the static shell, since everything outside the boundary can still prerender normally.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="project-structure-metadata-assets" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Project Structure > Metadata & Assets</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1ClN1J" prefix="r3810" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"623575660326109524"],"question":[0,"What happens if twitter-image is not provided in Next.js?"],"answer":[0,"If twitter-image is not provided, Next.js will automatically re-use the opengraph-image for Twitter cards."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.franciscomoretti.com/blog/setting-up-static-og-image-nextjs-app-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-twitter-image-is-not-provided-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-twitter-image-is-not-provided-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-twitter-image-is-not-provided-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if twitter-image is not provided in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If twitter-image is not provided, Next.js will automatically re-use the opengraph-image for Twitter cards.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.franciscomoretti.com/blog/setting-up-static-og-image-nextjs-app-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>franciscomoretti.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z101ieE" prefix="r3811" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"642538991712948544"],"question":[0,"How do you create multiple icon files in Next.js?"],"answer":[0,"Add a number suffix to the file name, such as icon1.png, icon2.png, etc. Numbered files will sort lexically (alphabetically), so icon10.png comes before icon2.png."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-multiple-icon-files-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-multiple-icon-files-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-multiple-icon-files-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create multiple icon files in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add a number suffix to the file name, such as icon1.png, icon2.png, etc. Numbered files will sort lexically (alphabetically), so icon10.png comes before icon2.png.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DNsBT" prefix="r3812" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"997394634267554713"],"question":[0,"How do you provide alt text for static opengraph-image files?"],"answer":[0,"Create an opengraph-image.alt.txt file in the same route segment as the opengraph-image file. The .txt file should contain the alt text string."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-provide-alt-text-for-static-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-provide-alt-text-for-static-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-provide-alt-text-for-static-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you provide alt text for static opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create an opengraph-image.alt.txt file in the same route segment as the opengraph-image file. The .txt file should contain the alt text string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xmQ6k" prefix="r3813" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1766804147373269418"],"question":[0,"How do you generate multiple sitemaps in Next.js?"],"answer":[0,"Use the generateSitemaps function that returns an array of objects with id properties. Generated sitemaps will be available at /.../sitemap/[id].xml, and your sitemap function receives the id as a parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-sitemaps"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-generate-multiple-sitemaps-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-generate-multiple-sitemaps-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-generate-multiple-sitemaps-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you generate multiple sitemaps in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the generateSitemaps function that returns an array of objects with id properties. Generated sitemaps will be available at /.../sitemap/[id].xml, and your sitemap function receives the id as a parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-sitemaps" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2uvj39" prefix="r3814" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2168405208841694196"],"question":[0,"Can userAgent in robots.txt accept multiple values?"],"answer":[0,"Yes, userAgent can be either a single string or an array of strings (string | string[])."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"can-useragent-in-robots-txt-accept-multiple-values"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-useragent-in-robots-txt-accept-multiple-values" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-useragent-in-robots-txt-accept-multiple-values" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can userAgent in robots.txt accept multiple values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, userAgent can be either a single string or an array of strings (string | string[]).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ki5Q" prefix="r3815" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2393414905285149250"],"question":[0,"What is the maximum file size for opengraph-image files?"],"answer":[0,"opengraph-image files must not exceed 8MB. If the file size exceeds this limit, the build will fail."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-file-size-for-opengraph-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-file-size-for-opengraph-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-file-size-for-opengraph-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum file size for opengraph-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>opengraph-image files must not exceed 8MB. If the file size exceeds this limit, the build will fail.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2sXkxV" prefix="r3816" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4471735384844096798"],"question":[0,"Where must favicon.ico be located in the Next.js App Router?"],"answer":[0,"favicon.ico can only be located in the root /app directory (or /src/app if using src structure). It cannot be placed in subdirectories. If you need more granular control in subdirectories, use icon files instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-favicon-ico-be-located-in-the-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-favicon-ico-be-located-in-the-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-favicon-ico-be-located-in-the-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must favicon.ico be located in the Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>favicon.ico can only be located in the root /app directory (or /src/app if using src structure). It cannot be placed in subdirectories. If you need more granular control in subdirectories, use icon files instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8RtAb" prefix="r3817" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4621031668798415246"],"question":[0,"What is the purpose of generateImageMetadata function?"],"answer":[0,"generateImageMetadata is used to generate multiple versions of one image or return multiple images for one route segment. It returns an array of objects with id, alt, size, and contentType properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-generateimagemetadata-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-generateimagemetadata-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-generateimagemetadata-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of generateImageMetadata function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateImageMetadata is used to generate multiple versions of one image or return multiple images for one route segment. It returns an array of objects with id, alt, size, and contentType properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="netnI" prefix="r3818" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4966786434425312451"],"question":[0,"What properties must each object in generateImageMetadata return array contain?"],"answer":[0,"Each object must include an id property (string or number). The alt, size, and contentType properties are optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-must-each-object-in-generateimagemetadata-return-array-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-must-each-object-in-generateimagemetadata-return-array-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-must-each-object-in-generateimagemetadata-return-array-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties must each object in generateImageMetadata return array contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each object must include an id property (string or number). The alt, size, and contentType properties are optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKV1qe" prefix="r3819" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5219168997227857667"],"question":[0,"Where must manifest files be located?"],"answer":[0,"Manifest files must be placed in the root of the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-manifest-files-be-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-manifest-files-be-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-manifest-files-be-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must manifest files be located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Manifest files must be placed in the root of the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="p9UFo" prefix="r3820" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5746002400210175023"],"question":[0,"Does Next.js support favicon files in the public folder?"],"answer":[0,"Yes, favicon.ico can be placed in either the /app directory or the /public folder. Next.js will auto-generate the necessary metadata for files in both locations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/static-assets"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-support-favicon-files-in-the-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-support-favicon-files-in-the-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-support-favicon-files-in-the-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js support favicon files in the public folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, favicon.ico can be placed in either the /app directory or the /public folder. Next.js will auto-generate the necessary metadata for files in both locations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oR8lN" prefix="r3821" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6135555421840923533"],"question":[0,"What is the difference between manifest.json and manifest.webmanifest?"],"answer":[0,"Both contain identical JSON content and work the same way in Next.js. The W3C recommends manifest.webmanifest, but manifest.json is more commonly used. Only the file extension differs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-manifest-json-and-manifest-webmanifest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-manifest-json-and-manifest-webmanifest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-manifest-json-and-manifest-webmanifest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between manifest.json and manifest.webmanifest?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both contain identical JSON content and work the same way in Next.js. The W3C recommends manifest.webmanifest, but manifest.json is more commonly used. Only the file extension differs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2n7Q0o" prefix="r3822" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6516940207632709326"],"question":[0,"What attribute is added to icon tags when the file is SVG format?"],"answer":[0,"The attribute sizes=\"any\" is added to icon link tags when the extension is .svg or when the image size cannot be determined."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-attribute-is-added-to-icon-tags-when-the-file-is-svg-format"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-attribute-is-added-to-icon-tags-when-the-file-is-svg-format" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-attribute-is-added-to-icon-tags-when-the-file-is-svg-format" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What attribute is added to icon tags when the file is SVG format?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The attribute sizes="any" is added to icon link tags when the extension is .svg or when the image size cannot be determined.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2b5sgU" prefix="r3823" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7496721697536570245"],"question":[0,"What file formats are supported for icon metadata files?"],"answer":[0,"icon files support: .ico, .jpg, .jpeg, .png, and .svg formats."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-icon-metadata-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-icon-metadata-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-icon-metadata-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for icon metadata files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>icon files support: .ico, .jpg, .jpeg, .png, and .svg formats.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Lfmly" prefix="r3824" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7634567799282735576"],"question":[0,"What file extensions can be used for dynamically generated metadata files?"],"answer":[0,"Dynamic metadata files can use .js, .ts, or .tsx extensions (e.g., icon.tsx, opengraph-image.js, sitemap.ts)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-can-be-used-for-dynamically-generated-metadata-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-can-be-used-for-dynamically-generated-metadata-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-can-be-used-for-dynamically-generated-metadata-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions can be used for dynamically generated metadata files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic metadata files can use .js, .ts, or .tsx extensions (e.g., icon.tsx, opengraph-image.js, sitemap.ts).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKFNOG" prefix="r3825" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7690838505135556510"],"question":[0,"Can icon and apple-icon files be placed in subdirectories?"],"answer":[0,"Yes, icon and apple-icon files can be placed in any directory within /app/**/*. Only favicon.ico is restricted to the root /app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"can-icon-and-apple-icon-files-be-placed-in-subdirectories"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-icon-and-apple-icon-files-be-placed-in-subdirectories" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-icon-and-apple-icon-files-be-placed-in-subdirectories" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can icon and apple-icon files be placed in subdirectories?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, icon and apple-icon files can be placed in any directory within /app/**/*. Only favicon.ico is restricted to the root /app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oV75V" prefix="r3826" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9442092729104448619"],"question":[0,"Where must robots.ts or robots.js be located?"],"answer":[0,"The robots.ts or robots.js file must be placed in the root of the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-robots-ts-or-robots-js-be-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-robots-ts-or-robots-js-be-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-robots-ts-or-robots-js-be-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must robots.ts or robots.js be located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The robots.ts or robots.js file must be placed in the root of the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yFSCX" prefix="r3827" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10294334129143380676"],"question":[0,"What is Google's limit for URLs per sitemap file?"],"answer":[0,"Google's limit is 50,000 URLs per sitemap. For larger sites, use the generateSitemaps function to split into multiple files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-google-s-limit-for-urls-per-sitemap-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-google-s-limit-for-urls-per-sitemap-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-google-s-limit-for-urls-per-sitemap-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is Google's limit for URLs per sitemap file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Google's limit is 50,000 URLs per sitemap. For larger sites, use the generateSitemaps function to split into multiple files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Fb60u" prefix="r3828" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10624824140532496568"],"question":[0,"What is the maximum file size for twitter-image files?"],"answer":[0,"twitter-image files must not exceed 5MB. If the file size exceeds this limit, the build will fail."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-file-size-for-twitter-image-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-file-size-for-twitter-image-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-file-size-for-twitter-image-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum file size for twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>twitter-image files must not exceed 5MB. If the file size exceeds this limit, the build will fail.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oHsWG" prefix="r3829" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10801227870820370113"],"question":[0,"What are the recommended dimensions for Open Graph images?"],"answer":[0,"The recommended dimensions are 1200x630 pixels (aspect ratio 1.91:1). This size works well across multiple platforms without being cropped."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-recommended-dimensions-for-open-graph-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-recommended-dimensions-for-open-graph-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-recommended-dimensions-for-open-graph-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the recommended dimensions for Open Graph images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended dimensions are 1200x630 pixels (aspect ratio 1.91:1). This size works well across multiple platforms without being cropped.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hKv1q" prefix="r3830" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10954205832091297114"],"question":[0,"What file formats are supported for apple-icon metadata files?"],"answer":[0,"apple-icon files support only: .jpg, .jpeg, and .png formats. SVG is NOT supported for apple-icon."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-apple-icon-metadata-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-apple-icon-metadata-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-apple-icon-metadata-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for apple-icon metadata files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>apple-icon files support only: .jpg, .jpeg, and .png formats. SVG is NOT supported for apple-icon.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1V2hIE" prefix="r3831" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11343991393497526494"],"question":[0,"Are metadata files like sitemap.ts and opengraph-image.tsx cached by default?"],"answer":[0,"Yes, special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx are cached by default unless they use Dynamic APIs or dynamic config options."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-metadata-files-like-sitemap-ts-and-opengraph-image-tsx-cached-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-metadata-files-like-sitemap-ts-and-opengraph-image-tsx-cached-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-metadata-files-like-sitemap-ts-and-opengraph-image-tsx-cached-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are metadata files like sitemap.ts and opengraph-image.tsx cached by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx are cached by default unless they use Dynamic APIs or dynamic config options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jB0R7" prefix="r3832" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11837100825632999291"],"question":[0,"What file formats are supported for opengraph-image and twitter-image?"],"answer":[0,"Both opengraph-image and twitter-image support: .jpg, .jpeg, .png, and .gif formats."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-opengraph-image-and-twitter-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-opengraph-image-and-twitter-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-opengraph-image-and-twitter-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for opengraph-image and twitter-image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both opengraph-image and twitter-image support: .jpg, .jpeg, .png, and .gif formats.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8ysGo" prefix="r3833" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11861881620947315601"],"question":[0,"What size configuration is recommended for apple-icon files?"],"answer":[0,"The recommended size for apple-icon is 180x180 pixels to ensure optimal display on Apple devices with high-resolution displays."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-size-configuration-is-recommended-for-apple-icon-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-size-configuration-is-recommended-for-apple-icon-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-size-configuration-is-recommended-for-apple-icon-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What size configuration is recommended for apple-icon files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended size for apple-icon is 180x180 pixels to ensure optimal display on Apple devices with high-resolution displays.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZcpLd6" prefix="r3834" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12579106907918214151"],"question":[0,"How does Next.js serve metadata files in production?"],"answer":[0,"Next.js automatically serves metadata files with hashes in the filename in production for caching, and updates the relevant head elements with the correct metadata such as the asset's URL, file type, and image size."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-serve-metadata-files-in-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-serve-metadata-files-in-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-serve-metadata-files-in-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js serve metadata files in production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically serves metadata files with hashes in the filename in production for caching, and updates the relevant head elements with the correct metadata such as the asset's URL, file type, and image size.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1fBqzf" prefix="r3835" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12664124217148912685"],"question":[0,"What file format is supported for favicon?"],"answer":[0,"favicon supports only the .ico format."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-format-is-supported-for-favicon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-format-is-supported-for-favicon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-format-is-supported-for-favicon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file format is supported for favicon?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>favicon supports only the .ico format.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rqoCa" prefix="r3836" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12826351511850051250"],"question":[0,"What properties are available in the sitemap return type?"],"answer":[0,"Properties are: url (required string), lastModified (optional string or Date), changeFrequency (optional enum), priority (optional number), alternates (optional object with languages), images (optional array), and videos (optional array)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-the-sitemap-return-type"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-the-sitemap-return-type" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-the-sitemap-return-type" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in the sitemap return type?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Properties are: url (required string), lastModified (optional string or Date), changeFrequency (optional enum), priority (optional number), alternates (optional object with languages), images (optional array), and videos (optional array).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="X5b7Q" prefix="r3837" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14051431876619750453"],"question":[0,"What is the valid range for the priority property in sitemap files?"],"answer":[0,"Priority values must be between 0.0 and 1.0 (e.g., 0.5, 0.8, 1.0). If not specified, it defaults to 0.5."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-valid-range-for-the-priority-property-in-sitemap-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-valid-range-for-the-priority-property-in-sitemap-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-valid-range-for-the-priority-property-in-sitemap-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the valid range for the priority property in sitemap files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Priority values must be between 0.0 and 1.0 (e.g., 0.5, 0.8, 1.0). If not specified, it defaults to 0.5.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LxQVF" prefix="r3838" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14845647458662297255"],"question":[0,"What is the crawlDelay property in robots.txt?"],"answer":[0,"crawlDelay is an optional numeric property in the rules object that specifies the delay value for crawler access."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-crawldelay-property-in-robots-txt"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-crawldelay-property-in-robots-txt" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-crawldelay-property-in-robots-txt" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the crawlDelay property in robots.txt?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>crawlDelay is an optional numeric property in the rules object that specifies the delay value for crawler access.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-social-media-integration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > Social Media Integration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="2eIDYM" prefix="r3839" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"666843349780600279"],"question":[0,"Which takes precedence: file-based metadata (opengraph-image.tsx) or config-based metadata (metadata export)?"],"answer":[0,"File-based metadata has higher priority and will override any config-based metadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"which-takes-precedence-file-based-metadata-opengraph-image-tsx-or-config-based-m"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-takes-precedence-file-based-metadata-opengraph-image-tsx-or-config-based-m" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-takes-precedence-file-based-metadata-opengraph-image-tsx-or-config-based-m" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which takes precedence: file-based metadata (opengraph-image.tsx) or config-based metadata (metadata export)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>File-based metadata has higher priority and will override any config-based metadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pGSgF" prefix="r3840" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"811275106263013233"],"question":[0,"What is the maximum bundle size for ImageResponse including JSX, CSS, fonts, images, and assets?"],"answer":[0,"500KB"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-bundle-size-for-imageresponse-including-jsx-css-fonts-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-bundle-size-for-imageresponse-including-jsx-css-fonts-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-bundle-size-for-imageresponse-including-jsx-css-fonts-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum bundle size for ImageResponse including JSX, CSS, fonts, images, and assets?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>500KB</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zok9ll" prefix="r3841" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1959309617985673989"],"question":[0,"What is the required field in each object returned by generateImageMetadata?"],"answer":[0,"id (string or number). Each metadata object must include an id value which will be passed to the image generation function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-field-in-each-object-returned-by-generateimagemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-field-in-each-object-returned-by-generateimagemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-field-in-each-object-returned-by-generateimagemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required field in each object returned by generateImageMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>id (string or number). Each metadata object must include an id value which will be passed to the image generation function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25KtJu" prefix="r3842" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2133169564603470606"],"question":[0,"What happens when opengraph-image files exist in both parent and child route segments?"],"answer":[0,"The more specific image (in the child segment) will take precedence over any OG images above it in the folder structure."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-opengraph-image-files-exist-in-both-parent-and-child-route-seg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-opengraph-image-files-exist-in-both-parent-and-child-route-seg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-opengraph-image-files-exist-in-both-parent-and-child-route-seg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when opengraph-image files exist in both parent and child route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The more specific image (in the child segment) will take precedence over any OG images above it in the folder structure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oqYFL" prefix="r3843" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2385146616847058698"],"question":[0,"How do you add alt text to a static twitter-image or opengraph-image file?"],"answer":[0,"Create a companion .alt.txt file in the same directory (e.g., twitter-image.alt.txt or opengraph-image.alt.txt). The content of this file will be used as the alt text."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-add-alt-text-to-a-static-twitter-image-or-opengraph-image-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-add-alt-text-to-a-static-twitter-image-or-opengraph-image-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-add-alt-text-to-a-static-twitter-image-or-opengraph-image-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you add alt text to a static twitter-image or opengraph-image file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a companion .alt.txt file in the same directory (e.g., twitter-image.alt.txt or opengraph-image.alt.txt). The content of this file will be used as the alt text.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1z4uI1" prefix="r3844" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2626068231032574564"],"question":[0,"What runtime does ImageResponse use in Next.js?"],"answer":[0,"ImageResponse uses the Edge Runtime. You can configure opengraph-image files to use the edge runtime by exporting 'export const runtime = \"edge\"'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-does-imageresponse-use-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-does-imageresponse-use-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-does-imageresponse-use-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime does ImageResponse use in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ImageResponse uses the Edge Runtime. You can configure opengraph-image files to use the edge runtime by exporting 'export const runtime = "edge"'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z113Yt3" prefix="r3845" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2780023214241789407"],"question":[0,"How does Next.js merge metadata from parent and child route segments?"],"answer":[0,"Metadata objects are shallowly merged together, with duplicate keys replaced based on their ordering (child overrides parent). However, nested fields like openGraph are completely replaced, not deep merged."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-merge-metadata-from-parent-and-child-route-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-merge-metadata-from-parent-and-child-route-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-merge-metadata-from-parent-and-child-route-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js merge metadata from parent and child route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Metadata objects are shallowly merged together, with duplicate keys replaced based on their ordering (child overrides parent). However, nested fields like openGraph are completely replaced, not deep merged.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="294qKB" prefix="r3846" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3302910619376772091"],"question":[0,"What emoji styles are available for the ImageResponse emoji option in Next.js?"],"answer":[0,"twemoji, blobmoji, noto, openmoji. The default is 'twemoji'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-emoji-styles-are-available-for-the-imageresponse-emoji-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-emoji-styles-are-available-for-the-imageresponse-emoji-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-emoji-styles-are-available-for-the-imageresponse-emoji-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What emoji styles are available for the ImageResponse emoji option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>twemoji, blobmoji, noto, openmoji. The default is 'twemoji'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="SVpsD" prefix="r3847" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3787640283287114066"],"question":[0,"How does Next.js handle metadata streaming for dynamically rendered pages with bots like Twitter and Slack?"],"answer":[0,"For dynamically rendered pages, Next.js separates metadata injection to allow visual content to stream first. However, this feature is disabled for bots (Twitter, Slack, Bing) that require metadata in the <head> tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-metadata-streaming-for-dynamically-rendered-pages-with-b"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-metadata-streaming-for-dynamically-rendered-pages-with-b" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-metadata-streaming-for-dynamically-rendered-pages-with-b" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle metadata streaming for dynamically rendered pages with bots like Twitter and Slack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For dynamically rendered pages, Next.js separates metadata injection to allow visual content to stream first. However, this feature is disabled for bots (Twitter, Slack, Bing) that require metadata in the <head> tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2oahfM" prefix="r3848" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4095374199877854364"],"question":[0,"Can you set custom HTTP headers like Cache-Control for ImageResponse?"],"answer":[0,"Yes. The ImageResponse constructor accepts a headers parameter (Record<string, string>) in its options object, allowing you to set custom headers including Cache-Control."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-set-custom-http-headers-like-cache-control-for-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-set-custom-http-headers-like-cache-control-for-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-set-custom-http-headers-like-cache-control-for-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you set custom HTTP headers like Cache-Control for ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The ImageResponse constructor accepts a headers parameter (Record<string, string>) in its options object, allowing you to set custom headers including Cache-Control.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGJGJ" prefix="r3849" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4100786583856941772"],"question":[0,"What structure is required for openGraph audio array items?"],"answer":[0,"Each audio object requires only the url property (must be absolute URL)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-structure-is-required-for-opengraph-audio-array-items"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-structure-is-required-for-opengraph-audio-array-items" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-structure-is-required-for-opengraph-audio-array-items" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What structure is required for openGraph audio array items?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each audio object requires only the url property (must be absolute URL).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZLrmVq" prefix="r3850" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4608786711064125740"],"question":[0,"What is the maximum file size for a twitter-image in Next.js?"],"answer":[0,"5MB. If the twitter-image file size exceeds 5MB, the build will fail."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-file-size-for-a-twitter-image-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-file-size-for-a-twitter-image-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-file-size-for-a-twitter-image-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum file size for a twitter-image in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5MB. If the twitter-image file size exceeds 5MB, the build will fail.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2464tE" prefix="r3851" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5983925605572043368"],"question":[0,"What is the maximum file size for an opengraph-image in Next.js?"],"answer":[0,"8MB. If the opengraph-image file size exceeds 8MB, the build will fail."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-file-size-for-an-opengraph-image-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-file-size-for-an-opengraph-image-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-file-size-for-an-opengraph-image-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum file size for an opengraph-image in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>8MB. If the opengraph-image file size exceeds 8MB, the build will fail.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NkKAb" prefix="r3852" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6195163855745941459"],"question":[0,"Are opengraph-image and twitter-image files statically optimized by default?"],"answer":[0,"Yes. By default, generated images are statically optimized (generated at build time and cached) unless they use Dynamic APIs or uncached data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"are-opengraph-image-and-twitter-image-files-statically-optimized-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-opengraph-image-and-twitter-image-files-statically-optimized-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-opengraph-image-and-twitter-image-files-statically-optimized-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are opengraph-image and twitter-image files statically optimized by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. By default, generated images are statically optimized (generated at build time and cached) unless they use Dynamic APIs or uncached data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="JE75O" prefix="r3853" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6508445679226429786"],"question":[0,"What three optional configuration exports are available for opengraph-image and twitter-image files?"],"answer":[0,"alt (string for alt text), size (object with width and height in pixels), and contentType (string for MIME type like 'image/png')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-optional-configuration-exports-are-available-for-opengraph-image-and-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-optional-configuration-exports-are-available-for-opengraph-image-and-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-optional-configuration-exports-are-available-for-opengraph-image-and-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three optional configuration exports are available for opengraph-image and twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>alt (string for alt text), size (object with width and height in pixels), and contentType (string for MIME type like 'image/png')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1apVnk" prefix="r3854" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7424340062009749445"],"question":[0,"What file extensions can be used for dynamically generated opengraph-image and twitter-image files?"],"answer":[0,".js, .ts, .tsx"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-can-be-used-for-dynamically-generated-opengraph-image-and-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-can-be-used-for-dynamically-generated-opengraph-image-and-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-can-be-used-for-dynamically-generated-opengraph-image-and-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions can be used for dynamically generated opengraph-image and twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.js, .ts, .tsx</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="154IsY" prefix="r3855" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7568410740075885109"],"question":[0,"What additional openGraph fields become available when type is set to 'article'?"],"answer":[0,"publishedTime (string) and authors (array of strings)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-additional-opengraph-fields-become-available-when-type-is-set-to-article"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-additional-opengraph-fields-become-available-when-type-is-set-to-article" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-additional-opengraph-fields-become-available-when-type-is-set-to-article" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What additional openGraph fields become available when type is set to 'article'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>publishedTime (string) and authors (array of strings)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GCFi0" prefix="r3856" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7595748318651741676"],"question":[0,"What properties are available in the Twitter metadata app card type for platform-specific app configuration?"],"answer":[0,"The app object can include: name (string), id (object with iphone, ipad, googleplay keys), and url (object with iphone, ipad keys for platform-specific URLs)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-the-twitter-metadata-app-card-type-for-platform"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-the-twitter-metadata-app-card-type-for-platform" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-the-twitter-metadata-app-card-type-for-platform" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in the Twitter metadata app card type for platform-specific app configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The app object can include: name (string), id (object with iphone, ipad, googleplay keys), and url (object with iphone, ipad keys for platform-specific URLs).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBx5BF" prefix="r3857" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7938417099230467896"],"question":[0,"What structure is required for openGraph videos array items?"],"answer":[0,"Each video object can include: url (required, must be absolute URL), width (number), and height (number)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-structure-is-required-for-opengraph-videos-array-items"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-structure-is-required-for-opengraph-videos-array-items" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-structure-is-required-for-opengraph-videos-array-items" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What structure is required for openGraph videos array items?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each video object can include: url (required, must be absolute URL), width (number), and height (number).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7pFeF" prefix="r3858" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9246442992075304874"],"question":[0,"What parameters does the opengraph-image or twitter-image default export function receive when using generateImageMetadata?"],"answer":[0,"It receives params (a promise resolving to dynamic route parameters object) and id (a promise resolving to the id value from the generateImageMetadata array)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-opengraph-image-or-twitter-image-default-export-functio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-opengraph-image-or-twitter-image-default-export-functio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-opengraph-image-or-twitter-image-default-export-functio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the opengraph-image or twitter-image default export function receive when using generateImageMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It receives params (a promise resolving to dynamic route parameters object) and id (a promise resolving to the id value from the generateImageMetadata array).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-image-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2alhNx" prefix="r3859" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9485035568693334083"],"question":[0,"What Twitter card types are supported in Next.js metadata?"],"answer":[0,"summary_large_image and app"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-twitter-card-types-are-supported-in-next-js-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-twitter-card-types-are-supported-in-next-js-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-twitter-card-types-are-supported-in-next-js-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Twitter card types are supported in Next.js metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>summary_large_image and app</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2lYETN" prefix="r3860" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9935843191398133230"],"question":[0,"What status code and statusText options are available for ImageResponse?"],"answer":[0,"status (number, defaults to 200) and statusText (string) can be set in the ImageResponse options object to control the HTTP response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-status-code-and-statustext-options-are-available-for-imageresponse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-status-code-and-statustext-options-are-available-for-imageresponse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-status-code-and-statustext-options-are-available-for-imageresponse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What status code and statusText options are available for ImageResponse?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>status (number, defaults to 200) and statusText (string) can be set in the ImageResponse options object to control the HTTP response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z22e9jI" prefix="r3861" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10179150315942614613"],"question":[0,"Do generateMetadata and static metadata exports work in Client Components?"],"answer":[0,"No. Metadata and generateMetadata only work in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"do-generatemetadata-and-static-metadata-exports-work-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-generatemetadata-and-static-metadata-exports-work-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-generatemetadata-and-static-metadata-exports-work-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do generateMetadata and static metadata exports work in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Metadata and generateMetadata only work in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27f16D" prefix="r3862" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11613702134485643992"],"question":[0,"What image file formats are supported for static opengraph-image and twitter-image files?"],"answer":[0,".jpg, .jpeg, .png, .gif"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"what-image-file-formats-are-supported-for-static-opengraph-image-and-twitter-ima"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-image-file-formats-are-supported-for-static-opengraph-image-and-twitter-ima" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-image-file-formats-are-supported-for-static-opengraph-image-and-twitter-ima" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What image file formats are supported for static opengraph-image and twitter-image files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.jpg, .jpeg, .png, .gif</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fAXhl" prefix="r3863" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11816280218931445883"],"question":[0,"What are the default dimensions for ImageResponse in Next.js?"],"answer":[0,"Width: 1200px, Height: 630px"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/image-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-dimensions-for-imageresponse-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-dimensions-for-imageresponse-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-dimensions-for-imageresponse-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default dimensions for ImageResponse in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Width: 1200px, Height: 630px</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/image-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="SFhWS" prefix="r3864" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13617942870124325370"],"question":[0,"What structure is required for openGraph images array items?"],"answer":[0,"Each image object can include: url (required, must be absolute URL), width (number), height (number), and alt (string, optional)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-structure-is-required-for-opengraph-images-array-items"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-structure-is-required-for-opengraph-images-array-items" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-structure-is-required-for-opengraph-images-array-items" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What structure is required for openGraph images array items?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each image object can include: url (required, must be absolute URL), width (number), height (number), and alt (string, optional).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dQklq" prefix="r3865" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14350640473887598400"],"question":[0,"What data type should Twitter siteId and creatorId be in Next.js metadata?"],"answer":[0,"String. Even though these are numeric Twitter user IDs, they should be passed as strings (e.g., '1467726470533754880')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-data-type-should-twitter-siteid-and-creatorid-be-in-next-js-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-data-type-should-twitter-siteid-and-creatorid-be-in-next-js-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-data-type-should-twitter-siteid-and-creatorid-be-in-next-js-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What data type should Twitter siteId and creatorId be in Next.js metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>String. Even though these are numeric Twitter user IDs, they should be passed as strings (e.g., '1467726470533754880').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuJlqk" prefix="r3866" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14881595473024589338"],"question":[0,"When did the params prop for opengraph-image functions become a promise?"],"answer":[0,"v16.0.0. Before this version, params was a direct object, but since v16.0.0 it is a promise that resolves to an object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-the-params-prop-for-opengraph-image-functions-become-a-promise"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-the-params-prop-for-opengraph-image-functions-become-a-promise" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-the-params-prop-for-opengraph-image-functions-become-a-promise" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did the params prop for opengraph-image functions become a promise?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v16.0.0. Before this version, params was a direct object, but since v16.0.0 it is a promise that resolves to an object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2e7VvS" prefix="r3867" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15122343666266574927"],"question":[0,"What is the default content type for ImageResponse in Next.js?"],"answer":[0,"image/png"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-content-type-for-imageresponse-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-content-type-for-imageresponse-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-content-type-for-imageresponse-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default content type for ImageResponse in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>image/png</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="unknown" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">unknown</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="JQcbs" prefix="r3868" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"813071514730695428"],"question":[0,"What are Next.js 15 key features in 2025?"],"answer":[0,"Next.js 15 (stable October 2024) key features: (1) React 19 support with Server Components and Server Actions stable, (2) Turbopack stable in dev mode (76.7% faster startup, 96.3% faster Fast Refresh), (3) async Request APIs - cookies(), headers(), params now async for better performance, (4) fetch() no longer cached by default (explicit caching control), (5) Enhanced hydration error messages with source code, (6) instrumentation.js API stable for observability, (7) next/form component for client-side navigation, and (8) TypeScript support for next.config.ts. Production builds with Turbopack remain in beta."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"],[0,"https://medium.com/@abdulsamad18090/next-js-14-vs-next-js-15-rc-a-detailed-comparison-d0160e425dc9"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-next-js-15-key-features-in-2025"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-next-js-15-key-features-in-2025" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-next-js-15-key-features-in-2025" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are Next.js 15 key features in 2025?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15 (stable October 2024) key features: (1) React 19 support with Server Components and Server Actions stable, (2) Turbopack stable in dev mode (76.7% faster startup, 96.3% faster Fast Refresh), (3) async Request APIs - cookies(), headers(), params now async for better performance, (4) fetch() no longer cached by default (explicit caching control), (5) Enhanced hydration error messages with source code, (6) instrumentation.js API stable for observability, (7) next/form component for client-side navigation, and (8) TypeScript support for next.config.ts. Production builds with Turbopack remain in beta.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://medium.com/@abdulsamad18090/next-js-14-vs-next-js-15-rc-a-detailed-comparison-d0160e425dc9" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LzJNU" prefix="r3869" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"839309896853400231"],"question":[0,"What is Incremental Static Regeneration (ISR) in Next.js?"],"answer":[0,"ISR updates static pages after build without rebuilding entire site. Revalidate option: revalidate: 60 (seconds). First request uses cache, triggers regeneration in background. Subsequent requests get new page. On-demand: revalidatePath(), revalidateTag(). Benefits: static performance + dynamic data, scalable, fresh content. Use for: blogs, e-commerce, frequently-updated content. Best of static and dynamic. Unique Next.js feature."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-incremental-static-regeneration-isr-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-incremental-static-regeneration-isr-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-incremental-static-regeneration-isr-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is Incremental Static Regeneration (ISR) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ISR updates static pages after build without rebuilding entire site. Revalidate option: revalidate: 60 (seconds). First request uses cache, triggers regeneration in background. Subsequent requests get new page. On-demand: revalidatePath(), revalidateTag(). Benefits: static performance + dynamic data, scalable, fresh content. Use for: blogs, e-commerce, frequently-updated content. Best of static and dynamic. Unique Next.js feature.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xRLIJ" prefix="r3870" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1054317281030515870"],"question":[0,"When should I use Next.js instead of Create React App?"],"answer":[0,"Use Next.js over Create React App when you need: (1) SEO optimization with server-side rendering, (2) production-ready performance with automatic code splitting and image optimization, (3) file-based routing instead of manual React Router setup, (4) API routes for backend logic, or (5) static site generation for content-heavy sites. Use Create React App for simple single-page applications without SEO requirements or when you need complete control over architecture. In 2025, Next.js is recommended for new projects as it provides React capabilities plus production optimizations with zero configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs"],[0,"https://dev.to/sathick0227/nextjs-vs-react-which-one-should-you-choose-in-2025-1a0d"]]],"topic":[0,"nextjs"],"slug":[0,"when-should-i-use-next-js-instead-of-create-react-app"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-should-i-use-next-js-instead-of-create-react-app" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-should-i-use-next-js-instead-of-create-react-app" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When should I use Next.js instead of Create React App?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use Next.js over Create React App when you need: (1) SEO optimization with server-side rendering, (2) production-ready performance with automatic code splitting and image optimization, (3) file-based routing instead of manual React Router setup, (4) API routes for backend logic, or (5) static site generation for content-heavy sites. Use Create React App for simple single-page applications without SEO requirements or when you need complete control over architecture. In 2025, Next.js is recommended for new projects as it provides React capabilities plus production optimizations with zero configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://dev.to/sathick0227/nextjs-vs-react-which-one-should-you-choose-in-2025-1a0d" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZvKI4b" prefix="r3871" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1342771263689372195"],"question":[0,"What are the best practices for Next.js applications?"],"answer":[0,"Best practices: use App Router for new projects, Server Components by default, proper error boundaries, loading states, implement streaming, optimize images, minimize client JavaScript, environment variables properly, TypeScript, ESLint config, proper caching strategy, security headers in middleware, monitoring and analytics. Project structure: feature-based folders. Performance: lighthouse scores. Keep dependencies updated. Follow official recommendations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-best-practices-for-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-best-practices-for-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-best-practices-for-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the best practices for Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Best practices: use App Router for new projects, Server Components by default, proper error boundaries, loading states, implement streaming, optimize images, minimize client JavaScript, environment variables properly, TypeScript, ESLint config, proper caching strategy, security headers in middleware, monitoring and analytics. Project structure: feature-based folders. Performance: lighthouse scores. Keep dependencies updated. Follow official recommendations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="avDhX" prefix="r3872" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1397393756890038319"],"question":[0,"What are React Server Components?"],"answer":[0,"React Server Components (RSC) are React components that render exclusively on the server with zero client-side JavaScript footprint. Stable in React 19 (2025), they can directly access server resources (databases, file systems, environment variables, private APIs) without API routes. RSCs cannot use browser-only features (useState, useEffect, event handlers) - they're server-only. Instead of sending HTML like SSR, RSCs send serialized React component tree to client, enabling progressive rendering and streaming. In Next.js 15 App Router, all components are Server Components by default unless marked with 'use client' directive. Benefits: 30-50% smaller client bundles, faster Time-to-Interactive, direct async/await data fetching, automatic code splitting, improved SEO. RSCs can import Client Components but not vice versa. Production-ready in Next.js 14+, Remix (with future flags), and other React 19 frameworks."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/rsc/server-components"],[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"],[0,"https://www.antstack.com/blog/everything-you-need-to-know-about-react-server-components-in-react-19/"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-react-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-react-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-react-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are React Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React Server Components (RSC) are React components that render exclusively on the server with zero client-side JavaScript footprint. Stable in React 19 (2025), they can directly access server resources (databases, file systems, environment variables, private APIs) without API routes. RSCs cannot use browser-only features (useState, useEffect, event handlers) - they're server-only. Instead of sending HTML like SSR, RSCs send serialized React component tree to client, enabling progressive rendering and streaming. In Next.js 15 App Router, all components are Server Components by default unless marked with 'use client' directive. Benefits: 30-50% smaller client bundles, faster Time-to-Interactive, direct async/await data fetching, automatic code splitting, improved SEO. RSCs can import Client Components but not vice versa. Production-ready in Next.js 14+, Remix (with future flags), and other React 19 frameworks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/rsc/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://www.antstack.com/blog/everything-you-need-to-know-about-react-server-components-in-react-19/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>antstack.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsUwN6" prefix="r3873" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2014549472655692808"],"question":[0,"What is the difference between App Router and Pages Router in Next.js?"],"answer":[0,"App Router (Next.js 13+, stable in 15): uses app/ directory, React Server Components by default, layouts, streaming, parallel routes, intercepting routes, server actions. Pages Router (legacy): uses pages/ directory, client-side React, getServerSideProps, getStaticProps. App Router benefits: better performance (30-50% smaller bundles), modern React 19 features, nested layouts, streaming SSR, component-level data fetching. Pages Router: simpler mental model, battle-tested, easier for beginners. New projects in 2025: use App Router (recommended direction). Existing projects: migrate gradually or stay on Pages Router (both fully supported). Both routers can coexist in same project during migration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app"],[0,"https://kitemetric.com/blogs/next-js-routing-in-2025-app-router-vs-pages-router"],[0,"https://medium.com/@sehouli.hamza/the-nextjs-15-app-router-vs-pages-router-explained-heres-what-you-need-to-know-for-2025-f66e5eb834ff"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-app-router-and-pages-router-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-app-router-and-pages-router-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-app-router-and-pages-router-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between App Router and Pages Router in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>App Router (Next.js 13+, stable in 15): uses app/ directory, React Server Components by default, layouts, streaming, parallel routes, intercepting routes, server actions. Pages Router (legacy): uses pages/ directory, client-side React, getServerSideProps, getStaticProps. App Router benefits: better performance (30-50% smaller bundles), modern React 19 features, nested layouts, streaming SSR, component-level data fetching. Pages Router: simpler mental model, battle-tested, easier for beginners. New projects in 2025: use App Router (recommended direction). Existing projects: migrate gradually or stay on Pages Router (both fully supported). Both routers can coexist in same project during migration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://kitemetric.com/blogs/next-js-routing-in-2025-app-router-vs-pages-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>kitemetric.com</a><a href="https://medium.com/@sehouli.hamza/the-nextjs-15-app-router-vs-pages-router-explained-heres-what-you-need-to-know-for-2025-f66e5eb834ff" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20Bb35" prefix="r3874" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2241451017628688435"],"question":[0,"What are the authentication strategies available in Next.js?"],"answer":[0,"Next.js supports multiple authentication strategies: NextAuth.js (popular, 50+ providers, sessions, JWT), custom implementation (session management, JWT tokens), third-party services (Auth0, Clerk, Lucia Auth), OAuth providers (Google, GitHub, Discord), email/password authentication, magic links, and biometric authentication. Each strategy offers different trade-offs in complexity, security, and user experience. NextAuth.js provides the most comprehensive solution with built-in providers, session management, and security features. Custom implementations offer maximum control but require more development effort."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-authentication-strategies-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-authentication-strategies-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-authentication-strategies-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the authentication strategies available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports multiple authentication strategies: NextAuth.js (popular, 50+ providers, sessions, JWT), custom implementation (session management, JWT tokens), third-party services (Auth0, Clerk, Lucia Auth), OAuth providers (Google, GitHub, Discord), email/password authentication, magic links, and biometric authentication. Each strategy offers different trade-offs in complexity, security, and user experience. NextAuth.js provides the most comprehensive solution with built-in providers, session management, and security features. Custom implementations offer maximum control but require more development effort.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1cyOV1" prefix="r3875" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3946453731533423394"],"question":[0,"How do you implement dynamic routes in Next.js?"],"answer":[0,"Dynamic segments with brackets: [slug], [id], [category]. File: app/blog/[slug]/page.js. Access via params: async function Page({ params }) { const { slug } = params }. Generate static: generateStaticParams(). Catch-all: [...segments] matches multiple. Optional catch-all: [[...segments]]. Type-safe with TypeScript. Use for: blog posts, products, user profiles. generateMetadata for dynamic SEO. Powerful routing flexibility."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-implement-dynamic-routes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-implement-dynamic-routes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-implement-dynamic-routes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you implement dynamic routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic segments with brackets: [slug], [id], [category]. File: app/blog/[slug]/page.js. Access via params: async function Page({ params }) { const { slug } = params }. Generate static: generateStaticParams(). Catch-all: [...segments] matches multiple. Optional catch-all: [[...segments]]. Type-safe with TypeScript. Use for: blog posts, products, user profiles. generateMetadata for dynamic SEO. Powerful routing flexibility.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuSei5" prefix="r3876" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4000989596278152514"],"question":[0,"What are Server Actions in Next.js?"],"answer":[0,"Server Actions enable server-side mutations. Define with 'use server' directive. Call from forms or Client Components. Form actions: <form action={serverAction}>. Benefits: no API routes needed, automatic revalidation, progressive enhancement, type-safe. Handle form submissions, data mutations, database updates. Integrated with forms, work without JavaScript. Use revalidatePath/revalidateTag after mutations. Modern, simplified mutations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions enable server-side mutations. Define with 'use server' directive. Call from forms or Client Components. Form actions: <form action={serverAction}>. Benefits: no API routes needed, automatic revalidation, progressive enhancement, type-safe. Handle form submissions, data mutations, database updates. Integrated with forms, work without JavaScript. Use revalidatePath/revalidateTag after mutations. Modern, simplified mutations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eRPz" prefix="r3877" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4167238275393289060"],"question":[0,"How do React Server Components work in Next.js?"],"answer":[0,"In Next.js 15 App Router, Server Components render on the server during request time and send serialized React component tree (not HTML) to the client. They can fetch data directly using async/await, access databases, read file system, call backend services without API routes. RSCs stream progressively to client with Suspense boundaries, showing content as it becomes ready for better perceived performance. Server Components can import Client Components (marked with 'use client') but not vice versa - Client Components must be leaves in the component tree. The framework automatically handles hydration only for Client Components, while Server Components remain server-only with zero client JavaScript. Composition: Server Component → Server Component → Client Component (allowed). Client Component → Server Component (not allowed, but can pass as children prop). This architecture eliminates API endpoints for data fetching, reduces bundle size by 30-50%, and enables direct server resource access with full type safety end-to-end."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"],[0,"https://react.dev/reference/rsc/server-components"],[0,"https://thefrontenddev.medium.com/getting-started-with-react-server-components-rsc-react-19-and-next-js-in-action-7093448ee5f0"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-react-server-components-work-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-react-server-components-work-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-react-server-components-work-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do React Server Components work in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15 App Router, Server Components render on the server during request time and send serialized React component tree (not HTML) to the client. They can fetch data directly using async/await, access databases, read file system, call backend services without API routes. RSCs stream progressively to client with Suspense boundaries, showing content as it becomes ready for better perceived performance. Server Components can import Client Components (marked with 'use client') but not vice versa - Client Components must be leaves in the component tree. The framework automatically handles hydration only for Client Components, while Server Components remain server-only with zero client JavaScript. Composition: Server Component → Server Component → Client Component (allowed). Client Component → Server Component (not allowed, but can pass as children prop). This architecture eliminates API endpoints for data fetching, reduces bundle size by 30-50%, and enables direct server resource access with full type safety end-to-end.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://react.dev/reference/rsc/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a><a href="https://thefrontenddev.medium.com/getting-started-with-react-server-components-rsc-react-19-and-next-js-in-action-7093448ee5f0" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>thefrontenddev.medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Q2D9R" prefix="r3878" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4445042219722561687"],"question":[0,"How do React Server Components work in Next.js App Router?"],"answer":[0,"In Next.js 15 App Router, Server Components render on server and send serialized React component tree (not HTML) to client. They fetch data directly using async/await, access databases/filesystems/backend services without API routes. RSCs stream progressively to client with Suspense boundaries, showing content as ready. Server Components can import Client Components (marked with 'use client') but not vice versa - Client Components must be leaves. Framework hydrates only Client Components; Server Components remain server-only with zero client JavaScript. Composition rules: Server → Server → Client (allowed), Client → Server (not allowed, but can pass as children prop). Benefits: Eliminates API endpoints, reduces bundle size 30-50%, enables direct server resource access with type safety."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"],[0,"https://react.dev/reference/rsc/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-react-server-components-work-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-react-server-components-work-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-react-server-components-work-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do React Server Components work in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15 App Router, Server Components render on server and send serialized React component tree (not HTML) to client. They fetch data directly using async/await, access databases/filesystems/backend services without API routes. RSCs stream progressively to client with Suspense boundaries, showing content as ready. Server Components can import Client Components (marked with 'use client') but not vice versa - Client Components must be leaves. Framework hydrates only Client Components; Server Components remain server-only with zero client JavaScript. Composition rules: Server → Server → Client (allowed), Client → Server (not allowed, but can pass as children prop). Benefits: Eliminates API endpoints, reduces bundle size 30-50%, enables direct server resource access with type safety.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://react.dev/reference/rsc/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28lkQt" prefix="r3879" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4835001875612208261"],"question":[0,"What are the built-in performance optimizations in Next.js?"],"answer":[0,"Next.js provides extensive built-in optimizations: automatic code splitting at component level, Image component with lazy loading and format optimization, font optimization with next/font, script optimization with next/script, automatic prefetching on hover, bundle analysis via @next/bundle-analyzer, automatic compression (gzip/brotli), HTTP/2 support, static asset optimization, minification, tree shaking, and Core Web Vitals tracking. The framework also implements intelligent caching, server-side rendering, static generation, and incremental regeneration for optimal performance. These optimizations work automatically without configuration, providing production-ready performance out of the box."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-built-in-performance-optimizations-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-built-in-performance-optimizations-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-built-in-performance-optimizations-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the built-in performance optimizations in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js provides extensive built-in optimizations: automatic code splitting at component level, Image component with lazy loading and format optimization, font optimization with next/font, script optimization with next/script, automatic prefetching on hover, bundle analysis via @next/bundle-analyzer, automatic compression (gzip/brotli), HTTP/2 support, static asset optimization, minification, tree shaking, and Core Web Vitals tracking. The framework also implements intelligent caching, server-side rendering, static generation, and incremental regeneration for optimal performance. These optimizations work automatically without configuration, providing production-ready performance out of the box.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="HbhTS" prefix="r3880" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5458027750017544308"],"question":[0,"What is the App Router file convention in Next.js?"],"answer":[0,"Special files: page.js (route), layout.js (shared UI), loading.js (loading), error.js (errors), not-found.js (404), route.js (API), template.js (re-render), default.js (parallel fallback). Colocation: components, styles in route folders. Naming: lowercase, kebab-case recommended. Private folders: _folder (excluded from routing). Route groups: (name) (organization). Understanding conventions essential for App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-app-router-file-convention-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-app-router-file-convention-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-app-router-file-convention-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the App Router file convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Special files: page.js (route), layout.js (shared UI), loading.js (loading), error.js (errors), not-found.js (404), route.js (API), template.js (re-render), default.js (parallel fallback). Colocation: components, styles in route folders. Naming: lowercase, kebab-case recommended. Private folders: _folder (excluded from routing). Route groups: (name) (organization). Understanding conventions essential for App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lIbA4" prefix="r3881" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6029211609309762737"],"question":[0,"How does file-based routing work in Next.js App Router?"],"answer":[0,"App Router uses file system for routing with special file conventions. page.tsx/page.jsx creates publicly accessible route segments. layout.tsx wraps pages with shared UI (persists across navigation). loading.tsx provides loading states (uses React Suspense). error.tsx handles errors with Error Boundaries. not-found.tsx for 404 pages. Route segments: app/page.js → /, app/blog/page.js → /blog, app/blog/[slug]/page.js → /blog/:slug. Dynamic routes: [slug] (single param), [...slug] (catch-all), [[...slug]] (optional catch-all). Route groups: (folder) for organization without affecting URL. Parallel routes: @folder for simultaneous rendering. Private folders: _folder excluded from routing. Template.tsx for re-rendering layouts. All conventions are automatic with zero configuration needed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing"],[0,"https://medium.com/@differofeveryone/mastering-next-js-routing-a-modern-guide-for-2025-138c1e65b505"],[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-file-based-routing-work-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-file-based-routing-work-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-file-based-routing-work-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does file-based routing work in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>App Router uses file system for routing with special file conventions. page.tsx/page.jsx creates publicly accessible route segments. layout.tsx wraps pages with shared UI (persists across navigation). loading.tsx provides loading states (uses React Suspense). error.tsx handles errors with Error Boundaries. not-found.tsx for 404 pages. Route segments: app/page.js → /, app/blog/page.js → /blog, app/blog/[slug]/page.js → /blog/:slug. Dynamic routes: [slug] (single param), [...slug] (catch-all), [[...slug]] (optional catch-all). Route groups: (folder) for organization without affecting URL. Parallel routes: @folder for simultaneous rendering. Private folders: _folder excluded from routing. Template.tsx for re-rendering layouts. All conventions are automatic with zero configuration needed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://medium.com/@differofeveryone/mastering-next-js-routing-a-modern-guide-for-2025-138c1e65b505" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jll7l" prefix="r3882" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6043216480417447536"],"question":[0,"What are route handlers in Next.js?"],"answer":[0,"Route handlers are Next.js App Router feature for creating API endpoints within the app directory. Created by adding route.js files to route segments, they export HTTP method functions (GET, POST, PUT, DELETE) that handle requests. Route handlers can run on either Node.js or Edge Runtime, return standard Response objects, and accept request and context parameters. They support streaming, can coexist with page routes, and integrate seamlessly with Server Components. Route handlers are the modern replacement for Pages Router API routes, offering better TypeScript support and more flexible deployment options."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-route-handlers-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-route-handlers-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-route-handlers-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are route handlers in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route handlers are Next.js App Router feature for creating API endpoints within the app directory. Created by adding route.js files to route segments, they export HTTP method functions (GET, POST, PUT, DELETE) that handle requests. Route handlers can run on either Node.js or Edge Runtime, return standard Response objects, and accept request and context parameters. They support streaming, can coexist with page routes, and integrate seamlessly with Server Components. Route handlers are the modern replacement for Pages Router API routes, offering better TypeScript support and more flexible deployment options.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zj570k" prefix="r3883" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6540741292266295148"],"question":[0,"What are the manual performance optimization techniques in Next.js?"],"answer":[0,"Manual optimization techniques: prioritize static rendering over dynamic when possible, implement React Server Components to reduce client JavaScript, use loading.js and Suspense for streaming, minimize client bundle size with dynamic imports, optimize images with proper sizes and formats, implement route-level caching strategies, use middleware for caching headers, analyze bundles with @next/bundle-analyzer, implement lazy loading for heavy components, monitor Core Web Vitals with web-vitals library, optimize database queries, and implement CDN caching. Additional techniques include reducing third-party dependencies, implementing service workers, using Edge Runtime for global distribution, and setting proper cache-control headers for static assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-manual-performance-optimization-techniques-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-manual-performance-optimization-techniques-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-manual-performance-optimization-techniques-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the manual performance optimization techniques in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Manual optimization techniques: prioritize static rendering over dynamic when possible, implement React Server Components to reduce client JavaScript, use loading.js and Suspense for streaming, minimize client bundle size with dynamic imports, optimize images with proper sizes and formats, implement route-level caching strategies, use middleware for caching headers, analyze bundles with @next/bundle-analyzer, implement lazy loading for heavy components, monitor Core Web Vitals with web-vitals library, optimize database queries, and implement CDN caching. Additional techniques include reducing third-party dependencies, implementing service workers, using Edge Runtime for global distribution, and setting proper cache-control headers for static assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tQlY6" prefix="r3884" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6939628137783349322"],"question":[0,"How does data fetching work in Next.js App Router?"],"answer":[0,"Fetch in Server Components directly with async/await. fetch() extended with caching: cache: 'force-cache' (default, cached), 'no-store' (fresh), revalidate: seconds. Parallel fetching: Promise.all(). Sequential: await each. Revalidation: time-based (revalidate), on-demand (revalidatePath, revalidateTag). No getServerSideProps/getStaticProps needed. Streaming with Suspense. Database queries, API calls in components. Simplified data fetching model."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-data-fetching-work-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-data-fetching-work-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-data-fetching-work-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does data fetching work in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Fetch in Server Components directly with async/await. fetch() extended with caching: cache: 'force-cache' (default, cached), 'no-store' (fresh), revalidate: seconds. Parallel fetching: Promise.all(). Sequential: await each. Revalidation: time-based (revalidate), on-demand (revalidatePath, revalidateTag). No getServerSideProps/getStaticProps needed. Streaming with Suspense. Database queries, API calls in components. Simplified data fetching model.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Yw2O5" prefix="r3885" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7225517268315893531"],"question":[0,"What are environment variables and configuration in Next.js?"],"answer":[0,"Environment variables: .env.local (local), .env.production, .env. Server-side: process.env.VAR. Client-side: prefix NEXT_PUBLIC_. Built-in support, no dotenv needed. next.config.js: webpack config, redirects, rewrites, headers, env variables. TypeScript for config (.mjs or .ts). Load order: .env.local > .env.production > .env. Never commit .env.local. Essential for configuration management."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/configuring/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-environment-variables-and-configuration-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-environment-variables-and-configuration-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-environment-variables-and-configuration-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are environment variables and configuration in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables: .env.local (local), .env.production, .env. Server-side: process.env.VAR. Client-side: prefix NEXT_PUBLIC_. Built-in support, no dotenv needed. next.config.js: webpack config, redirects, rewrites, headers, env variables. TypeScript for config (.mjs or .ts). Load order: .env.local > .env.production > .env. Never commit .env.local. Essential for configuration management.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/configuring/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BL0fE" prefix="r3886" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7434199377640773177"],"question":[0,"What are Next.js layouts and how do they persist state?"],"answer":[0,"Layouts (layout.js) share UI across routes without re-rendering on navigation, preserving state and avoiding expensive re-mounts. Root layout (app/layout.js) required, wraps entire app. Nested layouts follow folder hierarchy. Layout receives children prop (nested segment/page). State persists during navigation - useful for filters, scroll position, form inputs. Route groups ((folder)) enable multiple root layouts in same app. Metadata in layouts applies to all child routes. Use for: navigation bars, sidebars, shared wrappers. Difference from templates: templates re-render on navigation, layouts don't. Essential for consistent UI structure and performance optimization in App Router applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-next-js-layouts-and-how-do-they-persist-state"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-next-js-layouts-and-how-do-they-persist-state" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-next-js-layouts-and-how-do-they-persist-state" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are Next.js layouts and how do they persist state?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layouts (layout.js) share UI across routes without re-rendering on navigation, preserving state and avoiding expensive re-mounts. Root layout (app/layout.js) required, wraps entire app. Nested layouts follow folder hierarchy. Layout receives children prop (nested segment/page). State persists during navigation - useful for filters, scroll position, form inputs. Route groups ((folder)) enable multiple root layouts in same app. Metadata in layouts applies to all child routes. Use for: navigation bars, sidebars, shared wrappers. Difference from templates: templates re-render on navigation, layouts don't. Essential for consistent UI structure and performance optimization in App Router applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mzgwO" prefix="r3887" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9040832957889386966"],"question":[0,"What rendering strategies does Next.js 15 support?"],"answer":[0,"Next.js 15 supports four rendering strategies: (1) Static Rendering (default) - pages pre-rendered at build time and cached, (2) Dynamic Rendering - pages generated at request time with fresh data when using dynamic functions like cookies() or searchParams, (3) Streaming with Suspense - progressive rendering of UI chunks as they become ready, and (4) Incremental Static Regeneration (ISR) - static pages that update in background using revalidate option. Choose Static for performance, Dynamic for real-time data, Streaming for better perceived performance, and ISR for balancing static speed with content freshness. Next.js 15 also introduces experimental Partial Prerendering that combines static and dynamic content in a single route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"],[0,"https://nextjs.org/docs/app/building-your-application/rendering"],[0,"https://peerlist.io/jagss/articles/deep-dive-into-nextjs-15-rendering-strategies-with-react-19-"]]],"topic":[0,"nextjs"],"slug":[0,"what-rendering-strategies-does-next-js-15-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-rendering-strategies-does-next-js-15-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-rendering-strategies-does-next-js-15-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What rendering strategies does Next.js 15 support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15 supports four rendering strategies: (1) Static Rendering (default) - pages pre-rendered at build time and cached, (2) Dynamic Rendering - pages generated at request time with fresh data when using dynamic functions like cookies() or searchParams, (3) Streaming with Suspense - progressive rendering of UI chunks as they become ready, and (4) Incremental Static Regeneration (ISR) - static pages that update in background using revalidate option. Choose Static for performance, Dynamic for real-time data, Streaming for better perceived performance, and ISR for balancing static speed with content freshness. Next.js 15 also introduces experimental Partial Prerendering that combines static and dynamic content in a single route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://nextjs.org/docs/app/building-your-application/rendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://peerlist.io/jagss/articles/deep-dive-into-nextjs-15-rendering-strategies-with-react-19-" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>peerlist.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16wtqI" prefix="r3888" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9967277702575185885"],"question":[0,"How do you implement authentication patterns in Next.js?"],"answer":[0,"Authentication patterns in Next.js: Middleware for route protection (redirects unauthorized users), Server Components for auth checks (direct database access), Client Components with auth context (useAuth hook), Server Actions for form submissions (progressive enhancement), API routes for external auth services, route groups for protected layouts (/dashboard), and parallel routes for auth modals. Session storage uses secure, HTTP-only cookies by default. Edge-compatible auth implementations work with middleware. Progressive enhancement ensures forms work without JavaScript. Pattern choice depends on application complexity and requirements."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/authentication"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-implement-authentication-patterns-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-implement-authentication-patterns-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-implement-authentication-patterns-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you implement authentication patterns in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Authentication patterns in Next.js: Middleware for route protection (redirects unauthorized users), Server Components for auth checks (direct database access), Client Components with auth context (useAuth hook), Server Actions for form submissions (progressive enhancement), API routes for external auth services, route groups for protected layouts (/dashboard), and parallel routes for auth modals. Session storage uses secure, HTTP-only cookies by default. Edge-compatible auth implementations work with middleware. Progressive enhancement ensures forms work without JavaScript. Pattern choice depends on application complexity and requirements.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/authentication" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1cHu1T" prefix="r3889" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10737003768738389557"],"question":[0,"How does the Next.js Image component work?"],"answer":[0,"next/image optimizes images automatically. Features: lazy loading, responsive images, automatic formats (WebP, AVIF), blur placeholder, size optimization. Required props: src, alt, width, height (or fill). Priority for above-fold images. Placeholder: blur with blurDataURL. Sizes for responsive. Formats based on browser support. Remote images: configure domains. Dramatically improves performance and Core Web Vitals. Essential for production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/images"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-next-js-image-component-work"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-next-js-image-component-work" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-next-js-image-component-work" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the Next.js Image component work?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next/image optimizes images automatically. Features: lazy loading, responsive images, automatic formats (WebP, AVIF), blur placeholder, size optimization. Required props: src, alt, width, height (or fill). Priority for above-fold images. Placeholder: blur with blurDataURL. Sizes for responsive. Formats based on browser support. Remote images: configure domains. Dramatically improves performance and Core Web Vitals. Essential for production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ukFCu" prefix="r3890" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11936061290881605769"],"question":[0,"What are the rendering strategies in Next.js?"],"answer":[0,"Static Rendering (default): rendered at build, cached, fast. Dynamic Rendering: request-time, fresh data. Streaming: progressive. ISR: static + updates. Per-route configuration. Dynamic functions trigger dynamic: cookies(), headers(), searchParams. Force static: generateStaticParams. Force dynamic: dynamic = 'force-dynamic'. Choose based on data freshness needs. Flexible rendering model."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-rendering-strategies-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-rendering-strategies-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-rendering-strategies-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the rendering strategies in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Static Rendering (default): rendered at build, cached, fast. Dynamic Rendering: request-time, fresh data. Streaming: progressive. ISR: static + updates. Per-route configuration. Dynamic functions trigger dynamic: cookies(), headers(), searchParams. Force static: generateStaticParams. Force dynamic: dynamic = 'force-dynamic'. Choose based on data freshness needs. Flexible rendering model.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pNjIB" prefix="r3891" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12113249966998049228"],"question":[0,"How do you handle forms and validation in Next.js?"],"answer":[0,"Server Actions: <form action={serverAction}>, progressive enhancement, no JavaScript needed. Validation: server-side in action, client-side (controlled inputs), libraries (Zod, Yup). Form state: useFormState hook (React), useFormStatus. React 19 form features. Libraries: react-hook-form, Formik compatible. Server-side validation critical (never trust client). Modern form handling with Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-handle-forms-and-validation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-handle-forms-and-validation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-handle-forms-and-validation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you handle forms and validation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions: <form action={serverAction}>, progressive enhancement, no JavaScript needed. Validation: server-side in action, client-side (controlled inputs), libraries (Zod, Yup). Form state: useFormState hook (React), useFormStatus. React 19 form features. Libraries: react-hook-form, Formik compatible. Server-side validation critical (never trust client). Modern form handling with Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7Ca0y" prefix="r3892" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12664202411684897607"],"question":[0,"How do Server Actions work in Next.js?"],"answer":[0,"Server Actions enable server-side mutations with 'use server' directive at function or file top. Define: async function createPost(formData) { 'use server'; const title = formData.get('title'); await db.posts.create({ title }); revalidatePath('/blog'); }. Use in forms: <form action={createPost}><input name=\"title\" /><button>Submit</button></form> or call from Client Components: onClick={() => createPost(formData)}. Benefits: No API routes needed, automatic revalidation with revalidatePath()/revalidateTag(), progressive enhancement (works without JavaScript), type-safe end-to-end. Perfect for: form submissions, data mutations, database updates. Integrated with Next.js caching and revalidation system. Stable in Next.js 14+."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-server-actions-work-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-server-actions-work-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-server-actions-work-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do Server Actions work in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions enable server-side mutations with 'use server' directive at function or file top. Define: async function createPost(formData) { 'use server'; const title = formData.get('title'); await db.posts.create({ title }); revalidatePath('/blog'); }. Use in forms: <form action={createPost}><input name="title" /><button>Submit</button></form> or call from Client Components: onClick={() => createPost(formData)}. Benefits: No API routes needed, automatic revalidation with revalidatePath()/revalidateTag(), progressive enhancement (works without JavaScript), type-safe end-to-end. Perfect for: form submissions, data mutations, database updates. Integrated with Next.js caching and revalidation system. Stable in Next.js 14+.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3TYXa" prefix="r3893" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13305005485479068386"],"question":[0,"What are parallel and intercepting routes in Next.js?"],"answer":[0,"Parallel routes: render multiple pages in same layout using slots (@folder). Independent navigation, own loading/error states. Use for: dashboards, modals, split views. Intercepting routes: intercept navigation, show different content (like modals). Syntax: (.)folder (same level), (..)folder (one up). Modal pattern: intercept route, show modal, refresh shows full page. Advanced routing patterns for complex UIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-parallel-and-intercepting-routes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-parallel-and-intercepting-routes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-parallel-and-intercepting-routes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are parallel and intercepting routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Parallel routes: render multiple pages in same layout using slots (@folder). Independent navigation, own loading/error states. Use for: dashboards, modals, split views. Intercepting routes: intercept navigation, show different content (like modals). Syntax: (.)folder (same level), (..)folder (one up). Modal pattern: intercept route, show modal, refresh shows full page. Advanced routing patterns for complex UIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1afF6C" prefix="r3894" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13498721811618577638"],"question":[0,"How do route handlers differ from API routes in Next.js?"],"answer":[0,"Route handlers (App Router) vs API routes (Pages Router): Location - route.js in app/ vs pages/api/. Runtime - both Node.js and Edge vs Node.js only. Return type - Response object vs NextApiRequest/NextApiResponse. Streaming - native support vs manual implementation. TypeScript - better type inference vs basic types. Flexibility - can coexist with pages vs API-only segments. Route handlers offer modern web standards, Edge Runtime support, better integration with App Router, and cleaner code. API routes remain supported for legacy Pages Router applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-route-handlers-differ-from-api-routes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-route-handlers-differ-from-api-routes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-route-handlers-differ-from-api-routes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do route handlers differ from API routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route handlers (App Router) vs API routes (Pages Router): Location - route.js in app/ vs pages/api/. Runtime - both Node.js and Edge vs Node.js only. Return type - Response object vs NextApiRequest/NextApiResponse. Streaming - native support vs manual implementation. TypeScript - better type inference vs basic types. Flexibility - can coexist with pages vs API-only segments. Route handlers offer modern web standards, Edge Runtime support, better integration with App Router, and cleaner code. API routes remain supported for legacy Pages Router applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24aKBx" prefix="r3895" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15116337642802622735"],"question":[0,"What are the key features of Next.js?"],"answer":[0,"Next.js provides comprehensive features: App Router with React Server Components, automatic code splitting, built-in image optimization, server-side rendering (SSR), static site generation (SSG), incremental static regeneration (ISR), file-based routing, API routes, middleware support, TypeScript integration, font optimization, CSS-in-JS support, and Edge Runtime capabilities. Performance features include automatic prefetching, bundle analysis, and Core Web Vitals optimization. Development features: fast refresh, enhanced hydration error messages with source code, and built-in ESLint configuration. Production-ready with automatic optimization and deployment-ready builds. Next.js 15 adds Turbopack (stable in dev), React 19 support, async Request APIs, and next/form component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs"],[0,"https://nextjs.org/blog/next-15"],[0,"https://indie-starter.dev/blog/nextjs-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-key-features-of-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-key-features-of-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-key-features-of-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the key features of Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js provides comprehensive features: App Router with React Server Components, automatic code splitting, built-in image optimization, server-side rendering (SSR), static site generation (SSG), incremental static regeneration (ISR), file-based routing, API routes, middleware support, TypeScript integration, font optimization, CSS-in-JS support, and Edge Runtime capabilities. Performance features include automatic prefetching, bundle analysis, and Core Web Vitals optimization. Development features: fast refresh, enhanced hydration error messages with source code, and built-in ESLint configuration. Production-ready with automatic optimization and deployment-ready builds. Next.js 15 adds Turbopack (stable in dev), React 19 support, async Request APIs, and next/form component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a><a href="https://indie-starter.dev/blog/nextjs-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>indie-starter.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yjcea" prefix="r3896" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15121432022862855686"],"question":[0,"How does caching work in Next.js?"],"answer":[0,"Multiple caches: Router Cache (client, route segments), Full Route Cache (server, static routes), Data Cache (server, fetch results), Request Memoization (deduplication). fetch caching: force-cache (default), no-store. Revalidation: time-based, on-demand. Opt out: cache: 'no-store', dynamic. Understanding caching critical for performance. Aggressive by default. Control per request/route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-caching-work-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-caching-work-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-caching-work-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does caching work in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Multiple caches: Router Cache (client, route segments), Full Route Cache (server, static routes), Data Cache (server, fetch results), Request Memoization (deduplication). fetch caching: force-cache (default), no-store. Revalidation: time-based, on-demand. Opt out: cache: 'no-store', dynamic. Understanding caching critical for performance. Aggressive by default. Control per request/route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-styling-and-presentation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Styling and Presentation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 29 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZFAOP0" prefix="r3897" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1073374123901013768"],"question":[0,"What CSS positioning is required for the parent element when using the fill prop?"],"answer":[0,"The parent element must assign position: \"relative\", \"fixed\", or \"absolute\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-css-positioning-is-required-for-the-parent-element-when-using-the-fill-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-css-positioning-is-required-for-the-parent-element-when-using-the-fill-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-css-positioning-is-required-for-the-parent-element-when-using-the-fill-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSS positioning is required for the parent element when using the fill prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The parent element must assign position: "relative", "fixed", or "absolute".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16OT6Q" prefix="r3898" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1205547264846298054"],"question":[0,"What should you use for above-the-fold images in Next.js 16+?"],"answer":[0,"In most cases, you should use loading=\"eager\" or fetchPriority=\"high\" instead of preload. Use loading=\"eager\" if the image is above the fold."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-use-for-above-the-fold-images-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-use-for-above-the-fold-images-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-use-for-above-the-fold-images-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you use for above-the-fold images in Next.js 16+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In most cases, you should use loading="eager" or fetchPriority="high" instead of preload. Use loading="eager" if the image is above the fold.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1iW81s" prefix="r3899" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1501621502369490185"],"question":[0,"What do the width and height properties determine for the Image component?"],"answer":[0,"The width and height properties represent the intrinsic image size in pixels. This property is used to infer the correct aspect ratio used by browsers to reserve space for the image and avoid layout shift during loading. It does not determine the rendered size of the image, which is controlled by CSS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-do-the-width-and-height-properties-determine-for-the-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-do-the-width-and-height-properties-determine-for-the-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-do-the-width-and-height-properties-determine-for-the-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What do the width and height properties determine for the Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The width and height properties represent the intrinsic image size in pixels. This property is used to infer the correct aspect ratio used by browsers to reserve space for the image and avoid layout shift during loading. It does not determine the rendered size of the image, which is controlled by CSS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lnf9s" prefix="r3900" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2177062354599372747"],"question":[0,"What are the valid values for the loading prop?"],"answer":[0,"\"lazy\" (default, defer until near viewport) or \"eager\" (load immediately)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-loading-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-loading-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-loading-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the loading prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"lazy" (default, defer until near viewport) or "eager" (load immediately).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="p8E4t" prefix="r3901" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3910421053409780248"],"question":[0,"What is the default value for the quality prop?"],"answer":[0,"75 (an integer between 1 and 100 where 100 is the best quality)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-quality-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-quality-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-quality-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the quality prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>75 (an integer between 1 and 100 where 100 is the best quality).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1g3Vsg" prefix="r3902" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4117294180913665415"],"question":[0,"What browser versions may cause Layout Shift when using width/height with auto values?"],"answer":[0,"Older browsers before Safari 15 that don't preserve the aspect ratio. When using styles with width/height of auto, it is possible to cause Layout Shift on these browsers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-browser-versions-may-cause-layout-shift-when-using-width-height-with-auto-v"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browser-versions-may-cause-layout-shift-when-using-width-height-with-auto-v" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browser-versions-may-cause-layout-shift-when-using-width-height-with-auto-v" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browser versions may cause Layout Shift when using width/height with auto values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Older browsers before Safari 15 that don't preserve the aspect ratio. When using styles with width/height of auto, it is possible to cause Layout Shift on these browsers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2myidk" prefix="r3903" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4483439608299093507"],"question":[0,"What is the default value for the decoding prop?"],"answer":[0,"\"async\" (asynchronously decode the image and allow other content to be rendered before it completes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-decoding-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-decoding-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-decoding-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the decoding prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"async" (asynchronously decode the image and allow other content to be rendered before it completes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ra8W6" prefix="r3904" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4874732233502189884"],"question":[0,"When is the imageSizes configuration array used?"],"answer":[0,"imageSizes is only used for images which provide a sizes prop, which indicates that the image is less than the full width of the screen. Therefore, the sizes in imageSizes should all be smaller than the smallest size in deviceSizes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-imagesizes-configuration-array-used"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-imagesizes-configuration-array-used" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-imagesizes-configuration-array-used" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the imageSizes configuration array used?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>imageSizes is only used for images which provide a sizes prop, which indicates that the image is less than the full width of the screen. Therefore, the sizes in imageSizes should all be smaller than the smallest size in deviceSizes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tKbsb" prefix="r3905" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5139302784897522954"],"question":[0,"What is the maximum number of values allowed in the deviceSizes array?"],"answer":[0,"25 values"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-values-allowed-in-the-devicesizes-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-values-allowed-in-the-devicesizes-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-values-allowed-in-the-devicesizes-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of values allowed in the deviceSizes array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>25 values</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bBJjE" prefix="r3906" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5394430892243716054"],"question":[0,"What is the CSS workaround for the Safari gray border issue with lazy-loaded images?"],"answer":[0,"Use CSS: @supports (font: -apple-system-body) and (-webkit-appearance: none) { img[loading=\"lazy\"] { clip-path: inset(0.6px) } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-css-workaround-for-the-safari-gray-border-issue-with-lazy-loaded-ima"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-css-workaround-for-the-safari-gray-border-issue-with-lazy-loaded-ima" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-css-workaround-for-the-safari-gray-border-issue-with-lazy-loaded-ima" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the CSS workaround for the Safari gray border issue with lazy-loaded images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use CSS: @supports (font: -apple-system-body) and (-webkit-appearance: none) { img[loading="lazy"] { clip-path: inset(0.6px) } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkeSxx" prefix="r3907" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5786523849771617691"],"question":[0,"What srcset is generated when sizes prop is NOT provided?"],"answer":[0,"Next.js generates a limited srcset (e.g. 1x, 2x), suitable for fixed-size images."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-srcset-is-generated-when-sizes-prop-is-not-provided"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-srcset-is-generated-when-sizes-prop-is-not-provided" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-srcset-is-generated-when-sizes-prop-is-not-provided" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What srcset is generated when sizes prop is NOT provided?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a limited srcset (e.g. 1x, 2x), suitable for fixed-size images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zg2ME" prefix="r3908" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6157306465607932285"],"question":[0,"What is the default CSS position value for the img element when using fill prop?"],"answer":[0,"By default, the <img> element uses position: \"absolute\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-css-position-value-for-the-img-element-when-using-fill-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-css-position-value-for-the-img-element-when-using-fill-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-css-position-value-for-the-img-element-when-using-fill-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default CSS position value for the img element when using fill prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, the <img> element uses position: "absolute".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26hfEz" prefix="r3909" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6434205161425770414"],"question":[0,"What is the recommended way to style Next.js Image components?"],"answer":[0,"Use className or style, not styled-jsx. In most cases, the className prop is recommended, which can be an imported CSS Module, a global stylesheet, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-way-to-style-next-js-image-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-way-to-style-next-js-image-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-way-to-style-next-js-image-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended way to style Next.js Image components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use className or style, not styled-jsx. In most cases, the className prop is recommended, which can be an imported CSS Module, a global stylesheet, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DsUKy" prefix="r3910" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7077866044176465883"],"question":[0,"What is the default value for the sizes prop when not specified?"],"answer":[0,"100vw (full viewport width). If sizes is missing, the browser assumes the image will be as wide as the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-sizes-prop-when-not-specified"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-sizes-prop-when-not-specified" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-sizes-prop-when-not-specified" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the sizes prop when not specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>100vw (full viewport width). If sizes is missing, the browser assumes the image will be as wide as the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1W2rKg" prefix="r3911" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7416133507591622150"],"question":[0,"What is the default value for the placeholder prop?"],"answer":[0,"\"empty\""],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-placeholder-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-placeholder-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-placeholder-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the placeholder prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"empty"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1td3Wz" prefix="r3912" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7701817019295507997"],"question":[0,"What styles should be applied to make an image responsive with static imports?"],"answer":[0,"Set width: '100%' and height: 'auto' in the style prop to make the image responsive while maintaining the aspect ratio."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-styles-should-be-applied-to-make-an-image-responsive-with-static-imports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-styles-should-be-applied-to-make-an-image-responsive-with-static-imports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-styles-should-be-applied-to-make-an-image-responsive-with-static-imports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What styles should be applied to make an image responsive with static imports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set width: '100%' and height: 'auto' in the style prop to make the image responsive while maintaining the aspect ratio.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmaPb2" prefix="r3913" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8025475635525769503"],"question":[0,"Can you use styled-jsx to style Next.js Image components?"],"answer":[0,"No, you cannot use styled-jsx because it's scoped to the current component (unless you mark the style as global)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-styled-jsx-to-style-next-js-image-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-styled-jsx-to-style-next-js-image-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-styled-jsx-to-style-next-js-image-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use styled-jsx to style Next.js Image components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you cannot use styled-jsx because it's scoped to the current component (unless you mark the style as global).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1SLfX2" prefix="r3914" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8464963714016381390"],"question":[0,"What is the maximum number of values allowed in the imageSizes array?"],"answer":[0,"25 values"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-values-allowed-in-the-imagesizes-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-values-allowed-in-the-imagesizes-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-values-allowed-in-the-imagesizes-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of values allowed in the imageSizes array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>25 values</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1FfUVf" prefix="r3915" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8582018397267410720"],"question":[0,"What are the valid values for the objectFit prop when using fill?"],"answer":[0,"\"contain\" (scales the image down to fit the container while preserving aspect ratio) or \"cover\" (fills the container with cropping applied)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-objectfit-prop-when-using-fill"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-objectfit-prop-when-using-fill" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-objectfit-prop-when-using-fill" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the objectFit prop when using fill?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"contain" (scales the image down to fit the container while preserving aspect ratio) or "cover" (fills the container with cropping applied).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1h31NN" prefix="r3916" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9762325208893340045"],"question":[0,"What srcset is generated when sizes prop IS provided?"],"answer":[0,"Next.js generates a full srcset (e.g. 640w, 750w, etc.), optimized for responsive layouts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-srcset-is-generated-when-sizes-prop-is-provided"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-srcset-is-generated-when-sizes-prop-is-provided" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-srcset-is-generated-when-sizes-prop-is-provided" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What srcset is generated when sizes prop IS provided?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a full srcset (e.g. 640w, 750w, etc.), optimized for responsive layouts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="186mhD" prefix="r3917" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10490999033985273877"],"question":[0,"What is the default value for the preload prop?"],"answer":[0,"false"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-preload-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-preload-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-preload-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the preload prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="eghGq" prefix="r3918" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11055646759791844355"],"question":[0,"What are the default imageSizes values in Next.js image configuration?"],"answer":[0,"[16, 32, 48, 64, 96, 128, 256, 384]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-imagesizes-values-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-imagesizes-values-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-imagesizes-values-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default imageSizes values in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[16, 32, 48, 64, 96, 128, 256, 384]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ejHFC" prefix="r3919" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11364868586155138721"],"question":[0,"What is the recommended size for blurDataURL images?"],"answer":[0,"A very small image (10px or less) is recommended because the image is automatically enlarged and blurred."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-size-for-blurdataurl-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-size-for-blurdataurl-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-size-for-blurdataurl-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended size for blurDataURL images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A very small image (10px or less) is recommended because the image is automatically enlarged and blurred.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="T59IL" prefix="r3920" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11584635294437707481"],"question":[0,"What is the default value for the loading prop?"],"answer":[0,"\"lazy\" (defer loading the image until it reaches a calculated distance from the viewport)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-loading-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-loading-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-loading-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the loading prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"lazy" (defer loading the image until it reaches a calculated distance from the viewport).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRnOoI" prefix="r3921" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11942106524635427943"],"question":[0,"What are all the valid values for the placeholder prop?"],"answer":[0,"\"empty\" (default, no placeholder), \"blur\" (use a blurred version of the image), or a Data URL string like \"data:image/...\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-valid-values-for-the-placeholder-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-valid-values-for-the-placeholder-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-valid-values-for-the-placeholder-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the valid values for the placeholder prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"empty" (default, no placeholder), "blur" (use a blurred version of the image), or a Data URL string like "data:image/...".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ve2Bv" prefix="r3922" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12946691004895316483"],"question":[0,"What happens when priority prop is used in Next.js 16+?"],"answer":[0,"Starting with Next.js 16, the priority property has been deprecated in favor of the preload property in order to make the behavior clear."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-priority-prop-is-used-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-priority-prop-is-used-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-priority-prop-is-used-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when priority prop is used in Next.js 16+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting with Next.js 16, the priority property has been deprecated in favor of the preload property in order to make the behavior clear.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mJKNS" prefix="r3923" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13241433535448964527"],"question":[0,"What images are concatenated to form the full srcset array?"],"answer":[0,"The imageSizes array is concatenated with the deviceSizes array to form the full array of sizes used to generate image srcset."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-images-are-concatenated-to-form-the-full-srcset-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-images-are-concatenated-to-form-the-full-srcset-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-images-are-concatenated-to-form-the-full-srcset-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What images are concatenated to form the full srcset array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The imageSizes array is concatenated with the deviceSizes array to form the full array of sizes used to generate image srcset.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UdgEM" prefix="r3924" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14649101517338893758"],"question":[0,"What are the default deviceSizes values in Next.js image configuration?"],"answer":[0,"[640, 750, 828, 1080, 1200, 1920, 2048, 3840]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-devicesizes-values-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-devicesizes-values-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-devicesizes-values-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default deviceSizes values in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[640, 750, 828, 1080, 1200, 1920, 2048, 3840]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1W3eAE" prefix="r3925" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14934500333296419734"],"question":[0,"When was the fetchPriority attribute added to next/image?"],"answer":[0,"Next.js 13.3 introduced support for the fetchPriority=\"high\" attribute."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-3"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-fetchpriority-attribute-added-to-next-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-fetchpriority-attribute-added-to-next-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-fetchpriority-attribute-added-to-next-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the fetchPriority attribute added to next/image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.3 introduced support for the fetchPriority="high" attribute.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-3" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="styling-utility-frameworks" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Styling > Utility Frameworks</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="Za0UdE" prefix="r3926" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"55204966692050864"],"question":[0,"Does Tailwind v4 require explicit content path configuration like v3?"],"answer":[0,"No, Tailwind v4 automatically detects your content files without explicit configuration. You can use the `@source` directive if you need to specify paths, but it's not required in most cases."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/upgrade-guide"]]],"topic":[0,"nextjs"],"slug":[0,"does-tailwind-v4-require-explicit-content-path-configuration-like-v3"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-tailwind-v4-require-explicit-content-path-configuration-like-v3" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-tailwind-v4-require-explicit-content-path-configuration-like-v3" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Tailwind v4 require explicit content path configuration like v3?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Tailwind v4 automatically detects your content files without explicit configuration. You can use the <code>@source</code> directive if you need to specify paths, but it's not required in most cases.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/upgrade-guide" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjfCtQ" prefix="r3927" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"123664339115026532"],"question":[0,"What Next.js version first added Turbopack support for Tailwind CSS and PostCSS?"],"answer":[0,"Next.js 13.1"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-version-first-added-turbopack-support-for-tailwind-css-and-postcss"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-version-first-added-turbopack-support-for-tailwind-css-and-postcss" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-version-first-added-turbopack-support-for-tailwind-css-and-postcss" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js version first added Turbopack support for Tailwind CSS and PostCSS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.1</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nH2c0" prefix="r3928" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"132203737963702885"],"question":[0,"What content must be in postcss.config.mjs for Tailwind CSS v4?"],"answer":[0,"```javascript\nexport default {\n plugins: {\n '@tailwindcss/postcss': {},\n },\n}\n```"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-content-must-be-in-postcss-config-mjs-for-tailwind-css-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-content-must-be-in-postcss-config-mjs-for-tailwind-css-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-content-must-be-in-postcss-config-mjs-for-tailwind-css-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What content must be in postcss.config.mjs for Tailwind CSS v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><pre><code class="language-javascript">export default { plugins: { '@tailwindcss/postcss': {}, }, } </code></pre> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oDdDx" prefix="r3929" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"171949196257353788"],"question":[0,"What is the minimum Firefox version required for Tailwind CSS v4?"],"answer":[0,"Firefox 128 (released July 2024)"],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/compatibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-firefox-version-required-for-tailwind-css-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-firefox-version-required-for-tailwind-css-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-firefox-version-required-for-tailwind-css-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Firefox version required for Tailwind CSS v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Firefox 128 (released July 2024)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/compatibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1R9BFE" prefix="r3930" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"653700805953921197"],"question":[0,"What is the minimum Chrome version required for Tailwind CSS v4?"],"answer":[0,"Chrome 111 (released March 2023)"],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/compatibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-chrome-version-required-for-tailwind-css-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-chrome-version-required-for-tailwind-css-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-chrome-version-required-for-tailwind-css-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Chrome version required for Tailwind CSS v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Chrome 111 (released March 2023)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/compatibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1D5V25" prefix="r3931" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1357127579524508877"],"question":[0,"What package manager commands install Tailwind CSS v3 with peer dependencies for Next.js?"],"answer":[0,"For pnpm: `pnpm add -D tailwindcss@^3 postcss autoprefixer`, for npm: `npm install -D tailwindcss@^3 postcss autoprefixer`, for yarn: `yarn add -D tailwindcss@^3 postcss autoprefixer`, for bun: `bun add -D tailwindcss@^3 postcss autoprefixer`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-manager-commands-install-tailwind-css-v3-with-peer-dependencies-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-manager-commands-install-tailwind-css-v3-with-peer-dependencies-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-manager-commands-install-tailwind-css-v3-with-peer-dependencies-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package manager commands install Tailwind CSS v3 with peer dependencies for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For pnpm: <code>pnpm add -D tailwindcss@^3 postcss autoprefixer</code>, for npm: <code>npm install -D tailwindcss@^3 postcss autoprefixer</code>, for yarn: <code>yarn add -D tailwindcss@^3 postcss autoprefixer</code>, for bun: <code>bun add -D tailwindcss@^3 postcss autoprefixer</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ad55M" prefix="r3932" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1415245172193763837"],"question":[0,"What import statement is required in globals.css for Tailwind CSS v4?"],"answer":[0,"`@import 'tailwindcss';` - this is a single import statement that replaces the three @tailwind directives used in v3."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-import-statement-is-required-in-globals-css-for-tailwind-css-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-import-statement-is-required-in-globals-css-for-tailwind-css-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-import-statement-is-required-in-globals-css-for-tailwind-css-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What import statement is required in globals.css for Tailwind CSS v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>@import 'tailwindcss';</code> - this is a single import statement that replaces the three @tailwind directives used in v3.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wUR09" prefix="r3933" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1537852948943734425"],"question":[0,"What are the three peer dependencies that must be installed alongside Tailwind CSS v3?"],"answer":[0,"`tailwindcss`, `postcss`, and `autoprefixer`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-peer-dependencies-that-must-be-installed-alongside-tailwind-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-peer-dependencies-that-must-be-installed-alongside-tailwind-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-peer-dependencies-that-must-be-installed-alongside-tailwind-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three peer dependencies that must be installed alongside Tailwind CSS v3?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>tailwindcss</code>, <code>postcss</code>, and <code>autoprefixer</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gEqjN" prefix="r3934" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1628896224233197119"],"question":[0,"What is the default PostCSS config file format created by create-next-app for Next.js projects?"],"answer":[0,"Since Next.js 14.2, `postcss.config.mjs` using ES modules syntax with `export default config` is the default format."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/73995"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-postcss-config-file-format-created-by-create-next-app-for-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-postcss-config-file-format-created-by-create-next-app-for-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-postcss-config-file-format-created-by-create-next-app-for-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default PostCSS config file format created by create-next-app for Next.js projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since Next.js 14.2, <code>postcss.config.mjs</code> using ES modules syntax with <code>export default config</code> is the default format.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/73995" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aFndU" prefix="r3935" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1867541796727135193"],"question":[0,"What command generates both tailwind.config.js and postcss.config.js files for Tailwind v3?"],"answer":[0,"For npm/pnpm/yarn: `npx tailwindcss init -p`, for bun: `bunx tailwindcss init -p`. The `-p` flag specifically generates a PostCSS config alongside the Tailwind config."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-both-tailwind-config-js-and-postcss-config-js-files-for-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-both-tailwind-config-js-and-postcss-config-js-files-for-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-both-tailwind-config-js-and-postcss-config-js-files-for-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates both tailwind.config.js and postcss.config.js files for Tailwind v3?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For npm/pnpm/yarn: <code>npx tailwindcss init -p</code>, for bun: <code>bunx tailwindcss init -p</code>. The <code>-p</code> flag specifically generates a PostCSS config alongside the Tailwind config.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="chDS0" prefix="r3936" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2146881457450881753"],"question":[0,"Does create-next-app automatically prompt to install Tailwind CSS?"],"answer":[0,"Yes, when running create-next-app, Next.js prompts 'Would you like to use Tailwind CSS? No / Yes'. If you select yes, Next.js will automatically install the necessary packages and configure Tailwind in your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"does-create-next-app-automatically-prompt-to-install-tailwind-css"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-create-next-app-automatically-prompt-to-install-tailwind-css" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-create-next-app-automatically-prompt-to-install-tailwind-css" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does create-next-app automatically prompt to install Tailwind CSS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, when running create-next-app, Next.js prompts 'Would you like to use Tailwind CSS? No / Yes'. If you select yes, Next.js will automatically install the necessary packages and configure Tailwind in your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24nB7E" prefix="r3937" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3100155120039712664"],"question":[0,"What directive is used to configure custom themes in Tailwind v4 CSS files?"],"answer":[0,"The `@theme` directive, which allows you to define theme values using CSS variables directly in CSS instead of JavaScript configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/upgrade-guide"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-is-used-to-configure-custom-themes-in-tailwind-v4-css-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-is-used-to-configure-custom-themes-in-tailwind-v4-css-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-is-used-to-configure-custom-themes-in-tailwind-v4-css-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive is used to configure custom themes in Tailwind v4 CSS files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>@theme</code> directive, which allows you to define theme values using CSS variables directly in CSS instead of JavaScript configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/upgrade-guide" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2l9COH" prefix="r3938" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4015017827597192673"],"question":[0,"What is the current maintenance status of Windi CSS?"],"answer":[0,"Windi CSS is being sunset and the maintainers recommend new projects to seek alternatives."],"confidence":[0,0.95],"sources":[1,[[0,"https://windicss.org/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-current-maintenance-status-of-windi-css"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-current-maintenance-status-of-windi-css" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-current-maintenance-status-of-windi-css" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the current maintenance status of Windi CSS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Windi CSS is being sunset and the maintainers recommend new projects to seek alternatives.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://windicss.org/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>windicss.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkVOpj" prefix="r3939" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4533937737562162279"],"question":[0,"What modern CSS features does Tailwind CSS v4 depend on that require specific browser versions?"],"answer":[0,"Tailwind CSS v4 depends on modern CSS features like `@property` and `color-mix()` for core framework features."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/upgrade-guide"]]],"topic":[0,"nextjs"],"slug":[0,"what-modern-css-features-does-tailwind-css-v4-depend-on-that-require-specific-br"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-modern-css-features-does-tailwind-css-v4-depend-on-that-require-specific-br" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-modern-css-features-does-tailwind-css-v4-depend-on-that-require-specific-br" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What modern CSS features does Tailwind CSS v4 depend on that require specific browser versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tailwind CSS v4 depends on modern CSS features like <code>@property</code> and <code>color-mix()</code> for core framework features.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/upgrade-guide" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HCGkX" prefix="r3940" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5338739220139708336"],"question":[0,"Where do you import globals.css when using the App Router in Next.js?"],"answer":[0,"Import it in the root layout file (`app/layout.tsx` or `app/layout.js`) to apply the styles to every route in your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"where-do-you-import-globals-css-when-using-the-app-router-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-do-you-import-globals-css-when-using-the-app-router-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-do-you-import-globals-css-when-using-the-app-router-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where do you import globals.css when using the App Router in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import it in the root layout file (<code>app/layout.tsx</code> or <code>app/layout.js</code>) to apply the styles to every route in your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21OSqx" prefix="r3941" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5788741358287226008"],"question":[0,"What content paths should be included in tailwind.config.js for a standard Next.js project?"],"answer":[0,"`'./app/**/*.{js,ts,jsx,tsx,mdx}'`, `'./pages/**/*.{js,ts,jsx,tsx,mdx}'`, and `'./components/**/*.{js,ts,jsx,tsx,mdx}'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-content-paths-should-be-included-in-tailwind-config-js-for-a-standard-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-content-paths-should-be-included-in-tailwind-config-js-for-a-standard-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-content-paths-should-be-included-in-tailwind-config-js-for-a-standard-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What content paths should be included in tailwind.config.js for a standard Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>'./app/**/*.{js,ts,jsx,tsx,mdx}'</code>, <code>'./pages/**/*.{js,ts,jsx,tsx,mdx}'</code>, and <code>'./components/**/*.{js,ts,jsx,tsx,mdx}'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HIFmL" prefix="r3942" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5926594844241247259"],"question":[0,"Where do you import globals.css when using the Pages Router in Next.js?"],"answer":[0,"Import it in the `pages/_app.js` file (or `_app.tsx`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/guides/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"where-do-you-import-globals-css-when-using-the-pages-router-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-do-you-import-globals-css-when-using-the-pages-router-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-do-you-import-globals-css-when-using-the-pages-router-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where do you import globals.css when using the Pages Router in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import it in the <code>pages/_app.js</code> file (or <code>_app.tsx</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/guides/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEoRuP" prefix="r3943" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7054531574686185180"],"question":[0,"What is the ESLint rule that Next.js documentation recommends disabling when using Tailwind?"],"answer":[0,"The `sort-imports` ESLint rule should be disabled to maintain predictable CSS ordering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-eslint-rule-that-next-js-documentation-recommends-disabling-when-usi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-eslint-rule-that-next-js-documentation-recommends-disabling-when-usi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-eslint-rule-that-next-js-documentation-recommends-disabling-when-usi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the ESLint rule that Next.js documentation recommends disabling when using Tailwind?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>sort-imports</code> ESLint rule should be disabled to maintain predictable CSS ordering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="uH2lR" prefix="r3944" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7871246611721838940"],"question":[0,"What packages are required to install UnoCSS with Next.js?"],"answer":[0,"`unocss`, `@unocss/postcss`, and `@unocss/reset`"],"confidence":[0,0.95],"sources":[1,[[0,"https://unocss.dev/integrations/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-packages-are-required-to-install-unocss-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-packages-are-required-to-install-unocss-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-packages-are-required-to-install-unocss-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What packages are required to install UnoCSS with Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>unocss</code>, <code>@unocss/postcss</code>, and <code>@unocss/reset</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://unocss.dev/integrations/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>unocss.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2l2fUJ" prefix="r3945" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7979128519766973823"],"question":[0,"What Tailwind CSS version is currently installed by create-next-app when using the --tailwind flag?"],"answer":[0,"Tailwind CSS v3.4.1 (as of the documentation date, v4 is not yet the default despite being officially released on January 22, 2025)"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/75320"]]],"topic":[0,"nextjs"],"slug":[0,"what-tailwind-css-version-is-currently-installed-by-create-next-app-when-using-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-tailwind-css-version-is-currently-installed-by-create-next-app-when-using-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-tailwind-css-version-is-currently-installed-by-create-next-app-when-using-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Tailwind CSS version is currently installed by create-next-app when using the --tailwind flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tailwind CSS v3.4.1 (as of the documentation date, v4 is not yet the default despite being officially released on January 22, 2025)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/75320" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10cCRd" prefix="r3946" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8119356723229459478"],"question":[0,"What additional configuration does Twind require for Next.js SSR?"],"answer":[0,"Twind provides a `twind/server` package to assist with static extraction needed for SSR apps, as usage with SSR frameworks like Next.js requires additional configuration beyond standard setup."],"confidence":[0,0.95],"sources":[1,[[0,"https://twind.dev/usage-guides/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-additional-configuration-does-twind-require-for-next-js-ssr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-additional-configuration-does-twind-require-for-next-js-ssr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-additional-configuration-does-twind-require-for-next-js-ssr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What additional configuration does Twind require for Next.js SSR?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Twind provides a <code>twind/server</code> package to assist with static extraction needed for SSR apps, as usage with SSR frameworks like Next.js requires additional configuration beyond standard setup.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://twind.dev/usage-guides/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>twind.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dYIQ9" prefix="r3947" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8799538786263438698"],"question":[0,"What content path should be added to tailwind.config.js if using Next.js with a src directory?"],"answer":[0,"`'./src/**/*.{js,ts,jsx,tsx,mdx}'` - this pattern covers all subdirectories within the src folder, including app, pages, and components directories."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/guides/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-content-path-should-be-added-to-tailwind-config-js-if-using-next-js-with-a-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-content-path-should-be-added-to-tailwind-config-js-if-using-next-js-with-a-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-content-path-should-be-added-to-tailwind-config-js-if-using-next-js-with-a-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What content path should be added to tailwind.config.js if using Next.js with a src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>'./src/**/*.{js,ts,jsx,tsx,mdx}'</code> - this pattern covers all subdirectories within the src folder, including app, pages, and components directories.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/guides/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="172Ohk" prefix="r3948" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9578679052372803424"],"question":[0,"Can you use Tailwind v3 configuration files with Tailwind v4?"],"answer":[0,"Yes, you can reference a legacy tailwind.config.js/ts file in v4 using the `@config` directive in your CSS file (e.g., `@config '../../tailwind.config.ts';`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/upgrade-guide"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-tailwind-v3-configuration-files-with-tailwind-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-tailwind-v3-configuration-files-with-tailwind-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-tailwind-v3-configuration-files-with-tailwind-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use Tailwind v3 configuration files with Tailwind v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can reference a legacy tailwind.config.js/ts file in v4 using the <code>@config</code> directive in your CSS file (e.g., <code>@config '../../tailwind.config.ts';</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/upgrade-guide" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iSKmf" prefix="r3949" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9719082130715777170"],"question":[0,"How does Turbopack process Tailwind CSS in Next.js?"],"answer":[0,"Turbopack automatically processes `postcss.config.js` in a Node.js worker pool, which is useful for Tailwind, Autoprefixer, and other PostCSS-based tools."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/turbopack"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-turbopack-process-tailwind-css-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-turbopack-process-tailwind-css-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-turbopack-process-tailwind-css-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Turbopack process Tailwind CSS in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Turbopack automatically processes <code>postcss.config.js</code> in a Node.js worker pool, which is useful for Tailwind, Autoprefixer, and other PostCSS-based tools.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/turbopack" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2lS14s" prefix="r3950" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10760720817110641804"],"question":[0,"What directive is added to globals.css for UnoCSS integration?"],"answer":[0,"`@unocss all;`"],"confidence":[0,0.95],"sources":[1,[[0,"https://unocss.dev/integrations/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-is-added-to-globals-css-for-unocss-integration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-is-added-to-globals-css-for-unocss-integration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-is-added-to-globals-css-for-unocss-integration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive is added to globals.css for UnoCSS integration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>@unocss all;</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://unocss.dev/integrations/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>unocss.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZKslui" prefix="r3951" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11358144893779417655"],"question":[0,"What is the minimum Safari version required for Tailwind CSS v4?"],"answer":[0,"Safari 16.4 (released March 2023)"],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/compatibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-safari-version-required-for-tailwind-css-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-safari-version-required-for-tailwind-css-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-safari-version-required-for-tailwind-css-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Safari version required for Tailwind CSS v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Safari 16.4 (released March 2023)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/compatibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fX9nT" prefix="r3952" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13247460302277713079"],"question":[0,"What happens if you exclude a directory from Tailwind's content paths?"],"answer":[0,"If a path is missing from the content array, Tailwind won't scan those files for class names, causing styles not to work in those files."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/guides/nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-exclude-a-directory-from-tailwind-s-content-paths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-exclude-a-directory-from-tailwind-s-content-paths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-exclude-a-directory-from-tailwind-s-content-paths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you exclude a directory from Tailwind's content paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a path is missing from the content array, Tailwind won't scan those files for class names, causing styles not to work in those files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/guides/nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17WUmx" prefix="r3953" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14254038790842701654"],"question":[0,"What directive is used to add custom utilities in Tailwind v4?"],"answer":[0,"The `@utility` directive, which uses native cascade layers to organize CSS. This replaced the `@layer` directive that wrapped entire chunks of classes in v3."],"confidence":[0,0.95],"sources":[1,[[0,"https://tailwindcss.com/docs/upgrade-guide"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-is-used-to-add-custom-utilities-in-tailwind-v4"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-is-used-to-add-custom-utilities-in-tailwind-v4" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-is-used-to-add-custom-utilities-in-tailwind-v4" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive is used to add custom utilities in Tailwind v4?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>@utility</code> directive, which uses native cascade layers to organize CSS. This replaced the <code>@layer</code> directive that wrapped entire chunks of classes in v3.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://tailwindcss.com/docs/upgrade-guide" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>tailwindcss.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="middleware-execution-context-lifecycle" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Middleware > Execution Context & Lifecycle</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="hPG7k" prefix="r3954" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"66299615349397240"],"question":[0,"Will geo location data be available when running Next.js middleware locally?"],"answer":[0,"No, the geolocation info will always be empty in your local environment, since Next.js server has no way of knowing where you are. When you deploy your code to Vercel, you should see the GeoIP data."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.jamesperkins.dev/post/using-next-middleware-for-geolocation/"]]],"topic":[0,"nextjs"],"slug":[0,"will-geo-location-data-be-available-when-running-next-js-middleware-locally"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="will-geo-location-data-be-available-when-running-next-js-middleware-locally" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#will-geo-location-data-be-available-when-running-next-js-middleware-locally" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Will geo location data be available when running Next.js middleware locally?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the geolocation info will always be empty in your local environment, since Next.js server has no way of knowing where you are. When you deploy your code to Vercel, you should see the GeoIP data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.jamesperkins.dev/post/using-next-middleware-for-geolocation/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>jamesperkins.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6zUk" prefix="r3955" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"811325340173787489"],"question":[0,"Must middleware matcher paths start with a forward slash?"],"answer":[0,"Yes, configured matchers must start with `/`. This is a required constraint that is statically analyzed at build-time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"must-middleware-matcher-paths-start-with-a-forward-slash"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-middleware-matcher-paths-start-with-a-forward-slash" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-middleware-matcher-paths-start-with-a-forward-slash" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must middleware matcher paths start with a forward slash?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, configured matchers must start with <code>/</code>. This is a required constraint that is statically analyzed at build-time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gyndy" prefix="r3956" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"817571144238803168"],"question":[0,"Can you use native Node.js APIs in middleware running on the Edge Runtime?"],"answer":[0,"No, native Node.js APIs are not supported in the Edge Runtime. Filesystem access is prohibited and calling `require` directly is not allowed - you must use ES Modules instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-native-node-js-apis-in-middleware-running-on-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-native-node-js-apis-in-middleware-running-on-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-native-node-js-apis-in-middleware-running-on-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use native Node.js APIs in middleware running on the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, native Node.js APIs are not supported in the Edge Runtime. Filesystem access is prohibited and calling <code>require</code> directly is not allowed - you must use ES Modules instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gHRln" prefix="r3957" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"920445559207997113"],"question":[0,"What is the syntax for matching multiple paths in middleware config?"],"answer":[0,"Use array syntax: `matcher: ['/about/:path*', '/dashboard/:path*']` to match multiple paths."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-matching-multiple-paths-in-middleware-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-matching-multiple-paths-in-middleware-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-matching-multiple-paths-in-middleware-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for matching multiple paths in middleware config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use array syntax: <code>matcher: ['/about/:path*', '/dashboard/:path*']</code> to match multiple paths.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NFVPp" prefix="r3958" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1165731939337279601"],"question":[0,"What is the default maximum request body size when middleware is used?"],"answer":[0,"The default maximum body size for requests when middleware is used is 10MB. This can be configured using the `middlewareClientMaxBodySize` option in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-request-body-size-when-middleware-is-used"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-request-body-size-when-middleware-is-used" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-request-body-size-when-middleware-is-used" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum request body size when middleware is used?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default maximum body size for requests when middleware is used is 10MB. This can be configured using the <code>middlewareClientMaxBodySize</code> option in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/config/next-config-js/middlewareClientMaxBodySize" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nfVDm" prefix="r3959" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1315518099763940076"],"question":[0,"Are regular expressions supported in middleware matcher configuration?"],"answer":[0,"Yes, the matcher config allows full regex so matching like negative lookaheads or character matching is supported. Regular expressions can be enclosed in parentheses, for example: `/about/(.*)` is the same as `/about/:path*`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"are-regular-expressions-supported-in-middleware-matcher-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-regular-expressions-supported-in-middleware-matcher-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-regular-expressions-supported-in-middleware-matcher-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are regular expressions supported in middleware matcher configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the matcher config allows full regex so matching like negative lookaheads or character matching is supported. Regular expressions can be enclosed in parentheses, for example: <code>/about/(.*)</code> is the same as <code>/about/:path*</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BocJE" prefix="r3960" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1795348488128623656"],"question":[0,"What HTTP redirect status code does NextResponse.redirect() create by default?"],"answer":[0,"NextResponse.redirect() creates a 307 (Temporary Redirect) response by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-redirect-status-code-does-nextresponse-redirect-create-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-redirect-status-code-does-nextresponse-redirect-create-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-redirect-status-code-does-nextresponse-redirect-create-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP redirect status code does NextResponse.redirect() create by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.redirect() creates a 307 (Temporary Redirect) response by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6hxVd" prefix="r3961" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2272776901191289826"],"question":[0,"What does NextResponse.cookies.delete() return?"],"answer":[0,"NextResponse.cookies.delete() returns a boolean: true if the cookie was deleted, false otherwise."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-cookies-delete-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-cookies-delete-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-cookies-delete-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.cookies.delete() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.cookies.delete() returns a boolean: true if the cookie was deleted, false otherwise.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iT22M" prefix="r3962" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2960811730754022958"],"question":[0,"Is Incremental Static Regeneration (ISR) supported in the Edge Runtime used by middleware?"],"answer":[0,"No, the Edge Runtime does not support Incremental Static Regeneration (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-incremental-static-regeneration-isr-supported-in-the-edge-runtime-used-by-mid"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-incremental-static-regeneration-isr-supported-in-the-edge-runtime-used-by-mid" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-incremental-static-regeneration-isr-supported-in-the-edge-runtime-used-by-mid" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Incremental Static Regeneration (ISR) supported in the Edge Runtime used by middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the Edge Runtime does not support Incremental Static Regeneration (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KINCJ" prefix="r3963" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3805871409323562503"],"question":[0,"Does Next.js middleware run before or after routes are matched?"],"answer":[0,"Middleware runs before cached content and routes are matched. Middleware executes before routes are rendered and will be invoked for every route in your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/pages/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-middleware-run-before-or-after-routes-are-matched"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-middleware-run-before-or-after-routes-are-matched" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-middleware-run-before-or-after-routes-are-matched" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js middleware run before or after routes are matched?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware runs before cached content and routes are matched. Middleware executes before routes are rendered and will be invoked for every route in your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/pages/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KwN6u" prefix="r3964" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5062944613770025232"],"question":[0,"What does the path modifier `?` mean in middleware matchers?"],"answer":[0,"`?` means zero or one instance of the preceding parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-path-modifier-mean-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-path-modifier-mean-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-path-modifier-mean-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the path modifier `?` mean in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>?</code> means zero or one instance of the preceding parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zip0LP" prefix="r3965" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5382428531258413178"],"question":[0,"How can you perform background tasks in middleware without blocking the response?"],"answer":[0,"Use the `waitUntil()` method from the NextFetchEvent parameter (the second parameter of the middleware function). `waitUntil()` accepts a Promise and prevents computation from closing while the promise is unresolved, allowing background tasks to continue after the response is returned."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.nico.fyi/blog/wait-until-nextjs-vercel"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-perform-background-tasks-in-middleware-without-blocking-the-response"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-perform-background-tasks-in-middleware-without-blocking-the-response" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-perform-background-tasks-in-middleware-without-blocking-the-response" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you perform background tasks in middleware without blocking the response?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>waitUntil()</code> method from the NextFetchEvent parameter (the second parameter of the middleware function). <code>waitUntil()</code> accepts a Promise and prevents computation from closing while the promise is unresolved, allowing background tasks to continue after the response is returned.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.nico.fyi/blog/wait-until-nextjs-vercel" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nico.fyi</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19bqyO" prefix="r3966" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5552310528962047150"],"question":[0,"How can you ignore prefetch requests in Next.js middleware?"],"answer":[0,"Use the `missing` array in the matcher config to filter requests without specific headers like `next-router-prefetch` or `purpose: prefetch`. This allows ignoring prefetches from `next/link`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-ignore-prefetch-requests-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-ignore-prefetch-requests-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-ignore-prefetch-requests-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you ignore prefetch requests in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>missing</code> array in the matcher config to filter requests without specific headers like <code>next-router-prefetch</code> or <code>purpose: prefetch</code>. This allows ignoring prefetches from <code>next/link</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZV61Qs" prefix="r3967" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5976234335039567550"],"question":[0,"What does NextResponse.next() do in middleware?"],"answer":[0,"NextResponse.next() allows you to return early and continue routing. It forwards the request to the next middleware function or route handler. You can optionally modify headers by passing an options object with a request.headers property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-nextresponse-next-do-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-nextresponse-next-do-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-nextresponse-next-do-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does NextResponse.next() do in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextResponse.next() allows you to return early and continue routing. It forwards the request to the next middleware function or route handler. You can optionally modify headers by passing an options object with a request.headers property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPiLSy" prefix="r3968" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6380458146441044831"],"question":[0,"What does the path modifier `*` mean in middleware matchers?"],"answer":[0,"`*` means zero or more. For example, `/about/:path*` matches `/about/a/b/c` because `*` is zero or more."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-path-modifier-mean-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-path-modifier-mean-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-path-modifier-mean-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the path modifier `*` mean in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>*</code> means zero or more. For example, <code>/about/:path*</code> matches <code>/about/a/b/c</code> because <code>*</code> is zero or more.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5COjm" prefix="r3969" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6663080072585678727"],"question":[0,"Can you share state or globals across middleware invocations in Next.js?"],"answer":[0,"No, middleware cannot rely on shared modules or globals across invocations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-share-state-or-globals-across-middleware-invocations-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-share-state-or-globals-across-middleware-invocations-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-share-state-or-globals-across-middleware-invocations-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you share state or globals across middleware invocations in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, middleware cannot rely on shared modules or globals across invocations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vTvi0" prefix="r3970" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7934122252724820336"],"question":[0,"What is the exact execution order of middleware in the Next.js request lifecycle?"],"answer":[0,"The execution order is: 1. Headers from `next.config.js`, 2. Redirects from `next.config.js`, 3. Middleware (rewrites, redirects, etc.), 4. `beforeFiles` rewrites from `next.config.js`, 5. Filesystem routes, 6. `afterFiles` rewrites from `next.config.js`, 7. Dynamic routes, 8. `fallback` rewrites from `next.config.js`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-execution-order-of-middleware-in-the-next-js-request-lifecycle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-execution-order-of-middleware-in-the-next-js-request-lifecycle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-execution-order-of-middleware-in-the-next-js-request-lifecycle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact execution order of middleware in the Next.js request lifecycle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The execution order is: 1. Headers from <code>next.config.js</code>, 2. Redirects from <code>next.config.js</code>, 3. Middleware (rewrites, redirects, etc.), 4. <code>beforeFiles</code> rewrites from <code>next.config.js</code>, 5. Filesystem routes, 6. <code>afterFiles</code> rewrites from <code>next.config.js</code>, 7. Dynamic routes, 8. <code>fallback</code> rewrites from <code>next.config.js</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DnMud" prefix="r3971" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7973083437238826521"],"question":[0,"What properties are available in the NextRequest `geo` object?"],"answer":[0,"The `geo` property includes: `city` (string || undefined), `country` (string || undefined), `region` (string || undefined), `latitude` (string || undefined), and `longitude` (string || undefined). This information is provided by your hosting platform."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/pages/api-reference/functions/next-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-the-nextrequest-geo-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-the-nextrequest-geo-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-the-nextrequest-geo-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in the NextRequest `geo` object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>geo</code> property includes: <code>city</code> (string || undefined), <code>country</code> (string || undefined), <code>region</code> (string || undefined), <code>latitude</code> (string || undefined), and <code>longitude</code> (string || undefined). This information is provided by your hosting platform.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/pages/api-reference/functions/next-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dlnu9" prefix="r3972" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8164739410313449751"],"question":[0,"What error might occur if you set large headers in middleware?"],"answer":[0,"Setting large headers might cause a 431 Request Header Fields Too Large error depending on your backend web server configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-might-occur-if-you-set-large-headers-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-might-occur-if-you-set-large-headers-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-might-occur-if-you-set-large-headers-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error might occur if you set large headers in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting large headers might cause a 431 Request Header Fields Too Large error depending on your backend web server configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BvWOO" prefix="r3973" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8452305153469124264"],"question":[0,"Can you use the after() API in Next.js middleware?"],"answer":[0,"Yes, starting in Next.js 15, the after() API is available in middleware. It allows you to schedule tasks such as logging, analytics, and other background operations after the response has finished streaming to the user."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/after"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-after-api-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-after-api-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-after-api-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the after() API in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, starting in Next.js 15, the after() API is available in middleware. It allows you to schedule tasks such as logging, analytics, and other background operations after the response has finished streaming to the user.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/after" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z122rzr" prefix="r3974" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8872637768463181485"],"question":[0,"Is middleware supported when using Next.js static export (output: 'export')?"],"answer":[0,"No, middleware is not supported in static export deployments. Features that require a Node.js server or dynamic logic that cannot be computed during the build process are not supported, including middleware."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-middleware-supported-when-using-next-js-static-export-output-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-middleware-supported-when-using-next-js-static-export-output-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-middleware-supported-when-using-next-js-static-export-output-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is middleware supported when using Next.js static export (output: 'export')?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, middleware is not supported in static export deployments. Features that require a Node.js server or dynamic logic that cannot be computed during the build process are not supported, including middleware.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1cKWKL" prefix="r3975" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11052986859876503954"],"question":[0,"How does Next.js handle `/public` paths in middleware matchers?"],"answer":[0,"Next.js always considers `/public` as `/public/index` for backward compatibility, so a matcher of `/public/:path` will match the public directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-public-paths-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-public-paths-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-public-paths-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle `/public` paths in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js always considers <code>/public</code> as <code>/public/index</code> for backward compatibility, so a matcher of <code>/public/:path</code> will match the public directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVPAtq" prefix="r3976" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11076144820704185975"],"question":[0,"Can you have dynamic reads from process.env in middleware?"],"answer":[0,"No, during the build process, Next.js uses the Webpack DefinePlugin to replace environment variable values at the locations of use, which means you cannot have dynamic reads from `process.env`."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/36338"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-have-dynamic-reads-from-process-env-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-have-dynamic-reads-from-process-env-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-have-dynamic-reads-from-process-env-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you have dynamic reads from process.env in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, during the build process, Next.js uses the Webpack DefinePlugin to replace environment variable values at the locations of use, which means you cannot have dynamic reads from <code>process.env</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/36338" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jIkfE" prefix="r3977" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11717676553121402391"],"question":[0,"Can you use dynamic values or variables in middleware matcher configuration?"],"answer":[0,"No, matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-dynamic-values-or-variables-in-middleware-matcher-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-dynamic-values-or-variables-in-middleware-matcher-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-dynamic-values-or-variables-in-middleware-matcher-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use dynamic values or variables in middleware matcher configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z4lxyo" prefix="r3978" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12893395367899391789"],"question":[0,"What methods can you use to pass data from middleware to your application?"],"answer":[0,"You must use headers, cookies, rewrites, redirects, or the URL. Direct state sharing is prohibited."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-can-you-use-to-pass-data-from-middleware-to-your-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-can-you-use-to-pass-data-from-middleware-to-your-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-can-you-use-to-pass-data-from-middleware-to-your-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods can you use to pass data from middleware to your application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must use headers, cookies, rewrites, redirects, or the URL. Direct state sharing is prohibited.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2e4o9E" prefix="r3979" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13087526591907249848"],"question":[0,"What does the path modifier `+` mean in middleware matchers?"],"answer":[0,"`+` means one or more instances of the preceding parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-path-modifier-mean-in-middleware-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-path-modifier-mean-in-middleware-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-path-modifier-mean-in-middleware-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the path modifier `+` mean in middleware matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>+</code> means one or more instances of the preceding parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22vh8K" prefix="r3980" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13754603047429420894"],"question":[0,"Where must the middleware file be located in a Next.js project?"],"answer":[0,"The middleware file must be created at the project root or inside the `src` directory, at the same level as `pages` or `app`. If `pageExtensions` is customized, the filename must match that convention (e.g., `proxy.page.ts`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-middleware-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-middleware-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-middleware-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the middleware file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware file must be created at the project root or inside the <code>src</code> directory, at the same level as <code>pages</code> or <code>app</code>. If <code>pageExtensions</code> is customized, the filename must match that convention (e.g., <code>proxy.page.ts</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZwjiFb" prefix="r3981" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13796053108580358750"],"question":[0,"What happens if multiple cookies exist with the same name when using NextRequest.cookies.get()?"],"answer":[0,"NextRequest.cookies.get() returns undefined if the cookie is not found, and only the first match if multiple cookies exist with the same name."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-multiple-cookies-exist-with-the-same-name-when-using-nextrequest"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-multiple-cookies-exist-with-the-same-name-when-using-nextrequest" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-multiple-cookies-exist-with-the-same-name-when-using-nextrequest" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if multiple cookies exist with the same name when using NextRequest.cookies.get()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextRequest.cookies.get() returns undefined if the cookie is not found, and only the first match if multiple cookies exist with the same name.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-code-separation-and-security" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Code Separation and Security</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z24Cieu" prefix="r3982" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"377196274375166080"],"question":[0,"How does Next.js generate IDs for Server Actions?"],"answer":[0,"Next.js creates encrypted, non-deterministic IDs to allow the client to reference and call Server Actions. These IDs are periodically recalculated between builds for enhanced security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-generate-ids-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-generate-ids-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-generate-ids-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js generate IDs for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js creates encrypted, non-deterministic IDs to allow the client to reference and call Server Actions. These IDs are periodically recalculated between builds for enhanced security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1eIaC3" prefix="r3983" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"546654469530253374"],"question":[0,"What happens to unused Server Actions in the Next.js client bundle?"],"answer":[0,"Unused Server Actions are removed from the client bundle through dead code elimination. This prevents them from having their IDs exposed to the client-side JavaScript and creating unnecessary public endpoints."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-unused-server-actions-in-the-next-js-client-bundle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-unused-server-actions-in-the-next-js-client-bundle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-unused-server-actions-in-the-next-js-client-bundle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to unused Server Actions in the Next.js client bundle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unused Server Actions are removed from the client bundle through dead code elimination. This prevents them from having their IDs exposed to the client-side JavaScript and creating unnecessary public endpoints.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MMkMG" prefix="r3984" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3234236152893139276"],"question":[0,"What React function should be used with a Data Access Layer (DAL) in Next.js to share in-memory values across a request?"],"answer":[0,"The `cache()` function from React. When not using fetch, wrap your data access functions with React's `cache()` to enable request-level memoization, preventing duplicate queries for the same data during a single request lifecycle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-function-should-be-used-with-a-data-access-layer-dal-in-next-js-to-sh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-function-should-be-used-with-a-data-access-layer-dal-in-next-js-to-sh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-function-should-be-used-with-a-data-access-layer-dal-in-next-js-to-sh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React function should be used with a Data Access Layer (DAL) in Next.js to share in-memory values across a request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>cache()</code> function from React. When not using fetch, wrap your data access functions with React's <code>cache()</code> to enable request-level memoization, preventing duplicate queries for the same data during a single request lifecycle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SnHv6" prefix="r3985" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4337227751410644274"],"question":[0,"Where can the 'use server' directive be placed in Next.js code?"],"answer":[0,"The 'use server' directive can be applied in two ways: (1) at the file level - at the top of a file to mark all functions as server-side, or (2) at the function level - inline at the beginning of a specific function to designate only that function as a Server Function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-the-use-server-directive-be-placed-in-next-js-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-the-use-server-directive-be-placed-in-next-js-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-the-use-server-directive-be-placed-in-next-js-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can the 'use server' directive be placed in Next.js code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use server' directive can be applied in two ways: (1) at the file level - at the top of a file to mark all functions as server-side, or (2) at the function level - inline at the beginning of a specific function to designate only that function as a Server Function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1T6FTx" prefix="r3986" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5387035537066258195"],"question":[0,"What is the recommended approach for returning data from a Data Access Layer in Next.js?"],"answer":[0,"Return safe, minimal Data Transfer Objects (DTOs) that contain only the data relevant for the specific query, not everything. DTOs should be filtered based on authorization, conditionally including fields based on user permissions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-returning-data-from-a-data-access-layer-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-returning-data-from-a-data-access-layer-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-returning-data-from-a-data-access-layer-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for returning data from a Data Access Layer in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Return safe, minimal Data Transfer Objects (DTOs) that contain only the data relevant for the specific query, not everything. DTOs should be filtered based on authorization, conditionally including fields based on user permissions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="fnooU" prefix="r3987" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5441427358070012668"],"question":[0,"What happens when you use dynamic lookups for NEXT_PUBLIC_ environment variables in Next.js?"],"answer":[0,"Dynamic lookups are NOT inlined. For example, using a variable like `const varName = 'NEXT_PUBLIC_ANALYTICS_ID'; process.env[varName]` or destructuring like `const env = process.env; env.NEXT_PUBLIC_ANALYTICS_ID` will not be replaced at build time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-use-dynamic-lookups-for-next-public-environment-variables-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-use-dynamic-lookups-for-next-public-environment-variables-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-use-dynamic-lookups-for-next-public-environment-variables-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you use dynamic lookups for NEXT_PUBLIC_ environment variables in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic lookups are NOT inlined. For example, using a variable like <code>const varName = 'NEXT_PUBLIC_ANALYTICS_ID'; process.env[varName]</code> or destructuring like <code>const env = process.env; env.NEXT_PUBLIC_ANALYTICS_ID</code> will not be replaced at build time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LykJ" prefix="r3988" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5710783408141346660"],"question":[0,"What package can be used to prevent server-only code from being imported into Client Components in Next.js?"],"answer":[0,"The `server-only` package. Install it with `npm install server-only`, then add `import 'server-only'` at the top of modules that should only run on the server. If this module is imported in a Client Component, Next.js will cause a build-time error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-can-be-used-to-prevent-server-only-code-from-being-imported-into-cl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-can-be-used-to-prevent-server-only-code-from-being-imported-into-cl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-can-be-used-to-prevent-server-only-code-from-being-imported-into-cl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package can be used to prevent server-only code from being imported into Client Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>server-only</code> package. Install it with <code>npm install server-only</code>, then add <code>import 'server-only'</code> at the top of modules that should only run on the server. If this module is imported in a Client Component, Next.js will cause a build-time error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zuTAa" prefix="r3989" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6936989621566028764"],"question":[0,"Can custom JavaScript classes be serialized through the React Server Component protocol in Next.js?"],"answer":[0,"No. Transferring custom classes is not supported and will result in an error. Classes cannot be serialized through the RSC protocol, which makes them useful as a safety mechanism - they fail early if accidentally passed to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"can-custom-javascript-classes-be-serialized-through-the-react-server-component-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-custom-javascript-classes-be-serialized-through-the-react-server-component-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-custom-javascript-classes-be-serialized-through-the-react-server-component-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can custom JavaScript classes be serialized through the React Server Component protocol in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Transferring custom classes is not supported and will result in an error. Classes cannot be serialized through the RSC protocol, which makes them useful as a safety mechanism - they fail early if accidentally passed to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="yVwzF" prefix="r3990" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7956859741253630358"],"question":[0,"What is the default bodySizeLimit for Server Actions in Next.js?"],"answer":[0,"The default bodySizeLimit is 1MB. This can be configured in next.config.js using formats like `'500kb'`, `'3mb'`, or as a number in bytes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bodysizelimit-for-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bodysizelimit-for-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bodysizelimit-for-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bodySizeLimit for Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default bodySizeLimit is 1MB. This can be configured in next.config.js using formats like <code>'500kb'</code>, <code>'3mb'</code>, or as a number in bytes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sDqiQ" prefix="r3991" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8201397710011046961"],"question":[0,"When you mark a file with 'use client', what happens to all its imports and child components?"],"answer":[0,"All its imports and child components are considered part of the client bundle. You don't need to add 'use client' to every component - only at the entry point. All modules imported into it are automatically considered Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"when-you-mark-a-file-with-use-client-what-happens-to-all-its-imports-and-child-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-you-mark-a-file-with-use-client-what-happens-to-all-its-imports-and-child-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-you-mark-a-file-with-use-client-what-happens-to-all-its-imports-and-child-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When you mark a file with 'use client', what happens to all its imports and child components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All its imports and child components are considered part of the client bundle. You don't need to add 'use client' to every component - only at the entry point. All modules imported into it are automatically considered Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vFNWo" prefix="r3992" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9512004622779828392"],"question":[0,"What are the two React taint API functions available in Next.js?"],"answer":[0,"`experimental_taintObjectReference` (for tainting entire data objects) and `experimental_taintUniqueValue` (for tainting specific values like passwords, tokens, or keys). Both prevent the tainted data from being passed to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-react-taint-api-functions-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-react-taint-api-functions-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-react-taint-api-functions-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two React taint API functions available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>experimental_taintObjectReference</code> (for tainting entire data objects) and <code>experimental_taintUniqueValue</code> (for tainting specific values like passwords, tokens, or keys). Both prevent the tainted data from being passed to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6GIMq" prefix="r3993" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9604801196339039295"],"question":[0,"What environment variable can be used to set a consistent encryption key for Server Actions across multiple server instances?"],"answer":[0,"`process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY`. It must be a base64 encoded string generated from a Uint8Array of length valid for AES-GCM encryption (e.g., 16 bytes). This ensures encryption keys are persistent across builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-can-be-used-to-set-a-consistent-encryption-key-for-ser"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-can-be-used-to-set-a-consistent-encryption-key-for-ser" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-can-be-used-to-set-a-consistent-encryption-key-for-ser" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable can be used to set a consistent encryption key for Server Actions across multiple server instances?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY</code>. It must be a base64 encoded string generated from a Uint8Array of length valid for AES-GCM encryption (e.g., 16 bytes). This ensures encryption keys are persistent across builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tWvbO" prefix="r3994" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10136812378472769685"],"question":[0,"How does Next.js encrypt closed-over variables in Server Actions?"],"answer":[0,"Next.js automatically encrypts closed-over variables (variables captured in closures). A new private key is generated for each action every time the Next.js application is built, meaning actions can only be invoked for a specific build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-encrypt-closed-over-variables-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-encrypt-closed-over-variables-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-encrypt-closed-over-variables-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js encrypt closed-over variables in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically encrypts closed-over variables (variables captured in closures). A new private key is generated for each action every time the Next.js application is built, meaning actions can only be invoked for a specific build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9BGX5" prefix="r3995" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10325844317495152139"],"question":[0,"What security limitation exists with React's taint APIs in Next.js?"],"answer":[0,"Recreating or cloning a tainted object creates a new untainted object which may contain sensitive data. The taint APIs don't prevent extracting individual fields or derived values from tainted objects, so they should be used as an additional layer of protection, not the only defense."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-limitation-exists-with-react-s-taint-apis-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-limitation-exists-with-react-s-taint-apis-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-limitation-exists-with-react-s-taint-apis-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security limitation exists with React's taint APIs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Recreating or cloning a tainted object creates a new untainted object which may contain sensitive data. The taint APIs don't prevent extracting individual fields or derived values from tainted objects, so they should be used as an additional layer of protection, not the only defense.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25BE2O" prefix="r3996" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10562324849313295410"],"question":[0,"What is the exact prefix required for environment variables to be included in the Next.js client bundle?"],"answer":[0,"Environment variables must be prefixed with `NEXT_PUBLIC_` to be included in the client bundle. Variables without this prefix are replaced with an empty string in client code."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-prefix-required-for-environment-variables-to-be-included-in-th"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-prefix-required-for-environment-variables-to-be-included-in-th" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-prefix-required-for-environment-variables-to-be-included-in-th" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact prefix required for environment variables to be included in the Next.js client bundle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables must be prefixed with <code>NEXT_PUBLIC_</code> to be included in the client bundle. Variables without this prefix are replaced with an empty string in client code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1I21tT" prefix="r3997" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11027521613957060364"],"question":[0,"What package can be used to prevent client-only code from being imported into Server Components in Next.js?"],"answer":[0,"The `client-only` package. It marks modules containing client-only logic (like code that accesses the `window` object) to prevent server-side imports, triggering build-time errors if violated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-can-be-used-to-prevent-client-only-code-from-being-imported-into-se"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-can-be-used-to-prevent-client-only-code-from-being-imported-into-se" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-can-be-used-to-prevent-client-only-code-from-being-imported-into-se" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package can be used to prevent client-only code from being imported into Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>client-only</code> package. It marks modules containing client-only logic (like code that accesses the <code>window</code> object) to prevent server-side imports, triggering build-time errors if violated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zdecS" prefix="r3998" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11215531920837610504"],"question":[0,"Do Server Components in Next.js send their JavaScript code to the client?"],"answer":[0,"No. Server Components do not send their JavaScript to the client. They run only on the server and their code is never included in the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-components-in-next-js-send-their-javascript-code-to-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-components-in-next-js-send-their-javascript-code-to-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-components-in-next-js-send-their-javascript-code-to-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Components in Next.js send their JavaScript code to the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Components do not send their JavaScript to the client. They run only on the server and their code is never included in the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnyJPU" prefix="r3999" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11403456008116881224"],"question":[0,"Are Client Components pre-rendered on the server in Next.js?"],"answer":[0,"Yes. Client Components are pre-rendered on the server during the initial load to generate HTML, then hydrated on the client. However, on subsequent navigations, Client Components are rendered entirely on the client without server-rendered HTML."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"are-client-components-pre-rendered-on-the-server-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-client-components-pre-rendered-on-the-server-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-client-components-pre-rendered-on-the-server-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Client Components pre-rendered on the server in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Client Components are pre-rendered on the server during the initial load to generate HTML, then hydrated on the client. However, on subsequent navigations, Client Components are rendered entirely on the client without server-rendered HTML.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1MT8UD" prefix="r4000" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11640089842067179476"],"question":[0,"What three data handling approaches does Next.js recommend for new projects?"],"answer":[0,"(1) HTTP APIs - for existing large applications, treating Server Components as untrusted with Zero Trust principles, (2) Data Access Layer (DAL) - recommended for new projects, creating a separate library with authorization checks, and (3) Component Level Data Access - only for prototyping/small teams."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-data-handling-approaches-does-next-js-recommend-for-new-projects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-data-handling-approaches-does-next-js-recommend-for-new-projects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-data-handling-approaches-does-next-js-recommend-for-new-projects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three data handling approaches does Next.js recommend for new projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>(1) HTTP APIs - for existing large applications, treating Server Components as untrusted with Zero Trust principles, (2) Data Access Layer (DAL) - recommended for new projects, creating a separate library with authorization checks, and (3) Component Level Data Access - only for prototyping/small teams.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dNn2H" prefix="r4001" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12905049531761062086"],"question":[0,"How does Next.js handle Server Actions implemented with .bind()?"],"answer":[0,".bind() provides unencrypted argument binding as an alternative to closure encryption, offering better performance. However, it requires explicit security consideration since arguments are not automatically encrypted."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-server-actions-implemented-with-bind"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-server-actions-implemented-with-bind" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-server-actions-implemented-with-bind" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle Server Actions implemented with .bind()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.bind() provides unencrypted argument binding as an alternative to closure encryption, offering better performance. However, it requires explicit security consideration since arguments are not automatically encrypted.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kX51d" prefix="r4002" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12955995643882546819"],"question":[0,"What security assumption should developers make about Server Actions created with 'use server'?"],"answer":[0,"Server Actions should be treated with the same security assumptions as public HTTP endpoints. Even if a Server Action is not imported elsewhere in the code, it creates a public HTTP endpoint and requires authentication and authorization checks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-assumption-should-developers-make-about-server-actions-created-wit"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-assumption-should-developers-make-about-server-actions-created-wit" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-assumption-should-developers-make-about-server-actions-created-wit" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security assumption should developers make about Server Actions created with 'use server'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions should be treated with the same security assumptions as public HTTP endpoints. Even if a Server Action is not imported elsewhere in the code, it creates a public HTTP endpoint and requires authentication and authorization checks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1s0Vby" prefix="r4003" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13268126764384683573"],"question":[0,"What is the RSC Payload in Next.js?"],"answer":[0,"The RSC Payload is a compact binary representation of the rendered React Server Components tree. It's used by React on the client to update the browser's DOM and contains placeholders for Client Components, references to their JavaScript files, and props passed from Server to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-rsc-payload-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-rsc-payload-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-rsc-payload-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the RSC Payload in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload is a compact binary representation of the rendered React Server Components tree. It's used by React on the client to update the browser's DOM and contains placeholders for Client Components, references to their JavaScript files, and props passed from Server to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RG5gF" prefix="r4004" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13320832406827071972"],"question":[0,"What configuration option allows Server Actions to be invoked from different origins in Next.js?"],"answer":[0,"The `serverActions.allowedOrigins` option in next.config.js. It accepts an array of domain strings and supports wildcards (e.g., `['my-proxy.com', '*.my-proxy.com']`). This is useful for reverse proxies or multi-layered backend architectures."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-allows-server-actions-to-be-invoked-from-different-ori"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-allows-server-actions-to-be-invoked-from-different-ori" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-allows-server-actions-to-be-invoked-from-different-ori" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option allows Server Actions to be invoked from different origins in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>serverActions.allowedOrigins</code> option in next.config.js. It accepts an array of domain strings and supports wildcards (e.g., <code>['my-proxy.com', '*.my-proxy.com']</code>). This is useful for reverse proxies or multi-layered backend architectures.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hI2V0" prefix="r4005" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13624997748936901191"],"question":[0,"What experimental configuration is required to enable React's taint APIs in Next.js?"],"answer":[0,"Set `experimental.taint: true` in next.config.js. This enables both the taint APIs and activates the React experimental channel for the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-configuration-is-required-to-enable-react-s-taint-apis-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-configuration-is-required-to-enable-react-s-taint-apis-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-configuration-is-required-to-enable-react-s-taint-apis-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental configuration is required to enable React's taint APIs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>experimental.taint: true</code> in next.config.js. This enables both the taint APIs and activates the React experimental channel for the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14ifI1" prefix="r4006" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13870193745196179089"],"question":[0,"What parameters does experimental_taintUniqueValue accept in React/Next.js?"],"answer":[0,"Three parameters: (1) message - the error message to display if the value is passed to a Client Component, (2) lifetime - any object indicating how long the value should be tainted, and (3) value - a string, bigint, or TypedArray to taint."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/experimental_taintUniqueValue"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-experimental-taintuniquevalue-accept-in-react-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-experimental-taintuniquevalue-accept-in-react-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-experimental-taintuniquevalue-accept-in-react-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does experimental_taintUniqueValue accept in React/Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Three parameters: (1) message - the error message to display if the value is passed to a Client Component, (2) lifetime - any object indicating how long the value should be tainted, and (3) value - a string, bigint, or TypedArray to taint.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/experimental_taintUniqueValue" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZUx2BR" prefix="r4007" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13983936210125373117"],"question":[0,"How does Next.js handle NEXT_PUBLIC_ environment variables at build time?"],"answer":[0,"Next.js inlines the value at build time into the JavaScript bundle, replacing all references to `process.env.NEXT_PUBLIC_[VARIABLE]` with a hard-coded value. For example, `process.env.NEXT_PUBLIC_ANALYTICS_ID` becomes the literal string value like `'abcdefghijk'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-next-public-environment-variables-at-build-time"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-next-public-environment-variables-at-build-time" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-next-public-environment-variables-at-build-time" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle NEXT_PUBLIC_ environment variables at build time?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js inlines the value at build time into the JavaScript bundle, replacing all references to <code>process.env.NEXT_PUBLIC_[VARIABLE]</code> with a hard-coded value. For example, <code>process.env.NEXT_PUBLIC_ANALYTICS_ID</code> becomes the literal string value like <code>'abcdefghijk'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15a7yL" prefix="r4008" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14616798142047687743"],"question":[0,"What security checks must be performed in Next.js Server Actions?"],"answer":[0,"Server Actions should always start by (1) validating that the current user is allowed to invoke the action (re-authorization), and (2) validating all argument integrity using tools like zod. Never trust arguments passed from the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-checks-must-be-performed-in-next-js-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-checks-must-be-performed-in-next-js-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-checks-must-be-performed-in-next-js-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security checks must be performed in Next.js Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions should always start by (1) validating that the current user is allowed to invoke the action (re-authorization), and (2) validating all argument integrity using tools like zod. Never trust arguments passed from the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VAybn" prefix="r4009" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15081298997578636212"],"question":[0,"In which Next.js version did Server Actions become a stable feature enabled by default?"],"answer":[0,"Next.js 14. For Next.js 13 and earlier, you must set `experimental.serverActions` to `true` in next.config.js to enable Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-server-actions-become-a-stable-feature-enabled-by-d"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-server-actions-become-a-stable-feature-enabled-by-d" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-server-actions-become-a-stable-feature-enabled-by-d" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did Server Actions become a stable feature enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 14. For Next.js 13 and earlier, you must set <code>experimental.serverActions</code> to <code>true</code> in next.config.js to enable Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="layouts-and-pages-type-safety-and-props" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Layouts and Pages > Type Safety and Props</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1vtLod" prefix="r4010" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"603374587512070871"],"question":[0,"What config option enables TypeScript IntelliSense for environment variables?"],"answer":[0,"experimental.typedEnv: true in next.config.ts. This provides type-checking and autocomplete for env vars."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-config-option-enables-typescript-intellisense-for-environment-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-config-option-enables-typescript-intellisense-for-environment-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-config-option-enables-typescript-intellisense-for-environment-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What config option enables TypeScript IntelliSense for environment variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>experimental.typedEnv: true in next.config.ts. This provides type-checking and autocomplete for env vars.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2niYWH" prefix="r4011" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"681020973055674483"],"question":[0,"What is the TypeScript type for params in Next.js route handlers?"],"answer":[0,"Promise<{ [key: string]: string | string[] }>. Route handlers receive params as the second parameter: async function GET(request: Request, { params }: { params: Promise<{ slug: string }> })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-for-params-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-for-params-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-for-params-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type for params in Next.js route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string | string[] }>. Route handlers receive params as the second parameter: async function GET(request: Request, { params }: { params: Promise<{ slug: string }> })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UYfMq" prefix="r4012" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1616744839771792897"],"question":[0,"What TypeScript type must the children prop be in Next.js layout components?"],"answer":[0,"React.ReactNode. This prop is required in all layout components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-must-the-children-prop-be-in-next-js-layout-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-must-the-children-prop-be-in-next-js-layout-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-must-the-children-prop-be-in-next-js-layout-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type must the children prop be in Next.js layout components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React.ReactNode. This prop is required in all layout components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UxK16" prefix="r4013" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1826708147052255921"],"question":[0,"What is the difference between Request and NextRequest types in route handlers?"],"answer":[0,"NextRequest is an extension of the Web Request API that provides additional features including easily accessing cookies and an extended URL object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-request-and-nextrequest-types-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-request-and-nextrequest-types-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-request-and-nextrequest-types-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between Request and NextRequest types in route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NextRequest is an extension of the Web Request API that provides additional features including easily accessing cookies and an extended URL object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHXL6X" prefix="r4014" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2813928916661856813"],"question":[0,"What TypeScript type should parallel route slots be in a layout component?"],"answer":[0,"React.ReactNode. Each slot (e.g., @analytics, @team) defined with the @folder convention is passed as a prop typed as React.ReactNode."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-should-parallel-route-slots-be-in-a-layout-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-should-parallel-route-slots-be-in-a-layout-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-should-parallel-route-slots-be-in-a-layout-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type should parallel route slots be in a layout component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React.ReactNode. Each slot (e.g., @analytics, @team) defined with the @folder convention is passed as a prop typed as React.ReactNode.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2czVrC" prefix="r4015" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3977315839821036679"],"question":[0,"How do you use the PageProps helper type in Next.js?"],"answer":[0,"Pass the route literal as a type parameter: PageProps<'/blog/[slug]'>. This provides strongly typed params and searchParams from the route literal with autocomplete support."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-the-pageprops-helper-type-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-the-pageprops-helper-type-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-the-pageprops-helper-type-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use the PageProps helper type in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pass the route literal as a type parameter: PageProps<'/blog/[slug]'>. This provides strongly typed params and searchParams from the route literal with autocomplete support.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iuFfL" prefix="r4016" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4448975579379112239"],"question":[0,"Where are Next.js type definitions written by next typegen?"],"answer":[0,"<distDir>/types, typically .next/dev/types or .next/types depending on the environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-next-js-type-definitions-written-by-next-typegen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-next-js-type-definitions-written-by-next-typegen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-next-js-type-definitions-written-by-next-typegen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are Next.js type definitions written by next typegen?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><distDir>/types, typically .next/dev/types or .next/types depending on the environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="QdgGf" prefix="r4017" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5853448932717901632"],"question":[0,"What config option enables static type-checking for Next.js navigation links?"],"answer":[0,"typedRoutes: true in next.config.ts. This prevents typos in next/link href props and next/navigation methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-config-option-enables-static-type-checking-for-next-js-navigation-links"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-config-option-enables-static-type-checking-for-next-js-navigation-links" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-config-option-enables-static-type-checking-for-next-js-navigation-links" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What config option enables static type-checking for Next.js navigation links?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>typedRoutes: true in next.config.ts. This prevents typos in next/link href props and next/navigation methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MzvlC" prefix="r4018" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6621868255492122418"],"question":[0,"Do Next.js layout components receive the searchParams prop?"],"answer":[0,"No. Layouts do not receive searchParams because a shared layout is not re-rendered during navigation, which could lead to stale searchParams between navigations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-layout-components-receive-the-searchparams-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-layout-components-receive-the-searchparams-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-layout-components-receive-the-searchparams-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js layout components receive the searchParams prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Layouts do not receive searchParams because a shared layout is not re-rendered during navigation, which could lead to stale searchParams between navigations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zujcgz" prefix="r4019" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6682227670485135558"],"question":[0,"What is the return type of the generateStaticParams function?"],"answer":[0,"An array of objects where each object contains the dynamic route segment names as keys with string or string[] values. The return type is inferred and doesn't require explicit annotation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-type-of-the-generatestaticparams-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-type-of-the-generatestaticparams-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-type-of-the-generatestaticparams-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return type of the generateStaticParams function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of objects where each object contains the dynamic route segment names as keys with string or string[] values. The return type is inferred and doesn't require explicit annotation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2m5v2u" prefix="r4020" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6939548298652872086"],"question":[0,"What must wrap a Client Component using useSearchParams?"],"answer":[0,"A Suspense boundary. The Client Component should be wrapped with a Suspense boundary to prevent stale values during partial rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-search-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-wrap-a-client-component-using-usesearchparams"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-wrap-a-client-component-using-usesearchparams" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-wrap-a-client-component-using-usesearchparams" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must wrap a Client Component using useSearchParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A Suspense boundary. The Client Component should be wrapped with a Suspense boundary to prevent stale values during partial rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-search-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CE2lU" prefix="r4021" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7102693475445664234"],"question":[0,"What is the TypeScript type of the reset prop in error.tsx?"],"answer":[0,"() => void. This function prompts the user to recover from the error by attempting to re-render the error boundary's contents."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-of-the-reset-prop-in-error-tsx"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-of-the-reset-prop-in-error-tsx" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-of-the-reset-prop-in-error-tsx" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type of the reset prop in error.tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>() => void. This function prompts the user to recover from the error by attempting to re-render the error boundary's contents.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuKj1D" prefix="r4022" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7233765947647190681"],"question":[0,"Do loading.tsx and not-found.tsx components accept any props in Next.js?"],"answer":[0,"No. Both loading.tsx and not-found.tsx components do not accept any props. They are simple React components with no parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"do-loading-tsx-and-not-found-tsx-components-accept-any-props-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-loading-tsx-and-not-found-tsx-components-accept-any-props-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-loading-tsx-and-not-found-tsx-components-accept-any-props-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do loading.tsx and not-found.tsx components accept any props in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Both loading.tsx and not-found.tsx components do not accept any props. They are simple React components with no parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1upMSe" prefix="r4023" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7505631476669678575"],"question":[0,"What file is auto-generated by Next.js and should be added to .gitignore?"],"answer":[0,"next-env.d.ts. This file is regenerated by next dev, next build, or next typegen."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-is-auto-generated-by-next-js-and-should-be-added-to-gitignore"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-is-auto-generated-by-next-js-and-should-be-added-to-gitignore" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-is-auto-generated-by-next-js-and-should-be-added-to-gitignore" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file is auto-generated by Next.js and should be added to .gitignore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next-env.d.ts. This file is regenerated by next dev, next build, or next typegen.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2i8BxA" prefix="r4024" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7758269791203369414"],"question":[0,"Does LayoutProps include information about parallel route slots?"],"answer":[0,"Yes. LayoutProps includes props for layout components, including children and any named slots (e.g., folders like @analytics)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"does-layoutprops-include-information-about-parallel-route-slots"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-layoutprops-include-information-about-parallel-route-slots" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-layoutprops-include-information-about-parallel-route-slots" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does LayoutProps include information about parallel route slots?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. LayoutProps includes props for layout components, including children and any named slots (e.g., folders like @analytics).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zgz9vb" prefix="r4025" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8224525356176678921"],"question":[0,"What client-side hook returns typed params in Next.js Client Components?"],"answer":[0,"useParams<{ tag: string; item: string }>(). This Client Component hook reads route dynamic params filled in by the current URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-client-side-hook-returns-typed-params-in-next-js-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-client-side-hook-returns-typed-params-in-next-js-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-client-side-hook-returns-typed-params-in-next-js-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What client-side hook returns typed params in Next.js Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useParams<{ tag: string; item: string }>(). This Client Component hook reads route dynamic params filled in by the current URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rBDBM" prefix="r4026" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8338228348802259373"],"question":[0,"What is the TypeScript type of the error prop in error.tsx?"],"answer":[0,"Error & { digest?: string }. The digest property contains an automatically generated hash that can match the error in server-side logs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-of-the-error-prop-in-error-tsx"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-of-the-error-prop-in-error-tsx" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-of-the-error-prop-in-error-tsx" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type of the error prop in error.tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error & { digest?: string }. The digest property contains an automatically generated hash that can match the error in server-side logs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1cytMJ" prefix="r4027" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8780363974282866503"],"question":[0,"Is there a NextPage type in the Next.js App Router?"],"answer":[0,"No. In the App Router there is no NextPage type. A page is just a React Server Component that may be async, and you must type the props yourself."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-nextpage-type-in-the-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-nextpage-type-in-the-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-nextpage-type-in-the-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a NextPage type in the Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. In the App Router there is no NextPage type. A page is just a React Server Component that may be async, and you must type the props yourself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14tvov" prefix="r4028" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9255994093089347127"],"question":[0,"What type helper can be used for route handler context parameters?"],"answer":[0,"RouteContext<'/route'>. Example: async function GET(_req: NextRequest, ctx: RouteContext<'/users/[id]'>). This is a globally available helper."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-helper-can-be-used-for-route-handler-context-parameters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-helper-can-be-used-for-route-handler-context-parameters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-helper-can-be-used-for-route-handler-context-parameters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type helper can be used for route handler context parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>RouteContext<'/route'>. Example: async function GET(_req: NextRequest, ctx: RouteContext<'/users/[id]'>). This is a globally available helper.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sjhxX" prefix="r4029" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9962757425075932571"],"question":[0,"What codemod helps migrate to async params in Next.js 15?"],"answer":[0,"next-async-request-api codemod. However, it cannot cover all cases, so manual adjustments may be needed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-helps-migrate-to-async-params-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-helps-migrate-to-async-params-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-helps-migrate-to-async-params-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod helps migrate to async params in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next-async-request-api codemod. However, it cannot cover all cases, so manual adjustments may be needed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ojhdE" prefix="r4030" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10704382703902737658"],"question":[0,"In which Next.js version did params and searchParams become asynchronous promises?"],"answer":[0,"v15.0.0-RC. Prior versions (v14 and earlier) treated these as synchronous props."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-params-and-searchparams-become-asynchronous-promise"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-params-and-searchparams-become-asynchronous-promise" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-params-and-searchparams-become-asynchronous-promise" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did params and searchParams become asynchronous promises?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v15.0.0-RC. Prior versions (v14 and earlier) treated these as synchronous props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nQX4" prefix="r4031" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10760024652237490033"],"question":[0,"What TypeScript types are imported from 'next' for the generateMetadata function?"],"answer":[0,"Metadata (the return type) and ResolvingMetadata (the type for the parent parameter). The function signature is: generateMetadata(props, parent: ResolvingMetadata): Promise<Metadata>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-types-are-imported-from-next-for-the-generatemetadata-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-types-are-imported-from-next-for-the-generatemetadata-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-types-are-imported-from-next-for-the-generatemetadata-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript types are imported from 'next' for the generateMetadata function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Metadata (the return type) and ResolvingMetadata (the type for the parent parameter). The function signature is: generateMetadata(props, parent: ResolvingMetadata): Promise<Metadata></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZubBpo" prefix="r4032" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11004555203853351824"],"question":[0,"What command generates TypeScript types in Next.js without running dev or build?"],"answer":[0,"next typegen. This command generates type definitions including route information and is useful for CI/CD type-checking workflows."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-typescript-types-in-next-js-without-running-dev-or-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-typescript-types-in-next-js-without-running-dev-or-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-typescript-types-in-next-js-without-running-dev-or-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates TypeScript types in Next.js without running dev or build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next typegen. This command generates type definitions including route information and is useful for CI/CD type-checking workflows.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15hNhy" prefix="r4033" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11011729075214457467"],"question":[0,"Must error.tsx be a Client Component?"],"answer":[0,"Yes. error.tsx must include the 'use client' directive at the top of the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-tsx-be-a-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-tsx-be-a-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-tsx-be-a-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.tsx be a Client Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. error.tsx must include the 'use client' directive at the top of the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DGI35" prefix="r4034" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12236860311931850097"],"question":[0,"What is the TypeScript type of the params prop in Next.js page components?"],"answer":[0,"Promise<{ [key: string]: string | string[] }>. Since v15.0.0-RC, params is a promise that must be awaited before accessing its properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-of-the-params-prop-in-next-js-page-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-of-the-params-prop-in-next-js-page-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-of-the-params-prop-in-next-js-page-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type of the params prop in Next.js page components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string | string[] }>. Since v15.0.0-RC, params is a promise that must be awaited before accessing its properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZyCUY1" prefix="r4035" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13472014264457461282"],"question":[0,"What props are automatically passed to page.tsx in Next.js App Router?"],"answer":[0,"Only params and searchParams. Next.js does not allow custom props like children - page.tsx is tightly coupled with the routing system."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-props-are-automatically-passed-to-page-tsx-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-props-are-automatically-passed-to-page-tsx-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-props-are-automatically-passed-to-page-tsx-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What props are automatically passed to page.tsx in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only params and searchParams. Next.js does not allow custom props like children - page.tsx is tightly coupled with the routing system.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13FS4L" prefix="r4036" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14452293302750868530"],"question":[0,"How do you access async params in a Client Component in Next.js?"],"answer":[0,"Use React's use() hook to unwrap the Promise. You must pass the params prop from the server component and call use(params) in the client component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-access-async-params-in-a-client-component-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-access-async-params-in-a-client-component-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-access-async-params-in-a-client-component-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you access async params in a Client Component in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use React's use() hook to unwrap the Promise. You must pass the params prop from the server component and call use(params) in the client component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NR9Do" prefix="r4037" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15039655441849925111"],"question":[0,"What is the TypeScript type of the searchParams prop in Next.js page components?"],"answer":[0,"Promise<{ [key: string]: string | string[] | undefined }>. The undefined option accounts for query parameters that may not be present in the URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-of-the-searchparams-prop-in-next-js-page-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-of-the-searchparams-prop-in-next-js-page-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-of-the-searchparams-prop-in-next-js-page-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type of the searchParams prop in Next.js page components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise<{ [key: string]: string | string[] | undefined }>. The undefined option accounts for query parameters that may not be present in the URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="linking-and-navigating-link-component-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Linking and Navigating > Link Component Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z17MvYy" prefix="r4038" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"631790867207541856"],"question":[0,"What is the Router Cache duration for static routes in Next.js App Router?"],"answer":[0,"For static routes or routes with prefetch={true}, the Router Cache duration is 5 minutes. This is the time window where you can instantly navigate back to the route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-router-cache-duration-for-static-routes-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-router-cache-duration-for-static-routes-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-router-cache-duration-for-static-routes-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Router Cache duration for static routes in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For static routes or routes with prefetch={true}, the Router Cache duration is 5 minutes. This is the time window where you can instantly navigate back to the route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mNjE" prefix="r4039" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1453297082974095988"],"question":[0,"What is the default value of the `prefetch` prop on the Next.js Link component in the App Router?"],"answer":[0,"The default value is `null` or `\"auto\"`. With this default, prefetch behavior depends on whether the route is static or dynamic. For static routes, the full route will be prefetched. For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `prefetch` prop on the Next.js Link component in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>null</code> or <code>"auto"</code>. With this default, prefetch behavior depends on whether the route is static or dynamic. For static routes, the full route will be prefetched. For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1valE7" prefix="r4040" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1518154660879255045"],"question":[0,"What is the default value of the `shallow` prop on the Next.js Link component in Pages Router?"],"answer":[0,"The default value is `false`. When true, shallow routing updates the path of the current page without rerunning getStaticProps, getServerSideProps, or getInitialProps."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-shallow-prop-on-the-next-js-link-component-in-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-shallow-prop-on-the-next-js-link-component-in-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-shallow-prop-on-the-next-js-link-component-in-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `shallow` prop on the Next.js Link component in Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>false</code>. When true, shallow routing updates the path of the current page without rerunning getStaticProps, getServerSideProps, or getInitialProps.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EcaUd" prefix="r4041" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3970517552232246840"],"question":[0,"What is the default value of the `scroll` prop on the Next.js Link component?"],"answer":[0,"The default value is `true`. When true, Next.js maintains scroll position during navigation and scrolls to top only if the new page isn't visible in the viewport. When false, Next.js won't attempt scrolling to page elements."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-scroll-prop-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-scroll-prop-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-scroll-prop-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `scroll` prop on the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>true</code>. When true, Next.js maintains scroll position during navigation and scrolls to top only if the new page isn't visible in the viewport. When false, Next.js won't attempt scrolling to page elements.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hUekv" prefix="r4042" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4203023851755289212"],"question":[0,"In the Pages Router, what happens with prefetch={false} when a user hovers over a Link?"],"answer":[0,"In the Pages Router, setting prefetch={false} means prefetching will not happen when entering the viewport, but prefetching will still occur on hover. This differs from the App Router where prefetch={false} disables prefetching entirely."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"in-the-pages-router-what-happens-with-prefetch-false-when-a-user-hovers-over-a-l"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-the-pages-router-what-happens-with-prefetch-false-when-a-user-hovers-over-a-l" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-the-pages-router-what-happens-with-prefetch-false-when-a-user-hovers-over-a-l" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In the Pages Router, what happens with prefetch={false} when a user hovers over a Link?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the Pages Router, setting prefetch={false} means prefetching will not happen when entering the viewport, but prefetching will still occur on hover. This differs from the App Router where prefetch={false} disables prefetching entirely.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vONxv" prefix="r4043" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4296179355636842548"],"question":[0,"When does the `onNavigate` handler fire versus the `onClick` handler on a Next.js Link component?"],"answer":[0,"`onClick` executes for all click events. `onNavigate` only executes during client-side, same-origin navigation. It will NOT fire when: (1) modifier keys are used (Ctrl/Cmd/Shift + click), (2) clicking external URLs, (3) clicking links with download attribute."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-onnavigate-handler-fire-versus-the-onclick-handler-on-a-next-js-li"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-onnavigate-handler-fire-versus-the-onclick-handler-on-a-next-js-li" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-onnavigate-handler-fire-versus-the-onclick-handler-on-a-next-js-li" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the `onNavigate` handler fire versus the `onClick` handler on a Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>onClick</code> executes for all click events. <code>onNavigate</code> only executes during client-side, same-origin navigation. It will NOT fire when: (1) modifier keys are used (Ctrl/Cmd/Shift + click), (2) clicking external URLs, (3) clicking links with download attribute.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zhjh17" prefix="r4044" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5004666304264627093"],"question":[0,"What is the default value of the `replace` prop on the Next.js Link component?"],"answer":[0,"The default value is `false`. When true, next/link will replace the current history state instead of adding a new URL into the browser's history stack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-replace-prop-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-replace-prop-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-replace-prop-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `replace` prop on the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>false</code>. When true, next/link will replace the current history state instead of adding a new URL into the browser's history stack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7UoN4" prefix="r4045" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6216309981860927120"],"question":[0,"What was the purpose of the `as` prop before Next.js 9.5.3?"],"answer":[0,"Before Next.js 9.5.3, the `as` prop was used as an optional decorator for the path shown in the browser URL bar, particularly for dynamic routes. It specified what URL would display while href specified the actual page route (e.g., href=\"/blog/[id]\" as=\"/blog/123\")."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-purpose-of-the-as-prop-before-next-js-9-5-3"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-purpose-of-the-as-prop-before-next-js-9-5-3" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-purpose-of-the-as-prop-before-next-js-9-5-3" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the purpose of the `as` prop before Next.js 9.5.3?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Before Next.js 9.5.3, the <code>as</code> prop was used as an optional decorator for the path shown in the browser URL bar, particularly for dynamic routes. It specified what URL would display while href specified the actual page route (e.g., href="/blog/[id]" as="/blog/123").</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26My9F" prefix="r4046" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7916837429569101505"],"question":[0,"Starting with which version of Next.js are the `passHref` and `legacyBehavior` props no longer supported?"],"answer":[0,"Starting with Next.js version 16, the passHref and legacyBehavior props are no longer supported for the Link component. Next.js 15.5 introduced deprecation warnings for these props to help developers prepare for their removal."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/80179"]]],"topic":[0,"nextjs"],"slug":[0,"starting-with-which-version-of-next-js-are-the-passhref-and-legacybehavior-props"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="starting-with-which-version-of-next-js-are-the-passhref-and-legacybehavior-props" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#starting-with-which-version-of-next-js-are-the-passhref-and-legacybehavior-props" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Starting with which version of Next.js are the `passHref` and `legacyBehavior` props no longer supported?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting with Next.js version 16, the passHref and legacyBehavior props are no longer supported for the Link component. Next.js 15.5 introduced deprecation warnings for these props to help developers prepare for their removal.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/80179" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hjebM" prefix="r4047" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8161258381323516991"],"question":[0,"What codemod is available to help upgrade Link components to Next.js 13?"],"answer":[0,"Next.js provides the `new-link` codemod to upgrade your links to Next.js 13 format. This automates the migration from the old pattern (wrapping <a> tags) to the new simplified pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-is-available-to-help-upgrade-link-components-to-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-is-available-to-help-upgrade-link-components-to-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-is-available-to-help-upgrade-link-components-to-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod is available to help upgrade Link components to Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js provides the <code>new-link</code> codemod to upgrade your links to Next.js 13 format. This automates the migration from the old pattern (wrapping <a> tags) to the new simplified pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfaeRd" prefix="r4048" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8185344282745597721"],"question":[0,"What happens when you set `scroll={false}` on a Next.js Link with a hash (#) in the href?"],"answer":[0,"When there is a hash defined, it will still scroll to the specific id like a normal <a> tag, even with scroll={false}. However, there have been reported bugs where scroll={false} doesn't consistently work with hash anchors across different Next.js versions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-set-scroll-false-on-a-next-js-link-with-a-hash-in-the-href"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-set-scroll-false-on-a-next-js-link-with-a-hash-in-the-href" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-set-scroll-false-on-a-next-js-link-with-a-hash-in-the-href" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you set `scroll={false}` on a Next.js Link with a hash (#) in the href?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When there is a hash defined, it will still scroll to the specific id like a normal <a> tag, even with scroll={false}. However, there have been reported bugs where scroll={false} doesn't consistently work with hash anchors across different Next.js versions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="pimFy" prefix="r4049" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8277801357434067886"],"question":[0,"What standard HTML anchor attributes can be passed to the Next.js Link component?"],"answer":[0,"Standard <a> tag attributes such as className, target=\"_blank\", and other HTML anchor attributes can be added to <Link> as props and will be passed to the underlying <a> element. In Next.js 13+, these can be added directly to the Link component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-standard-html-anchor-attributes-can-be-passed-to-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-standard-html-anchor-attributes-can-be-passed-to-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-standard-html-anchor-attributes-can-be-passed-to-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What standard HTML anchor attributes can be passed to the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Standard <a> tag attributes such as className, target="_blank", and other HTML anchor attributes can be added to <Link> as props and will be passed to the underlying <a> element. In Next.js 13+, these can be added directly to the Link component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqfIm5" prefix="r4050" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8878333966902516844"],"question":[0,"What limitation exists for shallow routing with the Next.js Link component?"],"answer":[0,"Shallow routing only works for same page URL changes. You cannot use shallow routing to navigate between different pages while avoiding data fetching methods. It's primarily useful for updating query parameters or hash fragments on the same page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-limitation-exists-for-shallow-routing-with-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-limitation-exists-for-shallow-routing-with-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-limitation-exists-for-shallow-routing-with-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What limitation exists for shallow routing with the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Shallow routing only works for same page URL changes. You cannot use shallow routing to navigate between different pages while avoiding data fetching methods. It's primarily useful for updating query parameters or hash fragments on the same page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EoXW3" prefix="r4051" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9439388572050836264"],"question":[0,"Since which version of Next.js is the `as` prop no longer required for dynamic routes?"],"answer":[0,"Since Next.js 9.5.3, the `as` prop is no longer required for dynamic routes. The framework automatically resolves dynamic routes without requiring developers to explicitly provide both the href and as props."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/8207"]]],"topic":[0,"nextjs"],"slug":[0,"since-which-version-of-next-js-is-the-as-prop-no-longer-required-for-dynamic-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="since-which-version-of-next-js-is-the-as-prop-no-longer-required-for-dynamic-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#since-which-version-of-next-js-is-the-as-prop-no-longer-required-for-dynamic-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Since which version of Next.js is the `as` prop no longer required for dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since Next.js 9.5.3, the <code>as</code> prop is no longer required for dynamic routes. The framework automatically resolves dynamic routes without requiring developers to explicitly provide both the href and as props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/8207" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="uxrzD" prefix="r4052" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9482339329821125554"],"question":[0,"What formats can the `href` prop accept on the Next.js Link component?"],"answer":[0,"The href prop accepts: (1) A string representing the path or URL, or (2) An object with `pathname` and `query` properties, e.g., { pathname: '/about', query: { name: 'test' } }. Hash links with # can also be appended for scrolling to specific IDs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-formats-can-the-href-prop-accept-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-formats-can-the-href-prop-accept-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-formats-can-the-href-prop-accept-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What formats can the `href` prop accept on the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The href prop accepts: (1) A string representing the path or URL, or (2) An object with <code>pathname</code> and <code>query</code> properties, e.g., { pathname: '/about', query: { name: 'test' } }. Hash links with # can also be appended for scrolling to specific IDs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mDaPR" prefix="r4053" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9488600777515456940"],"question":[0,"How did the Next.js Link component usage change between Next.js 12 and Next.js 13?"],"answer":[0,"In Next.js 12 and earlier (Pages Router), you needed to manually add an <a> tag as a child: <Link href=\"/about\"><a>About</a></Link>. In Next.js 13+ (App Router), Link always renders <a> automatically and you can pass props directly: <Link href=\"/about\">About</Link>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration"]]],"topic":[0,"nextjs"],"slug":[0,"how-did-the-next-js-link-component-usage-change-between-next-js-12-and-next-js-1"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-did-the-next-js-link-component-usage-change-between-next-js-12-and-next-js-1" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-did-the-next-js-link-component-usage-change-between-next-js-12-and-next-js-1" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How did the Next.js Link component usage change between Next.js 12 and Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 12 and earlier (Pages Router), you needed to manually add an <a> tag as a child: <Link href="/about"><a>About</a></Link>. In Next.js 13+ (App Router), Link always renders <a> automatically and you can pass props directly: <Link href="/about">About</Link>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/app-router-migration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jz60" prefix="r4054" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9533653082203768175"],"question":[0,"Can window.history.replaceState() be used with Next.js Router, and are there any integration features?"],"answer":[0,"Yes, Next.js allows you to use the native window.history.pushState and window.history.replaceState methods to update the browser's history stack without reloading the page. These calls integrate into the Next.js Router, allowing you to sync with usePathname and useSearchParams."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"can-window-history-replacestate-be-used-with-next-js-router-and-are-there-any-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-window-history-replacestate-be-used-with-next-js-router-and-are-there-any-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-window-history-replacestate-be-used-with-next-js-router-and-are-there-any-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can window.history.replaceState() be used with Next.js Router, and are there any integration features?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js allows you to use the native window.history.pushState and window.history.replaceState methods to update the browser's history stack without reloading the page. These calls integrate into the Next.js Router, allowing you to sync with usePathname and useSearchParams.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Ylfip" prefix="r4055" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10577812527534935636"],"question":[0,"What minimum Next.js version introduced built-in i18n support for the Pages Router?"],"answer":[0,"Next.js v10.0.0 introduced built-in support for internationalized (i18n) routing. You can provide a list of locales, the default locale, and domain-specific locales in next.config.js, and Next.js will automatically handle the routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-minimum-next-js-version-introduced-built-in-i18n-support-for-the-pages-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-minimum-next-js-version-introduced-built-in-i18n-support-for-the-pages-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-minimum-next-js-version-introduced-built-in-i18n-support-for-the-pages-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What minimum Next.js version introduced built-in i18n support for the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js v10.0.0 introduced built-in support for internationalized (i18n) routing. You can provide a list of locales, the default locale, and domain-specific locales in next.config.js, and Next.js will automatically handle the routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zuu7ye" prefix="r4056" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10608135008012182333"],"question":[0,"What are the accepted values for the `prefetch` prop on the Next.js Link component in the App Router?"],"answer":[0,"The prefetch prop accepts: (1) `null` or `\"auto\"` (default) - behavior depends on static vs dynamic routes; (2) `true` - full route prefetched for both static and dynamic routes; (3) `false` - prefetching never happens on viewport entry or hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-accepted-values-for-the-prefetch-prop-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-accepted-values-for-the-prefetch-prop-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-accepted-values-for-the-prefetch-prop-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the accepted values for the `prefetch` prop on the Next.js Link component in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The prefetch prop accepts: (1) <code>null</code> or <code>"auto"</code> (default) - behavior depends on static vs dynamic routes; (2) <code>true</code> - full route prefetched for both static and dynamic routes; (3) <code>false</code> - prefetching never happens on viewport entry or hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCvbEe" prefix="r4057" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10757926385745550716"],"question":[0,"What is the purpose of the `locale` prop on the Next.js Link component in Pages Router?"],"answer":[0,"The locale prop is used to navigate users to different versions of a webpage based on the user's preferred locale (language and region). When false, href must include the locale as the default behavior (automatically prepending the active locale) is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-locale-prop-on-the-next-js-link-component-in-pages-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-locale-prop-on-the-next-js-link-component-in-pages-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-locale-prop-on-the-next-js-link-component-in-pages-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the `locale` prop on the Next.js Link component in Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The locale prop is used to navigate users to different versions of a webpage based on the user's preferred locale (language and region). When false, href must include the locale as the default behavior (automatically prepending the active locale) is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eTlU3" prefix="r4058" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11211895647445284565"],"question":[0,"Does the Next.js Link component's scroll behavior check all elements when deciding whether to scroll?"],"answer":[0,"No, when scroll={true} (default), Next.js checks for scrollable, visible elements and bypasses sticky, fixed, and non-visible elements when determining scroll behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-next-js-link-component-s-scroll-behavior-check-all-elements-when-decidi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-next-js-link-component-s-scroll-behavior-check-all-elements-when-decidi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-next-js-link-component-s-scroll-behavior-check-all-elements-when-decidi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Next.js Link component's scroll behavior check all elements when deciding whether to scroll?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, when scroll={true} (default), Next.js checks for scrollable, visible elements and bypasses sticky, fixed, and non-visible elements when determining scroll behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23oLwY" prefix="r4059" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11488167040195863111"],"question":[0,"What is the Router Cache duration for dynamic routes in Next.js App Router?"],"answer":[0,"For routes using dynamic rendering (using cookies, headers, or export const dynamic = 'force-dynamic'), the Router Cache duration is 30 seconds. A minimum of 30 seconds is enforced to ensure prefetched links remain usable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-router-cache-duration-for-dynamic-routes-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-router-cache-duration-for-dynamic-routes-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-router-cache-duration-for-dynamic-routes-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Router Cache duration for dynamic routes in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For routes using dynamic rendering (using cookies, headers, or export const dynamic = 'force-dynamic'), the Router Cache duration is 30 seconds. A minimum of 30 seconds is enforced to ensure prefetched links remain usable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NM6BO" prefix="r4060" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11686842571879613450"],"question":[0,"What is the default value of the `prefetch` prop on the Next.js Link component in the Pages Router?"],"answer":[0,"The default value is `true`. The full route and its data will be prefetched when the component enters the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `prefetch` prop on the Next.js Link component in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>true</code>. The full route and its data will be prefetched when the component enters the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1keUNe" prefix="r4061" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11725023250331723221"],"question":[0,"When does prefetching occur for a Next.js Link component?"],"answer":[0,"Prefetching happens when a <Link /> component enters the user's viewport (initially or through scroll). Additionally, if prefetched data has expired by the time the user hovers over a Link, Next.js will attempt to prefetch it again."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-prefetching-occur-for-a-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-prefetching-occur-for-a-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-prefetching-occur-for-a-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does prefetching occur for a Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching happens when a <Link /> component enters the user's viewport (initially or through scroll). Additionally, if prefetched data has expired by the time the user hovers over a Link, Next.js will attempt to prefetch it again.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VSeIQ" prefix="r4062" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12243540399568680205"],"question":[0,"What was the default value of the `passHref` prop in Next.js Link component before its deprecation?"],"answer":[0,"The default value was `false`. When set to true, passHref forces the Link component to send the href prop to its child, which was important when the child of Link was a custom component wrapping an anchor tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-default-value-of-the-passhref-prop-in-next-js-link-component-before"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-default-value-of-the-passhref-prop-in-next-js-link-component-before" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-default-value-of-the-passhref-prop-in-next-js-link-component-before" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the default value of the `passHref` prop in Next.js Link component before its deprecation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value was <code>false</code>. When set to true, passHref forces the Link component to send the href prop to its child, which was important when the child of Link was a custom component wrapping an anchor tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11fUxN" prefix="r4063" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12320146980807066946"],"question":[0,"When using `legacyBehavior` with a functional component child, what additional requirement exists?"],"answer":[0,"If the child of Link is a functional component, in addition to using passHref and legacyBehavior, you must wrap the component in React.forwardRef so that Next.js can properly pass the ref to the underlying anchor element."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-legacybehavior-with-a-functional-component-child-what-additional-requ"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-legacybehavior-with-a-functional-component-child-what-additional-requ" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-legacybehavior-with-a-functional-component-child-what-additional-requ" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using `legacyBehavior` with a functional component child, what additional requirement exists?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If the child of Link is a functional component, in addition to using passHref and legacyBehavior, you must wrap the component in React.forwardRef so that Next.js can properly pass the ref to the underlying anchor element.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2uhS8E" prefix="r4064" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13980160456686940411"],"question":[0,"For dynamic routes in the App Router, what gets prefetched when using the default prefetch setting?"],"answer":[0,"For dynamic routes with default prefetch (`null` or `\"auto\"`), the partial route down to the nearest segment with a loading.js boundary will be prefetched. This reduces the cost of prefetching the whole route dynamically and allows instant loading states."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"for-dynamic-routes-in-the-app-router-what-gets-prefetched-when-using-the-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-dynamic-routes-in-the-app-router-what-gets-prefetched-when-using-the-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-dynamic-routes-in-the-app-router-what-gets-prefetched-when-using-the-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For dynamic routes in the App Router, what gets prefetched when using the default prefetch setting?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For dynamic routes with default prefetch (<code>null</code> or <code>"auto"</code>), the partial route down to the nearest segment with a loading.js boundary will be prefetched. This reduces the cost of prefetching the whole route dynamically and allows instant loading states.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="283jj" prefix="r4065" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14433792099098164119"],"question":[0,"In which version of Next.js was the `onNavigate` prop added to the Link component?"],"answer":[0,"The `onNavigate` prop was added in Next.js version 15.3.0, released on April 9, 2025."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-3"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-of-next-js-was-the-onnavigate-prop-added-to-the-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-of-next-js-was-the-onnavigate-prop-added-to-the-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-of-next-js-was-the-onnavigate-prop-added-to-the-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version of Next.js was the `onNavigate` prop added to the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>onNavigate</code> prop was added in Next.js version 15.3.0, released on April 9, 2025.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-3" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="routing-internationalization" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Routing > Internationalization</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="gVEqw" prefix="r4066" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"830730403427290216"],"question":[0,"What are the three locale-related properties available in the context parameter of getServerSideProps?"],"answer":[0,"The three properties are: `locale` (currently active locale), `locales` (all configured locales), and `defaultLocale` (configured default locale)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-locale-related-properties-available-in-the-context-parameter-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-locale-related-properties-available-in-the-context-parameter-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-locale-related-properties-available-in-the-context-parameter-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three locale-related properties available in the context parameter of getServerSideProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three properties are: <code>locale</code> (currently active locale), <code>locales</code> (all configured locales), and <code>defaultLocale</code> (configured default locale).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gS8Ap" prefix="r4067" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1260324648986540759"],"question":[0,"How do you pre-generate static routes for multiple locales in the App Router?"],"answer":[0,"Use the `generateStaticParams` function to return an array of locale objects, e.g., `return [{ lang: 'en-US' }, { lang: 'de' }]`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-pre-generate-static-routes-for-multiple-locales-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-pre-generate-static-routes-for-multiple-locales-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-pre-generate-static-routes-for-multiple-locales-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you pre-generate static routes for multiple locales in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>generateStaticParams</code> function to return an array of locale objects, e.g., <code>return [{ lang: 'en-US' }, { lang: 'de' }]</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11rGbK" prefix="r4068" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1372441026230450476"],"question":[0,"What folder structure pattern must be used for internationalization in the App Router?"],"answer":[0,"All special files must be nested under `app/[lang]` (or `app/[locale]`), which enables the Next.js router to dynamically handle different locales and forward the lang parameter to every layout and page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-folder-structure-pattern-must-be-used-for-internationalization-in-the-app-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-folder-structure-pattern-must-be-used-for-internationalization-in-the-app-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-folder-structure-pattern-must-be-used-for-internationalization-in-the-app-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What folder structure pattern must be used for internationalization in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All special files must be nested under <code>app/[lang]</code> (or <code>app/[locale]</code>), which enables the Next.js router to dynamically handle different locales and forward the lang parameter to every layout and page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eFz0F" prefix="r4069" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1797724408166986243"],"question":[0,"What is the priority order for locale detection in Next.js Pages Router when a user visits the application root?"],"answer":[0,"The priority order is: 1) NEXT_LOCALE cookie (highest priority), 2) Accept-Language header, 3) Default locale (fallback)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-priority-order-for-locale-detection-in-next-js-pages-router-when-a-u"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-priority-order-for-locale-detection-in-next-js-pages-router-when-a-u" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-priority-order-for-locale-detection-in-next-js-pages-router-when-a-u" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the priority order for locale detection in Next.js Pages Router when a user visits the application root?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The priority order is: 1) NEXT_LOCALE cookie (highest priority), 2) Accept-Language header, 3) Default locale (fallback).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pGOLs" prefix="r4070" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2465074460534191993"],"question":[0,"What router property should you avoid using until isReady is true to prevent client-server mismatch?"],"answer":[0,"The `asPath` property should be avoided until the `isReady` field is true to prevent mismatch between client and server rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-router-property-should-you-avoid-using-until-isready-is-true-to-prevent-cli"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-router-property-should-you-avoid-using-until-isready-is-true-to-prevent-cli" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-router-property-should-you-avoid-using-until-isready-is-true-to-prevent-cli" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What router property should you avoid using until isReady is true to prevent client-server mismatch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>asPath</code> property should be avoided until the <code>isReady</code> field is true to prevent mismatch between client and server rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bR5YO" prefix="r4071" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3124787087943656088"],"question":[0,"In domain routing configuration, what are the required fields for each domain object?"],"answer":[0,"Each domain object requires a `domain` field and a `defaultLocale` field. Optionally, it can include a `locales` array and an `http` field."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-domain-routing-configuration-what-are-the-required-fields-for-each-domain-obj"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-domain-routing-configuration-what-are-the-required-fields-for-each-domain-obj" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-domain-routing-configuration-what-are-the-required-fields-for-each-domain-obj" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In domain routing configuration, what are the required fields for each domain object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each domain object requires a <code>domain</code> field and a <code>defaultLocale</code> field. Optionally, it can include a <code>locales</code> array and an <code>http</code> field.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1o0uUt" prefix="r4072" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3301256535132712921"],"question":[0,"In which version of Next.js was built-in support for internationalized (i18n) routing introduced?"],"answer":[0,"Next.js has built-in support for internationalized (i18n) routing since v10.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-of-next-js-was-built-in-support-for-internationalized-i18n-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-of-next-js-was-built-in-support-for-internationalized-i18n-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-of-next-js-was-built-in-support-for-internationalized-i18n-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version of Next.js was built-in support for internationalized (i18n) routing introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js has built-in support for internationalized (i18n) routing since v10.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tyaR4" prefix="r4073" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3571983197111594452"],"question":[0,"What is the format of UTS Locale Identifiers used in Next.js?"],"answer":[0,"A Locale Identifier is made up of language-region-script separated by dashes (e.g., `en-US`, `nl-NL`), where region and script are optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-format-of-uts-locale-identifiers-used-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-format-of-uts-locale-identifiers-used-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-format-of-uts-locale-identifiers-used-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the format of UTS Locale Identifiers used in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A Locale Identifier is made up of language-region-script separated by dashes (e.g., <code>en-US</code>, <code>nl-NL</code>), where region and script are optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pM8RP" prefix="r4074" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3978927659173712156"],"question":[0,"Does Next.js automatically add the lang attribute to the <html> tag when using Pages Router i18n?"],"answer":[0,"Yes, Next.js automatically adds the lang attribute to the `<html>` tag when using built-in i18n routing support."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-add-the-lang-attribute-to-the-html-tag-when-using-pag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-add-the-lang-attribute-to-the-html-tag-when-using-pag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-add-the-lang-attribute-to-the-html-tag-when-using-pag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically add the lang attribute to the <html> tag when using Pages Router i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js automatically adds the lang attribute to the <code><html></code> tag when using built-in i18n routing support.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqvJCG" prefix="r4075" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4756561202859507170"],"question":[0,"How does Next.js handle locale fallback for region-specific locales that aren't configured?"],"answer":[0,"If a user's locale (e.g., `nl-BE`) is not listed in the configuration, they will be redirected to the language-only variant if available (e.g., `nl`), or to the default locale otherwise."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-locale-fallback-for-region-specific-locales-that-aren-t-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-locale-fallback-for-region-specific-locales-that-aren-t-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-locale-fallback-for-region-specific-locales-that-aren-t-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle locale fallback for region-specific locales that aren't configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a user's locale (e.g., <code>nl-BE</code>) is not listed in the configuration, they will be redirected to the language-only variant if available (e.g., <code>nl</code>), or to the default locale otherwise.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20NnIK" prefix="r4076" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4952189997427532277"],"question":[0,"What are the three locale-related properties available in the context parameter of getStaticProps?"],"answer":[0,"The three properties are: `locale` (currently active locale), `locales` (all configured locales), and `defaultLocale` (configured default locale)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-locale-related-properties-available-in-the-context-parameter-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-locale-related-properties-available-in-the-context-parameter-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-locale-related-properties-available-in-the-context-parameter-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three locale-related properties available in the context parameter of getStaticProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three properties are: <code>locale</code> (currently active locale), <code>locales</code> (all configured locales), and <code>defaultLocale</code> (configured default locale).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWGrOG" prefix="r4077" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5068141073107901218"],"question":[0,"What are the two main routing strategies supported by Next.js for internationalization?"],"answer":[0,"Next.js supports two routing strategies: Sub-path Routing (e.g., `/fr/products`) and Domain-based Routing (e.g., `my-site.fr/products`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-routing-strategies-supported-by-next-js-for-internationali"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-routing-strategies-supported-by-next-js-for-internationali" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-routing-strategies-supported-by-next-js-for-internationali" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main routing strategies supported by Next.js for internationalization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports two routing strategies: Sub-path Routing (e.g., <code>/fr/products</code>) and Domain-based Routing (e.g., <code>my-site.fr/products</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eFmVx" prefix="r4078" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5134497813615040157"],"question":[0,"When using i18n with redirects, how can you prevent automatic locale prefixing?"],"answer":[0,"Add `locale: false` to the redirect configuration. If `locale: false` is used, you must manually prefix the source and destination with a locale for it to match correctly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-i18n-with-redirects-how-can-you-prevent-automatic-locale-prefixing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-i18n-with-redirects-how-can-you-prevent-automatic-locale-prefixing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-i18n-with-redirects-how-can-you-prevent-automatic-locale-prefixing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using i18n with redirects, how can you prevent automatic locale prefixing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add <code>locale: false</code> to the redirect configuration. If <code>locale: false</code> is used, you must manually prefix the source and destination with a locale for it to match correctly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTqw4z" prefix="r4079" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5754390141349003963"],"question":[0,"What additional field can be returned in the paths array of getStaticPaths when i18n is configured?"],"answer":[0,"A `locale` field can be returned alongside the `params` object to specify which locale should be used for that path, e.g., `{ params: { id: '2' }, locale: 'en' }`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-additional-field-can-be-returned-in-the-paths-array-of-getstaticpaths-when-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-additional-field-can-be-returned-in-the-paths-array-of-getstaticpaths-when-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-additional-field-can-be-returned-in-the-paths-array-of-getstaticpaths-when-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What additional field can be returned in the paths array of getStaticPaths when i18n is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A <code>locale</code> field can be returned alongside the <code>params</code> object to specify which locale should be used for that path, e.g., <code>{ params: { id: '2' }, locale: 'en' }</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aCuww" prefix="r4080" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6015089303632673577"],"question":[0,"Does Next.js automatically add hreflang meta tags for SEO when using i18n?"],"answer":[0,"No, Next.js doesn't know about variants of a page, so you must manually add hreflang meta tags using next/head or the Metadata API."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-add-hreflang-meta-tags-for-seo-when-using-i18n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-add-hreflang-meta-tags-for-seo-when-using-i18n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-add-hreflang-meta-tags-for-seo-when-using-i18n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically add hreflang meta tags for SEO when using i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Next.js doesn't know about variants of a page, so you must manually add hreflang meta tags using next/head or the Metadata API.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zx6wIh" prefix="r4081" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7578683032152152077"],"question":[0,"What is the return value of useParams in Pages Router on initial render before the router is ready?"],"answer":[0,"`useParams` returns `null` on the initial render in Pages Router and updates with properties once the router is ready."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-value-of-useparams-in-pages-router-on-initial-render-before-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-value-of-useparams-in-pages-router-on-initial-render-before-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-value-of-useparams-in-pages-router-on-initial-render-before-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return value of useParams in Pages Router on initial render before the router is ready?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>useParams</code> returns <code>null</code> on the initial render in Pages Router and updates with properties once the router is ready.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1btBS1" prefix="r4082" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7589000398500684730"],"question":[0,"What is the name of the cookie that Next.js uses to store the user's locale preference in Pages Router?"],"answer":[0,"Next.js uses the `NEXT_LOCALE` cookie to store the user's locale preference."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-name-of-the-cookie-that-next-js-uses-to-store-the-user-s-locale-pref"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-name-of-the-cookie-that-next-js-uses-to-store-the-user-s-locale-pref" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-name-of-the-cookie-that-next-js-uses-to-store-the-user-s-locale-pref" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the name of the cookie that Next.js uses to store the user's locale preference in Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses the <code>NEXT_LOCALE</code> cookie to store the user's locale preference.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QLMS5" prefix="r4083" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7853044538189649249"],"question":[0,"What is the maximum number of locale items allowed in Next.js i18n configuration?"],"answer":[0,"Next.js has a limit of 100 locale items for i18n configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/invalid-i18n-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-locale-items-allowed-in-next-js-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-locale-items-allowed-in-next-js-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-locale-items-allowed-in-next-js-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of locale items allowed in Next.js i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js has a limit of 100 locale items for i18n configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/invalid-i18n-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zsq7fQ" prefix="r4084" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8537620121074003363"],"question":[0,"For Automatically Statically Optimized pages with i18n, how many versions of each page are generated?"],"answer":[0,"A version of the page will be generated for each configured locale, which can increase build times depending on how many locales are configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"for-automatically-statically-optimized-pages-with-i18n-how-many-versions-of-each"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-automatically-statically-optimized-pages-with-i18n-how-many-versions-of-each" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-automatically-statically-optimized-pages-with-i18n-how-many-versions-of-each" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For Automatically Statically Optimized pages with i18n, how many versions of each page are generated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A version of the page will be generated for each configured locale, which can increase build times depending on how many locales are configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mJShI" prefix="r4085" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9150807153741658349"],"question":[0,"What is the default behavior of the Link component regarding locale prefixing in Pages Router?"],"answer":[0,"The active locale is automatically prepended to Link hrefs. For example, if French is active, `<Link href=\"/dashboard\">` becomes `/fr/dashboard`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-behavior-of-the-link-component-regarding-locale-prefixing-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-behavior-of-the-link-component-regarding-locale-prefixing-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-behavior-of-the-link-component-regarding-locale-prefixing-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default behavior of the Link component regarding locale prefixing in Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The active locale is automatically prepended to Link hrefs. For example, if French is active, <code><Link href="/dashboard"></code> becomes <code>/fr/dashboard</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13xibp" prefix="r4086" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9513775928863435908"],"question":[0,"Does the default locale receive a URL prefix when using sub-path routing in Next.js Pages Router?"],"answer":[0,"No, the default locale does not have a prefix. For example, if `en-US` is the default locale, pages are accessible at `/blog` rather than `/en-US/blog`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-default-locale-receive-a-url-prefix-when-using-sub-path-routing-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-default-locale-receive-a-url-prefix-when-using-sub-path-routing-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-default-locale-receive-a-url-prefix-when-using-sub-path-routing-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the default locale receive a URL prefix when using sub-path routing in Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the default locale does not have a prefix. For example, if <code>en-US</code> is the default locale, pages are accessible at <code>/blog</code> rather than <code>/en-US/blog</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2npkU" prefix="r4087" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9587359141080541459"],"question":[0,"What does setting localeDetection to false do in Next.js i18n configuration?"],"answer":[0,"When `localeDetection` is set to false, Next.js will no longer automatically redirect based on the user's preferred locale from the Accept-Language header, and will only provide locale information detected from the locale-based domain or locale path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-localedetection-to-false-do-in-next-js-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-localedetection-to-false-do-in-next-js-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-localedetection-to-false-do-in-next-js-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting localeDetection to false do in Next.js i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When <code>localeDetection</code> is set to false, Next.js will no longer automatically redirect based on the user's preferred locale from the Accept-Language header, and will only provide locale information detected from the locale-based domain or locale path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tEGxu" prefix="r4088" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10456479106203918748"],"question":[0,"When using basePath with redirects in i18n, how can you prevent automatic basePath prefixing?"],"answer":[0,"Add `basePath: false` to the redirect configuration object to prevent automatic prefixing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-basepath-with-redirects-in-i18n-how-can-you-prevent-automatic-basepat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-basepath-with-redirects-in-i18n-how-can-you-prevent-automatic-basepat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-basepath-with-redirects-in-i18n-how-can-you-prevent-automatic-basepat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using basePath with redirects in i18n, how can you prevent automatic basePath prefixing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add <code>basePath: false</code> to the redirect configuration object to prevent automatic prefixing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zr49gO" prefix="r4089" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12111921329340748268"],"question":[0,"What matcher pattern is commonly used in middleware to exclude Next.js internal paths from i18n processing?"],"answer":[0,"The pattern `'/((?!_next).*)'` is commonly used to skip all internal paths that start with `_next`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-matcher-pattern-is-commonly-used-in-middleware-to-exclude-next-js-internal-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-matcher-pattern-is-commonly-used-in-middleware-to-exclude-next-js-internal-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-matcher-pattern-is-commonly-used-in-middleware-to-exclude-next-js-internal-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What matcher pattern is commonly used in middleware to exclude Next.js internal paths from i18n processing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The pattern <code>'/((?!_next).*)'</code> is commonly used to skip all internal paths that start with <code>_next</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FaDfW" prefix="r4090" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12491597795298854693"],"question":[0,"What are the locale-related properties available in the context parameter of getStaticPaths?"],"answer":[0,"The context parameter includes `locales` (array of all configured locales) and `defaultLocale` (the configured default locale)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-locale-related-properties-available-in-the-context-parameter-of-get"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-locale-related-properties-available-in-the-context-parameter-of-get" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-locale-related-properties-available-in-the-context-parameter-of-get" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the locale-related properties available in the context parameter of getStaticPaths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The context parameter includes <code>locales</code> (array of all configured locales) and <code>defaultLocale</code> (the configured default locale).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8vxBx" prefix="r4091" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13081136464278663640"],"question":[0,"What HTTP header does Next.js recommend using for automatic locale detection?"],"answer":[0,"Next.js recommends using the `Accept-Language` header to determine the user's preferred locale."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-header-does-next-js-recommend-using-for-automatic-locale-detection"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-header-does-next-js-recommend-using-for-automatic-locale-detection" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-header-does-next-js-recommend-using-for-automatic-locale-detection" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP header does Next.js recommend using for automatic locale detection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using the <code>Accept-Language</code> header to determine the user's preferred locale.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="R38RQ" prefix="r4092" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14062979599695005820"],"question":[0,"Does the router.pathname property include the locale, basePath, or trailing slash?"],"answer":[0,"No, `pathname` is the path for the current route file after `/pages`, excluding basePath, locale, and trailing slash."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-router-pathname-property-include-the-locale-basepath-or-trailing-slash"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-router-pathname-property-include-the-locale-basepath-or-trailing-slash" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-router-pathname-property-include-the-locale-basepath-or-trailing-slash" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the router.pathname property include the locale, basePath, or trailing slash?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, <code>pathname</code> is the path for the current route file after <code>/pages</code>, excluding basePath, locale, and trailing slash.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1VoNBo" prefix="r4093" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14551284381650148053"],"question":[0,"What is the purpose of the http field in the domains array of i18n configuration?"],"answer":[0,"The `http: true` field allows testing locale domains locally with HTTP instead of HTTPS, useful for development without needing SSL certificates."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-http-field-in-the-domains-array-of-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-http-field-in-the-domains-array-of-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-http-field-in-the-domains-array-of-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the http field in the domains array of i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>http: true</code> field allows testing locale domains locally with HTTP instead of HTTPS, useful for development without needing SSL certificates.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="rendering-strategies-component-level-architecture" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Rendering Strategies > Component-Level Architecture</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="wU8pH" prefix="r4094" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"918951361101090670"],"question":[0,"What is the React Server Component Payload (RSC Payload)?"],"answer":[0,"The RSC Payload is a special data format that Server Components are rendered into. It contains placeholders for where Client Components should be rendered, references to their JavaScript files, and any props passed from Server Components to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-react-server-component-payload-rsc-payload"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-react-server-component-payload-rsc-payload" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-react-server-component-payload-rsc-payload" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the React Server Component Payload (RSC Payload)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload is a special data format that Server Components are rendered into. It contains placeholders for where Client Components should be rendered, references to their JavaScript files, and any props passed from Server Components to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2j4Cwy" prefix="r4095" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1173274080912182472"],"question":[0,"When are NEXT_PUBLIC_ environment variables inlined into the JavaScript bundle?"],"answer":[0,"At build time. Next.js replaces all references to process.env.NEXT_PUBLIC_* with the value from the environment where you run 'next build'. After being built, your app will no longer respond to changes to these variables."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-next-public-environment-variables-inlined-into-the-javascript-bundle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-next-public-environment-variables-inlined-into-the-javascript-bundle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-next-public-environment-variables-inlined-into-the-javascript-bundle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are NEXT_PUBLIC_ environment variables inlined into the JavaScript bundle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At build time. Next.js replaces all references to process.env.NEXT_PUBLIC_* with the value from the environment where you run 'next build'. After being built, your app will no longer respond to changes to these variables.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZussSk" prefix="r4096" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1786444188191245871"],"question":[0,"What TypeScript version is required to use async Server Components?"],"answer":[0,"TypeScript 5.1.3 or higher and @types/react 18.2.8 or higher are required. Older versions may show a 'Promise<Element>' is not a valid JSX element type error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-version-is-required-to-use-async-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-version-is-required-to-use-async-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-version-is-required-to-use-async-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript version is required to use async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TypeScript 5.1.3 or higher and @types/react 18.2.8 or higher are required. Older versions may show a 'Promise<Element>' is not a valid JSX element type error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YAFlw" prefix="r4097" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2203778361004947887"],"question":[0,"What is Partial Prerendering (PPR) in Next.js?"],"answer":[0,"PPR is a rendering strategy that combines static and dynamic content in the same route. It allows static portions to be prerendered and served as an HTML shell with dynamic holes streamed in, all in a single HTTP request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-partial-prerendering-ppr-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-partial-prerendering-ppr-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-partial-prerendering-ppr-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is Partial Prerendering (PPR) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PPR is a rendering strategy that combines static and dynamic content in the same route. It allows static portions to be prerendered and served as an HTML shell with dynamic holes streamed in, all in a single HTTP request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQkXsX" prefix="r4098" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2422306597550046678"],"question":[0,"Can Server Components import Client Components?"],"answer":[0,"Yes, Server Components can import and use Client Components. This is a supported and common pattern in Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-components-import-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-components-import-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-components-import-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Components import Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Components can import and use Client Components. This is a supported and common pattern in Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1T3VDf" prefix="r4099" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2519080045243943730"],"question":[0,"What environment variable prefix makes variables accessible in the client bundle?"],"answer":[0,"Only environment variables prefixed with NEXT_PUBLIC_ are included in the client bundle. Non-prefixed variables are replaced with an empty string in the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-prefix-makes-variables-accessible-in-the-client-bundle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-prefix-makes-variables-accessible-in-the-client-bundle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-prefix-makes-variables-accessible-in-the-client-bundle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable prefix makes variables accessible in the client bundle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only environment variables prefixed with NEXT_PUBLIC_ are included in the client bundle. Non-prefixed variables are replaced with an empty string in the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fEcJk" prefix="r4100" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3910517531219289969"],"question":[0,"What file creates a loading state that automatically wraps page.js in a Suspense boundary?"],"answer":[0,"A loading.js file inside a folder automatically wraps the page.js file and any children below in a <Suspense> boundary. It is nested inside layout.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-creates-a-loading-state-that-automatically-wraps-page-js-in-a-suspense"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-creates-a-loading-state-that-automatically-wraps-page-js-in-a-suspense" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-creates-a-loading-state-that-automatically-wraps-page-js-in-a-suspense" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file creates a loading state that automatically wraps page.js in a Suspense boundary?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A loading.js file inside a folder automatically wraps the page.js file and any children below in a <Suspense> boundary. It is nested inside layout.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="MsNUg" prefix="r4101" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4515302744257897638"],"question":[0,"What props requirement exists when passing data from Server Components to Client Components?"],"answer":[0,"Props must be serializable by React. This means functions cannot be passed as props since they are not serializable. Props need to be in a format that React can serialize when sending data from the server to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-props-requirement-exists-when-passing-data-from-server-components-to-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-props-requirement-exists-when-passing-data-from-server-components-to-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-props-requirement-exists-when-passing-data-from-server-components-to-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What props requirement exists when passing data from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Props must be serializable by React. This means functions cannot be passed as props since they are not serializable. Props need to be in a format that React can serialize when sending data from the server to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zc3JJ9" prefix="r4102" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5723740876862443127"],"question":[0,"Can you place 'use server' directive at two different levels?"],"answer":[0,"Yes, 'use server' can be placed at the module level (top of file to mark all exports) or inline at the top of an individual async function to mark only that function as a Server Function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-place-use-server-directive-at-two-different-levels"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-place-use-server-directive-at-two-different-levels" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-place-use-server-directive-at-two-different-levels" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you place 'use server' directive at two different levels?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, 'use server' can be placed at the module level (top of file to mark all exports) or inline at the top of an individual async function to mark only that function as a Server Function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dGAqI" prefix="r4103" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6867260282950011238"],"question":[0,"How do you mark dynamic boundaries for Partial Prerendering?"],"answer":[0,"Use Suspense boundaries to mark dynamic boundaries in your component tree. Everything outside the Suspense boundary can prerender normally as part of the static shell."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/partial-prerendering"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-mark-dynamic-boundaries-for-partial-prerendering"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-mark-dynamic-boundaries-for-partial-prerendering" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-mark-dynamic-boundaries-for-partial-prerendering" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you mark dynamic boundaries for Partial Prerendering?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use Suspense boundaries to mark dynamic boundaries in your component tree. Everything outside the Suspense boundary can prerender normally as part of the static shell.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/partial-prerendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18arTq" prefix="r4104" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7093696740442887400"],"question":[0,"How can you prevent server-only code from being accidentally imported into Client Components?"],"answer":[0,"Import the 'server-only' package into files containing server-only code. This causes a build-time error if the module is ever accidentally imported into a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-prevent-server-only-code-from-being-accidentally-imported-into-clien"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-prevent-server-only-code-from-being-accidentally-imported-into-clien" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-prevent-server-only-code-from-being-accidentally-imported-into-clien" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you prevent server-only code from being accidentally imported into Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import the 'server-only' package into files containing server-only code. This causes a build-time error if the module is ever accidentally imported into a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SgMjy" prefix="r4105" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7435193759781172886"],"question":[0,"How do you wrap third-party npm packages that lack the 'use client' directive?"],"answer":[0,"Create a Client Component wrapper file that adds 'use client' at the top and re-exports the third-party component. Then you can import your wrapper in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-wrap-third-party-npm-packages-that-lack-the-use-client-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-wrap-third-party-npm-packages-that-lack-the-use-client-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-wrap-third-party-npm-packages-that-lack-the-use-client-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you wrap third-party npm packages that lack the 'use client' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a Client Component wrapper file that adds 'use client' at the top and re-exports the third-party component. Then you can import your wrapper in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RK5be" prefix="r4106" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7751706499737226575"],"question":[0,"Can Client Components be async functions?"],"answer":[0,"No, Client Components cannot be async functions. React Client Components do not support async functions. Use useState and useEffect instead to handle async operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/no-async-client-component"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-be-async-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-be-async-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-be-async-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components be async functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Client Components cannot be async functions. React Client Components do not support async functions. Use useState and useEffect instead to handle async operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/no-async-client-component" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rFFOM" prefix="r4107" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7784514067392682552"],"question":[0,"Is a page.js file required to make a route segment publicly accessible?"],"answer":[0,"Yes, a page.js file is required to make a route segment publicly accessible. Without it, the route segment remains private and won't be accessible via URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-page-js-file-required-to-make-a-route-segment-publicly-accessible"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-page-js-file-required-to-make-a-route-segment-publicly-accessible" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-page-js-file-required-to-make-a-route-segment-publicly-accessible" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a page.js file required to make a route segment publicly accessible?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, a page.js file is required to make a route segment publicly accessible. Without it, the route segment remains private and won't be accessible via URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sPOah" prefix="r4108" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8506412835637002924"],"question":[0,"Is React Context supported in Server Components?"],"answer":[0,"No, React context is not supported in Server Components. Context Providers must be Client Components that wrap Server Components as children."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"is-react-context-supported-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-react-context-supported-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-react-context-supported-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is React Context supported in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, React context is not supported in Server Components. Context Providers must be Client Components that wrap Server Components as children.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1AvFvy" prefix="r4109" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8511067030180742019"],"question":[0,"Can Client Components import Server Components?"],"answer":[0,"No, Client Components cannot directly import Server Components. However, you can pass Server Components as children or props to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-import-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-import-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-import-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components import Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Client Components cannot directly import Server Components. However, you can pass Server Components as children or props to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VrJ47" prefix="r4110" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9465687801729448804"],"question":[0,"Is a root layout required in the Next.js App Router?"],"answer":[0,"Yes, the app directory must include a root layout. It is required and must contain html and body tags. If you forget to create it, Next.js will automatically create this file when running next dev."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"is-a-root-layout-required-in-the-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-a-root-layout-required-in-the-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-a-root-layout-required-in-the-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is a root layout required in the Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the app directory must include a root layout. It is required and must contain html and body tags. If you forget to create it, Next.js will automatically create this file when running next dev.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Qe10x" prefix="r4111" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9559077286530958926"],"question":[0,"Which icon libraries are optimized by default with optimizePackageImports?"],"answer":[0,"The following are optimized by default: @ant-design/icons, @heroicons/react/20/solid, @heroicons/react/24/solid, @heroicons/react/24/outline, @mui/icons-material, @material-ui/icons, @tabler/icons-react, and react-icons/*."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports"]]],"topic":[0,"nextjs"],"slug":[0,"which-icon-libraries-are-optimized-by-default-with-optimizepackageimports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-icon-libraries-are-optimized-by-default-with-optimizepackageimports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-icon-libraries-are-optimized-by-default-with-optimizepackageimports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which icon libraries are optimized by default with optimizePackageImports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The following are optimized by default: @ant-design/icons, @heroicons/react/20/solid, @heroicons/react/24/solid, @heroicons/react/24/outline, @mui/icons-material, @material-ui/icons, @tabler/icons-react, and react-icons/*.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XMrgK" prefix="r4112" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9980922526607595384"],"question":[0,"What is the default component type for layouts and pages in Next.js App Router?"],"answer":[0,"Layouts and pages are Server Components by default. This allows you to fetch data and render parts of your UI on the server, optionally cache the result, and stream it to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-component-type-for-layouts-and-pages-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-component-type-for-layouts-and-pages-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-component-type-for-layouts-and-pages-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default component type for layouts and pages in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layouts and pages are Server Components by default. This allows you to fetch data and render parts of your UI on the server, optionally cache the result, and stream it to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPEwSn" prefix="r4113" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11514861656170573068"],"question":[0,"Are Client Components only rendered on the client?"],"answer":[0,"No, Client Components are pre-rendered on the server and hydrated on the client. For the initial page load, Next.js renders a static HTML preview on the server for both Client and Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"are-client-components-only-rendered-on-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-client-components-only-rendered-on-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-client-components-only-rendered-on-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Client Components only rendered on the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Client Components are pre-rendered on the server and hydrated on the client. For the initial page load, Next.js renders a static HTML preview on the server for both Client and Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTXksd" prefix="r4114" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11601055233099717478"],"question":[0,"What is the default caching behavior for fetch requests in Next.js 15?"],"answer":[0,"In Next.js 15, fetch responses are not cached by default (the default is 'auto no cache'). To cache, you must explicitly use { cache: 'force-cache' }. This changed from Next.js 14 where 'force-cache' was the default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch requests in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, fetch responses are not cached by default (the default is 'auto no cache'). To cache, you must explicitly use { cache: 'force-cache' }. This changed from Next.js 14 where 'force-cache' was the default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tAbaJ" prefix="r4115" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11716160672278274501"],"question":[0,"Where should you render Context Providers in the component tree?"],"answer":[0,"You should render providers as deep as possible in the tree, wrapping only {children} instead of the entire document. This makes it easier for Next.js to optimize the static parts of your Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-you-render-context-providers-in-the-component-tree"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-you-render-context-providers-in-the-component-tree" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-you-render-context-providers-in-the-component-tree" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should you render Context Providers in the component tree?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should render providers as deep as possible in the tree, wrapping only {children} instead of the entire document. This makes it easier for Next.js to optimize the static parts of your Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gFXSN" prefix="r4116" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12062709639599149901"],"question":[0,"In what order are nested route components rendered?"],"answer":[0,"Components are rendered recursively in nested routes in parent-to-child order. The components of a route segment will be nested inside the components of its parent segment, and rendering starts once a segment's data is fetched and its parent has finished rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-order-are-nested-route-components-rendered"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-order-are-nested-route-components-rendered" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-order-are-nested-route-components-rendered" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what order are nested route components rendered?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Components are rendered recursively in nested routes in parent-to-child order. The components of a route segment will be nested inside the components of its parent segment, and rendering starts once a segment's data is fetched and its parent has finished rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sMlG4" prefix="r4117" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12797005602204652159"],"question":[0,"What package can mark modules that contain client-only logic?"],"answer":[0,"The 'client-only' package can be used to mark modules that contain client-only logic, such as code that accesses the window object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-can-mark-modules-that-contain-client-only-logic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-can-mark-modules-that-contain-client-only-logic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-can-mark-modules-that-contain-client-only-logic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package can mark modules that contain client-only logic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'client-only' package can be used to mark modules that contain client-only logic, such as code that accesses the window object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2lBMt7" prefix="r4118" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12841346936545369359"],"question":[0,"Do layouts re-render when navigating between pages?"],"answer":[0,"No, layouts preserve state, remain interactive, and do not re-render on navigation. Only the page components update while the layout won't re-render. This is called partial rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"do-layouts-re-render-when-navigating-between-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-layouts-re-render-when-navigating-between-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-layouts-re-render-when-navigating-between-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do layouts re-render when navigating between pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, layouts preserve state, remain interactive, and do not re-render on navigation. Only the page components update while the layout won't re-render. This is called partial rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zv8aMs" prefix="r4119" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13077195504234007309"],"question":[0,"When you mark a file with 'use client', are child components also considered Client Components?"],"answer":[0,"Yes. Once a file is marked with 'use client', all its imports and child components are considered part of the client bundle. You only need to add the directive to the entry point files, not every component file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"when-you-mark-a-file-with-use-client-are-child-components-also-considered-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-you-mark-a-file-with-use-client-are-child-components-also-considered-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-you-mark-a-file-with-use-client-are-child-components-also-considered-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When you mark a file with 'use client', are child components also considered Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Once a file is marked with 'use client', all its imports and child components are considered part of the client bundle. You only need to add the directive to the entry point files, not every component file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmColW" prefix="r4120" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13276896387610265738"],"question":[0,"Where must the 'use client' directive be placed in a file?"],"answer":[0,"The 'use client' directive must be placed at the top of the file, before any imports. This defines the client-server boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-use-client-directive-be-placed-in-a-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-use-client-directive-be-placed-in-a-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-use-client-directive-be-placed-in-a-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the 'use client' directive be placed in a file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use client' directive must be placed at the top of the file, before any imports. This defines the client-server boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fAAwN" prefix="r4121" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14269811210900948043"],"question":[0,"Can Client Components use inline 'use server' functions?"],"answer":[0,"No, Client Components can only import actions that use the module-level 'use server' directive. They cannot define inline Server Functions directly - these must be imported from a separate file with the file-level directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-use-inline-use-server-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-use-inline-use-server-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-use-inline-use-server-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components use inline 'use server' functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Client Components can only import actions that use the module-level 'use server' directive. They cannot define inline Server Functions directly - these must be imported from a separate file with the file-level directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="environment-variables" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Environment Variables</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="1PYoJJ" prefix="r4122" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"959875979170357923"],"question":[0,"Where are non-NEXT_PUBLIC_ environment variables available?"],"answer":[0,"Non-NEXT_PUBLIC_ environment variables are only available in the Node.js environment and are not accessible to the browser (client-side)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-non-next-public-environment-variables-available"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-non-next-public-environment-variables-available" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-non-next-public-environment-variables-available" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are non-NEXT_PUBLIC_ environment variables available?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Non-NEXT_PUBLIC_ environment variables are only available in the Node.js environment and are not accessible to the browser (client-side).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18cTa2" prefix="r4123" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1333285612421258812"],"question":[0,"When are environment variables evaluated in getStaticProps?"],"answer":[0,"In getStaticProps, environment variables are read at build time since the function runs during the build process."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-environment-variables-evaluated-in-getstaticprops"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-environment-variables-evaluated-in-getstaticprops" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-environment-variables-evaluated-in-getstaticprops" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are environment variables evaluated in getStaticProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In getStaticProps, environment variables are read at build time since the function runs during the build process.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ofj8h" prefix="r4124" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1883531913294694041"],"question":[0,"What is the exact loading order for environment variable files in Next.js?"],"answer":[0,"Environment variables are resolved in this order, stopping at first match: 1) process.env, 2) .env.$(NODE_ENV).local, 3) .env.local (skipped when NODE_ENV is test), 4) .env.$(NODE_ENV), 5) .env"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-loading-order-for-environment-variable-files-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-loading-order-for-environment-variable-files-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-loading-order-for-environment-variable-files-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact loading order for environment variable files in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables are resolved in this order, stopping at first match: 1) process.env, 2) .env.$(NODE_ENV).local, 3) .env.local (skipped when NODE_ENV is test), 4) .env.$(NODE_ENV), 5) .env</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Bmjme" prefix="r4125" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2600195946421267596"],"question":[0,"What is the recommended way to access runtime environment variables in Next.js?"],"answer":[0,"The recommendation is using getServerSideProps in the Pages Router or incrementally adopting the App Router with dynamic rendering (using unstable_noStore or dynamic functions)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-way-to-access-runtime-environment-variables-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-way-to-access-runtime-environment-variables-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-way-to-access-runtime-environment-variables-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended way to access runtime environment variables in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommendation is using getServerSideProps in the Pages Router or incrementally adopting the App Router with dynamic rendering (using unstable_noStore or dynamic functions).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2agw7s" prefix="r4126" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2789649219316323984"],"question":[0,"What package provides the loadEnvConfig function for loading environment variables outside the Next.js runtime?"],"answer":[0,"The @next/env package provides the loadEnvConfig function, which can be used in test runners, ORM configs, or other root config files that run outside the Next.js runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-provides-the-loadenvconfig-function-for-loading-environment-variabl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-provides-the-loadenvconfig-function-for-loading-environment-variabl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-provides-the-loadenvconfig-function-for-loading-environment-variabl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package provides the loadEnvConfig function for loading environment variables outside the Next.js runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The @next/env package provides the loadEnvConfig function, which can be used in test runners, ORM configs, or other root config files that run outside the Next.js runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="j26gu" prefix="r4127" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2951547014767472495"],"question":[0,"What parameter does loadEnvConfig from @next/env require?"],"answer":[0,"loadEnvConfig takes a project directory path as its parameter, typically process.cwd()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameter-does-loadenvconfig-from-next-env-require"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameter-does-loadenvconfig-from-next-env-require" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameter-does-loadenvconfig-from-next-env-require" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameter does loadEnvConfig from @next/env require?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loadEnvConfig takes a project directory path as its parameter, typically process.cwd().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="D5qUJ" prefix="r4128" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3058590365444987030"],"question":[0,"Which .env files should be committed to version control?"],"answer":[0,".env, .env.development, and .env.production files should be included in your repository as they define defaults. .env*.local files should be added to .gitignore."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"which-env-files-should-be-committed-to-version-control"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-env-files-should-be-committed-to-version-control" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-env-files-should-be-committed-to-version-control" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which .env files should be committed to version control?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.env, .env.development, and .env.production files should be included in your repository as they define defaults. .env*.local files should be added to .gitignore.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LD9Fo" prefix="r4129" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3607481675688141635"],"question":[0,"What files should be in a Next.js project's .gitignore for TypeScript Next.js projects?"],"answer":[0,"It's recommended to add next-env.d.ts (the TypeScript definition file that Next.js generates) to your .gitignore file, in addition to all .env* files."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/39026"]]],"topic":[0,"nextjs"],"slug":[0,"what-files-should-be-in-a-next-js-project-s-gitignore-for-typescript-next-js-pro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-files-should-be-in-a-next-js-project-s-gitignore-for-typescript-next-js-pro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-files-should-be-in-a-next-js-project-s-gitignore-for-typescript-next-js-pro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What files should be in a Next.js project's .gitignore for TypeScript Next.js projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It's recommended to add next-env.d.ts (the TypeScript definition file that Next.js generates) to your .gitignore file, in addition to all .env* files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/39026" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vMo5Q" prefix="r4130" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4009669449269733199"],"question":[0,"Is .env.local loaded during testing when NODE_ENV is test?"],"answer":[0,"No, .env.local is not loaded when NODE_ENV is test. This ensures tests produce the same results for everyone by ignoring .env.local files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"is-env-local-loaded-during-testing-when-node-env-is-test"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-env-local-loaded-during-testing-when-node-env-is-test" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-env-local-loaded-during-testing-when-node-env-is-test" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is .env.local loaded during testing when NODE_ENV is test?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, .env.local is not loaded when NODE_ENV is test. This ensures tests produce the same results for everyone by ignoring .env.local files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GbMq" prefix="r4131" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4020859854407657996"],"question":[0,"When are NEXT_PUBLIC_ environment variables evaluated and inlined?"],"answer":[0,"NEXT_PUBLIC_ variables are evaluated and inlined at build time when you run next build. After being built, your app will no longer respond to changes to these environment variables."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-next-public-environment-variables-evaluated-and-inlined"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-next-public-environment-variables-evaluated-and-inlined" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-next-public-environment-variables-evaluated-and-inlined" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are NEXT_PUBLIC_ environment variables evaluated and inlined?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_PUBLIC_ variables are evaluated and inlined at build time when you run next build. After being built, your app will no longer respond to changes to these environment variables.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2bQwQt" prefix="r4132" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4079173786922845696"],"question":[0,"Can environment variables be used in getServerSideProps, getStaticProps, and API routes?"],"answer":[0,"Yes, environment variables can be used in Next.js data fetching methods (getServerSideProps, getStaticProps, and getStaticPaths) or API routes. They are accessible on the server-side."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"can-environment-variables-be-used-in-getserversideprops-getstaticprops-and-api-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-environment-variables-be-used-in-getserversideprops-getstaticprops-and-api-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-environment-variables-be-used-in-getserversideprops-getstaticprops-and-api-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can environment variables be used in getServerSideProps, getStaticProps, and API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, environment variables can be used in Next.js data fetching methods (getServerSideProps, getStaticProps, and getStaticPaths) or API routes. They are accessible on the server-side.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi9g2f" prefix="r4133" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4157734521326366226"],"question":[0,"How do you use a literal dollar sign ($) in an environment variable value?"],"answer":[0,"To use a literal $ character in the value, it needs to be escaped as \\$."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-a-literal-dollar-sign-in-an-environment-variable-value"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-a-literal-dollar-sign-in-an-environment-variable-value" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-a-literal-dollar-sign-in-an-environment-variable-value" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use a literal dollar sign ($) in an environment variable value?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>To use a literal $ character in the value, it needs to be escaped as $.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HrnQR" prefix="r4134" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5515851064542380041"],"question":[0,"What webpack plugin does Next.js use to inline environment variables?"],"answer":[0,"Next.js uses webpack's DefinePlugin to inline environment variable values at build time, replacing all references with hard-coded values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/env"]]],"topic":[0,"nextjs"],"slug":[0,"what-webpack-plugin-does-next-js-use-to-inline-environment-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-webpack-plugin-does-next-js-use-to-inline-environment-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-webpack-plugin-does-next-js-use-to-inline-environment-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What webpack plugin does Next.js use to inline environment variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses webpack's DefinePlugin to inline environment variable values at build time, replacing all references with hard-coded values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/env" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkK9g6" prefix="r4135" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6001120135706849386"],"question":[0,"What value does Next.js automatically assign to NODE_ENV when running next dev?"],"answer":[0,"Next.js automatically assigns development when running the next dev command."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-next-js-automatically-assign-to-node-env-when-running-next-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-next-js-automatically-assign-to-node-env-when-running-next-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-next-js-automatically-assign-to-node-env-when-running-next-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does Next.js automatically assign to NODE_ENV when running next dev?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically assigns development when running the next dev command.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Sk9Ik" prefix="r4136" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6287135747365256050"],"question":[0,"What is the status of the env option in next.config.js?"],"answer":[0,"The env option in next.config.js is a legacy API no longer recommended, maintained only for backward compatibility. It has been superseded by Next.js 9.4's environment variables approach."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/env"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-status-of-the-env-option-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-status-of-the-env-option-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-status-of-the-env-option-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the status of the env option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The env option in next.config.js is a legacy API no longer recommended, maintained only for backward compatibility. It has been superseded by Next.js 9.4's environment variables approach.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/env" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWxqno" prefix="r4137" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6350767910025816445"],"question":[0,"Will dynamic lookups like process.env[varName] be inlined for NEXT_PUBLIC_ variables?"],"answer":[0,"No, dynamic lookups will not be inlined. Variables accessed through bracket notation or destructuring won't work due to webpack DefinePlugin mechanics."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"will-dynamic-lookups-like-process-env-varname-be-inlined-for-next-public-variabl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="will-dynamic-lookups-like-process-env-varname-be-inlined-for-next-public-variabl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#will-dynamic-lookups-like-process-env-varname-be-inlined-for-next-public-variabl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Will dynamic lookups like process.env[varName] be inlined for NEXT_PUBLIC_ variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, dynamic lookups will not be inlined. Variables accessed through bracket notation or destructuring won't work due to webpack DefinePlugin mechanics.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1nErLU" prefix="r4138" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6546449553153035805"],"question":[0,"What are the only three valid values for NODE_ENV in Next.js?"],"answer":[0,"The allowed values for NODE_ENV are production, development, and test."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-only-three-valid-values-for-node-env-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-only-three-valid-values-for-node-env-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-only-three-valid-values-for-node-env-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the only three valid values for NODE_ENV in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The allowed values for NODE_ENV are production, development, and test.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qUatQ" prefix="r4139" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7455680426455902580"],"question":[0,"Does the NEXT_PUBLIC_ prefix have any effect when using the env option in next.config.js?"],"answer":[0,"No, the NEXT_PUBLIC_ prefix has no effect when specifying variables through the env option in next.config.js. Variables specified this way are always included in the JavaScript bundle regardless of the prefix."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/env"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-next-public-prefix-have-any-effect-when-using-the-env-option-in-next-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-next-public-prefix-have-any-effect-when-using-the-env-option-in-next-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-next-public-prefix-have-any-effect-when-using-the-env-option-in-next-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the NEXT_PUBLIC_ prefix have any effect when using the env option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the NEXT_PUBLIC_ prefix has no effect when specifying variables through the env option in next.config.js. Variables specified this way are always included in the JavaScript bundle regardless of the prefix.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/env" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2orf23" prefix="r4140" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7456367170345512461"],"question":[0,"What syntax does Next.js support for referencing other environment variables within .env files?"],"answer":[0,"Next.js automatically expands variables using $VARIABLE syntax to reference other variables (e.g., HOST=http://$HOSTNAME:$PORT)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-syntax-does-next-js-support-for-referencing-other-environment-variables-wit"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-syntax-does-next-js-support-for-referencing-other-environment-variables-wit" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-syntax-does-next-js-support-for-referencing-other-environment-variables-wit" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What syntax does Next.js support for referencing other environment variables within .env files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically expands variables using $VARIABLE syntax to reference other variables (e.g., HOST=http://$HOSTNAME:$PORT).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZypkYU" prefix="r4141" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7954356851079664375"],"question":[0,"Where should .env files be located if your Next.js project uses a /src directory?"],"answer":[0,".env.* files should remain in the root of your project, not inside the /src directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-env-files-be-located-if-your-next-js-project-uses-a-src-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-env-files-be-located-if-your-next-js-project-uses-a-src-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-env-files-be-located-if-your-next-js-project-uses-a-src-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should .env files be located if your Next.js project uses a /src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.env.* files should remain in the root of your project, not inside the /src directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wyoxo" prefix="r4142" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8381705109524381445"],"question":[0,"What prefix is required to make an environment variable accessible in the browser?"],"answer":[0,"Variables must be prefixed with NEXT_PUBLIC_ to be accessible in the browser. Next.js will inline the value at build time into the JavaScript bundle delivered to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-prefix-is-required-to-make-an-environment-variable-accessible-in-the-browse"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prefix-is-required-to-make-an-environment-variable-accessible-in-the-browse" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prefix-is-required-to-make-an-environment-variable-accessible-in-the-browse" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prefix is required to make an environment variable accessible in the browser?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Variables must be prefixed with NEXT_PUBLIC_ to be accessible in the browser. Next.js will inline the value at build time into the JavaScript bundle delivered to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="To03g" prefix="r4143" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9384977916557265915"],"question":[0,"What value does Next.js automatically assign to NODE_ENV for commands other than next dev?"],"answer":[0,"Next.js automatically assigns production for all commands other than next dev."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-next-js-automatically-assign-to-node-env-for-commands-other-than"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-next-js-automatically-assign-to-node-env-for-commands-other-than" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-next-js-automatically-assign-to-node-env-for-commands-other-than" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does Next.js automatically assign to NODE_ENV for commands other than next dev?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically assigns production for all commands other than next dev.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WiXGC" prefix="r4144" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9601495189007334092"],"question":[0,"What happens to NEXT_PUBLIC_ variables when you deploy the same Docker image to multiple environments?"],"answer":[0,"All NEXT_PUBLIC_ variables will be frozen with the value evaluated at build time. The app will no longer respond to changes to these environment variables across different environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-next-public-variables-when-you-deploy-the-same-docker-image-to-m"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-next-public-variables-when-you-deploy-the-same-docker-image-to-m" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-next-public-variables-when-you-deploy-the-same-docker-image-to-m" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to NEXT_PUBLIC_ variables when you deploy the same Docker image to multiple environments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All NEXT_PUBLIC_ variables will be frozen with the value evaluated at build time. The app will no longer respond to changes to these environment variables across different environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28Q8aW" prefix="r4145" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10446397305925126381"],"question":[0,"What default .env files does create-next-app add to .gitignore?"],"answer":[0,"The default create-next-app template ensures all .env files are added to your .gitignore. This includes .env*.local and .env patterns."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/61920"]]],"topic":[0,"nextjs"],"slug":[0,"what-default-env-files-does-create-next-app-add-to-gitignore"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-default-env-files-does-create-next-app-add-to-gitignore" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-default-env-files-does-create-next-app-add-to-gitignore" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What default .env files does create-next-app add to .gitignore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default create-next-app template ensures all .env files are added to your .gitignore. This includes .env*.local and .env patterns.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/61920" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IjdqJ" prefix="r4146" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11142365750303318079"],"question":[0,"How can you enable runtime environment variable evaluation in the App Router?"],"answer":[0,"Use unstable_noStore() (or dynamic functions like cookies() and headers()) to opt into dynamic rendering, which allows environment variables to be evaluated at runtime on the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-enable-runtime-environment-variable-evaluation-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-enable-runtime-environment-variable-evaluation-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-enable-runtime-environment-variable-evaluation-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you enable runtime environment variable evaluation in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use unstable_noStore() (or dynamic functions like cookies() and headers()) to opt into dynamic rendering, which allows environment variables to be evaluated at runtime on the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1cwYxB" prefix="r4147" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11542742671914779973"],"question":[0,"When are environment variables evaluated in getServerSideProps?"],"answer":[0,"In getServerSideProps, environment variables are pulled from the process environment at runtime, not replaced at build time, since it runs on every request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-environment-variables-evaluated-in-getserversideprops"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-environment-variables-evaluated-in-getserversideprops" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-environment-variables-evaluated-in-getserversideprops" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are environment variables evaluated in getServerSideProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In getServerSideProps, environment variables are pulled from the process environment at runtime, not replaced at build time, since it runs on every request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19lBDQ" prefix="r4148" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14051810684709320795"],"question":[0,"Do NEXT_PUBLIC_ variables respond to runtime changes in the App Router when using unstable_noStore?"],"answer":[0,"No, any variables prefixed with NEXT_PUBLIC_ are resolved at build time, even when using unstable_noStore. Only non-prefixed server-side variables are evaluated at runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-public-variables-respond-to-runtime-changes-in-the-app-router-when-using"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-public-variables-respond-to-runtime-changes-in-the-app-router-when-using" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-public-variables-respond-to-runtime-changes-in-the-app-router-when-using" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do NEXT_PUBLIC_ variables respond to runtime changes in the App Router when using unstable_noStore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, any variables prefixed with NEXT_PUBLIC_ are resolved at build time, even when using unstable_noStore. Only non-prefixed server-side variables are evaluated at runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1VWL4P" prefix="r4149" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14872606769907800132"],"question":[0,"Are non-NEXT_PUBLIC_ environment variables accessible in API routes?"],"answer":[0,"Yes, code within API route controllers runs on the server and has full access to environment variables without the NEXT_PUBLIC_ prefix."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"are-non-next-public-environment-variables-accessible-in-api-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-non-next-public-environment-variables-accessible-in-api-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-non-next-public-environment-variables-accessible-in-api-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are non-NEXT_PUBLIC_ environment variables accessible in API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, code within API route controllers runs on the server and has full access to environment variables without the NEXT_PUBLIC_ prefix.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-layout-and-sizing" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Layout and Sizing</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 28 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZU3oWN" prefix="r4150" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1758540622456933111"],"question":[0,"What is the default value for the loading prop in Next.js Image component?"],"answer":[0,"The default value for loading is \"lazy\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-loading-prop-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-loading-prop-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-loading-prop-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the loading prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value for loading is "lazy".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhGNw7" prefix="r4151" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1849482753389183611"],"question":[0,"When should you use the priority property on Next.js Image component?"],"answer":[0,"You should add the priority property to the image that will be the Largest Contentful Paint (LCP) element for each page. This allows Next.js to specially prioritize the image for loading (e.g. through preload tags or priority hints), leading to a meaningful boost in LCP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"when-should-you-use-the-priority-property-on-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-should-you-use-the-priority-property-on-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-should-you-use-the-priority-property-on-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When should you use the priority property on Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should add the priority property to the image that will be the Largest Contentful Paint (LCP) element for each page. This allows Next.js to specially prioritize the image for loading (e.g. through preload tags or priority hints), leading to a meaningful boost in LCP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23UbRx" prefix="r4152" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1972019311665673669"],"question":[0,"What does the priority property do in Next.js Image component?"],"answer":[0,"When priority={true}, it triggers ReactDOM.preload() which puts a preload directive in the head of the document, and it automatically disables lazy loading, meaning the image will be loaded immediately without waiting for the user to scroll to it. It is more aggressive than loading=\"eager\" because it prompts the browser to load the image even before the HTML is fully parsed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-priority-property-do-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-priority-property-do-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-priority-property-do-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the priority property do in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When priority={true}, it triggers ReactDOM.preload() which puts a preload directive in the head of the document, and it automatically disables lazy loading, meaning the image will be loaded immediately without waiting for the user to scroll to it. It is more aggressive than loading="eager" because it prompts the browser to load the image even before the HTML is fully parsed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SuIRw" prefix="r4153" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2247357128176688957"],"question":[0,"What is the default value for the decoding prop in Next.js Image component?"],"answer":[0,"The default value for decoding is \"async\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-decoding-prop-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-decoding-prop-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-decoding-prop-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the decoding prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value for decoding is "async".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZiPVuA" prefix="r4154" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2260668409361356030"],"question":[0,"What replaced the legacy layout prop in Next.js 13+?"],"answer":[0,"The layout prop was deprecated in Next.js 13. For layout=\"fill\", use the boolean fill prop instead. For layout=\"responsive\", use style={{ width: '100%', height: 'auto' }}."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-upgrade-to-13"]]],"topic":[0,"nextjs"],"slug":[0,"what-replaced-the-legacy-layout-prop-in-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-replaced-the-legacy-layout-prop-in-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-replaced-the-legacy-layout-prop-in-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What replaced the legacy layout prop in Next.js 13+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The layout prop was deprecated in Next.js 13. For layout="fill", use the boolean fill prop instead. For layout="responsive", use style={{ width: '100%', height: 'auto' }}.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-upgrade-to-13" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1smura" prefix="r4155" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2721501278900674496"],"question":[0,"What happens if the sizes prop is missing when using the fill property?"],"answer":[0,"If sizes is missing, the browser assumes the image will be as wide as the viewport (100vw), which can cause unnecessarily large images to be downloaded. A default value of 100vw (full screen width) is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-the-sizes-prop-is-missing-when-using-the-fill-property"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-the-sizes-prop-is-missing-when-using-the-fill-property" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-the-sizes-prop-is-missing-when-using-the-fill-property" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if the sizes prop is missing when using the fill property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If sizes is missing, the browser assumes the image will be as wide as the viewport (100vw), which can cause unnecessarily large images to be downloaded. A default value of 100vw (full screen width) is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="28n3X0" prefix="r4156" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3230102345749975244"],"question":[0,"What values does the object-fit prop accept in Next.js Image component?"],"answer":[0,"The object-fit prop accepts \"contain\" (image scaled down to fit container while preserving aspect ratio) and \"cover\" (image fills container and is cropped)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-values-does-the-object-fit-prop-accept-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-values-does-the-object-fit-prop-accept-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-values-does-the-object-fit-prop-accept-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What values does the object-fit prop accept in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The object-fit prop accepts "contain" (image scaled down to fit container while preserving aspect ratio) and "cover" (image fills container and is cropped).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWRanb" prefix="r4157" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3762432076001116705"],"question":[0,"When is blurDataURL automatically added for static imports?"],"answer":[0,"For static imports of jpg, png, webp, or avif files, blurDataURL is added automatically—unless the image is animated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-blurdataurl-automatically-added-for-static-imports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-blurdataurl-automatically-added-for-static-imports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-blurdataurl-automatically-added-for-static-imports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is blurDataURL automatically added for static imports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For static imports of jpg, png, webp, or avif files, blurDataURL is added automatically—unless the image is animated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1a4hUK" prefix="r4158" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4272640603507084923"],"question":[0,"What is the default value for the placeholder prop in Next.js Image component?"],"answer":[0,"The default value for placeholder is \"empty\", which means no placeholder while the image is loading."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-placeholder-prop-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-placeholder-prop-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-placeholder-prop-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the placeholder prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value for placeholder is "empty", which means no placeholder while the image is loading.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqIyz3" prefix="r4159" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4894628487064950088"],"question":[0,"What is required when using the style prop to set a custom width?"],"answer":[0,"If you're using the style prop to set a custom width, be sure to also set height: 'auto' to preserve the image's aspect ratio."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-when-using-the-style-prop-to-set-a-custom-width"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-when-using-the-style-prop-to-set-a-custom-width" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-when-using-the-style-prop-to-set-a-custom-width" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required when using the style prop to set a custom width?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you're using the style prop to set a custom width, be sure to also set height: 'auto' to preserve the image's aspect ratio.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9eUMY" prefix="r4160" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4906419648376514713"],"question":[0,"What are the default deviceSizes values in Next.js image configuration?"],"answer":[0,"The default deviceSizes are [640, 750, 828, 1080, 1200, 1920, 2048, 3840]."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-devicesizes-values-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-devicesizes-values-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-devicesizes-values-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default deviceSizes values in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default deviceSizes are [640, 750, 828, 1080, 1200, 1920, 2048, 3840].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zx08TI" prefix="r4161" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6210234594762583665"],"question":[0,"What is the default value for the preload prop in Next.js Image component?"],"answer":[0,"The default value for preload is false."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-preload-prop-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-preload-prop-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-preload-prop-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the preload prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value for preload is false.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z138NqX" prefix="r4162" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6686970826010732204"],"question":[0,"What was the legacy layout=\"fill\" behavior in Next.js Image component?"],"answer":[0,"With layout=\"fill\", the image would grow in both X and Y axes to fill container, typically paired with objectFit property. The parent element required position: relative. The srcSet was 640w, 750w, ... 2048w, 3840w with sizes: 100vw."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image-legacy"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-legacy-layout-fill-behavior-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-legacy-layout-fill-behavior-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-legacy-layout-fill-behavior-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the legacy layout="fill" behavior in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With layout="fill", the image would grow in both X and Y axes to fill container, typically paired with objectFit property. The parent element required position: relative. The srcSet was 640w, 750w, ... 2048w, 3840w with sizes: 100vw.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image-legacy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jilHe" prefix="r4163" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6974926202302226250"],"question":[0,"What should you use to style the Next.js Image component?"],"answer":[0,"Use className or style props to style the Image component. Do not use styled-jsx."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-use-to-style-the-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-use-to-style-the-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-use-to-style-the-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you use to style the Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use className or style props to style the Image component. Do not use styled-jsx.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zDSJh" prefix="r4164" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7508740035578622081"],"question":[0,"What happens to the image if no styles are applied when using the fill property?"],"answer":[0,"If no styles are applied to the image, the image will stretch to fit the container."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-image-if-no-styles-are-applied-when-using-the-fill-property"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-image-if-no-styles-are-applied-when-using-the-fill-property" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-image-if-no-styles-are-applied-when-using-the-fill-property" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the image if no styles are applied when using the fill property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If no styles are applied to the image, the image will stretch to fit the container.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UC2s7" prefix="r4165" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7651394341681873207"],"question":[0,"What can cause layout shift when using width/height auto with Next.js Image?"],"answer":[0,"When using styles with width/height of auto, it is possible to cause Layout Shift on older browsers before Safari 15 that don't preserve the aspect ratio."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-can-cause-layout-shift-when-using-width-height-auto-with-next-js-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-can-cause-layout-shift-when-using-width-height-auto-with-next-js-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-can-cause-layout-shift-when-using-width-height-auto-with-next-js-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What can cause layout shift when using width/height auto with Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using styles with width/height of auto, it is possible to cause Layout Shift on older browsers before Safari 15 that don't preserve the aspect ratio.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="n3DCS" prefix="r4166" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8315770174205729668"],"question":[0,"What are the required props for the Next.js Image component?"],"answer":[0,"The required props are `src` and `alt` (always required). Additionally, `width` and `height` are required unless you're using the `fill` property or a static import."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-required-props-for-the-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-required-props-for-the-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-required-props-for-the-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the required props for the Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The required props are <code>src</code> and <code>alt</code> (always required). Additionally, <code>width</code> and <code>height</code> are required unless you're using the <code>fill</code> property or a static import.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IvQE" prefix="r4167" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8649340749616290673"],"question":[0,"What is the difference between priority and loading=\"eager\" in Next.js Image?"],"answer":[0,"For the priority attribute, Next.js will add a <link preload> tag at the top of your page. While both fetch the image before it's visible, priority will be more \"aggressive\" than plain HTML's loading=\"eager\" because it prompts the browser to load the image even before the HTML is fully parsed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-priority-and-loading-eager-in-next-js-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-priority-and-loading-eager-in-next-js-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-priority-and-loading-eager-in-next-js-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between priority and loading="eager" in Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For the priority attribute, Next.js will add a <link preload> tag at the top of your page. While both fetch the image before it's visible, priority will be more "aggressive" than plain HTML's loading="eager" because it prompts the browser to load the image even before the HTML is fully parsed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16g4GA" prefix="r4168" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9006311328248534869"],"question":[0,"What image size is recommended for blur placeholders in Next.js?"],"answer":[0,"A very small image (10px or less) is recommended because the placeholder image is automatically enlarged and blurred."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-image-size-is-recommended-for-blur-placeholders-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-image-size-is-recommended-for-blur-placeholders-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-image-size-is-recommended-for-blur-placeholders-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What image size is recommended for blur placeholders in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A very small image (10px or less) is recommended because the placeholder image is automatically enlarged and blurred.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mnYgB" prefix="r4169" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9426476475753047399"],"question":[0,"What are the default imageSizes values in Next.js image configuration?"],"answer":[0,"The default imageSizes are [16, 32, 48, 64, 96, 128, 256, 384]."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-imagesizes-values-in-next-js-image-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-imagesizes-values-in-next-js-image-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-imagesizes-values-in-next-js-image-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default imageSizes values in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default imageSizes are [16, 32, 48, 64, 96, 128, 256, 384].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZlkeRT" prefix="r4170" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10771340967053670515"],"question":[0,"What positioning requirement must the parent element meet when using the fill property?"],"answer":[0,"The parent element must assign position: \"relative\", \"fixed\", or \"absolute\". The <img> element itself defaults to position: \"absolute\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-positioning-requirement-must-the-parent-element-meet-when-using-the-fill-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-positioning-requirement-must-the-parent-element-meet-when-using-the-fill-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-positioning-requirement-must-the-parent-element-meet-when-using-the-fill-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What positioning requirement must the parent element meet when using the fill property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The parent element must assign position: "relative", "fixed", or "absolute". The <img> element itself defaults to position: "absolute".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13vFBO" prefix="r4171" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11662768012930593304"],"question":[0,"What happens automatically when you use a static import with Next.js Image component?"],"answer":[0,"Next.js automatically sets width and height based on the imported file, and automatically provides blurDataURL for jpg, png, webp, or avif files (unless animated). These values are used to determine the image ratio and prevent Cumulative Layout Shift."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-automatically-when-you-use-a-static-import-with-next-js-image-compo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-automatically-when-you-use-a-static-import-with-next-js-image-compo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-automatically-when-you-use-a-static-import-with-next-js-image-compo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens automatically when you use a static import with Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically sets width and height based on the imported file, and automatically provides blurDataURL for jpg, png, webp, or avif files (unless animated). These values are used to determine the image ratio and prevent Cumulative Layout Shift.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WmJmi" prefix="r4172" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11876045391230869910"],"question":[0,"What placeholder values are accepted by Next.js Image component?"],"answer":[0,"The placeholder prop accepts: \"empty\" (default, no placeholder), \"blur\" (uses blurred version of image, requires blurDataURL property), or a data URL string like \"data:image/...\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-placeholder-values-are-accepted-by-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-placeholder-values-are-accepted-by-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-placeholder-values-are-accepted-by-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What placeholder values are accepted by Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The placeholder prop accepts: "empty" (default, no placeholder), "blur" (uses blurred version of image, requires blurDataURL property), or a data URL string like "data:image/...".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Wkyvg" prefix="r4173" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12549812256582591774"],"question":[0,"What was the legacy layout=\"responsive\" behavior in Next.js Image component?"],"answer":[0,"With layout=\"responsive\", the image would scale to fit width of container, reducing dimensions for smaller viewports and increasing for larger ones. The parent element had to use display: block. The srcSet was 640w, 750w, ... 2048w, 3840w with sizes: 100vw."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image-legacy"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-legacy-layout-responsive-behavior-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-legacy-layout-responsive-behavior-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-legacy-layout-responsive-behavior-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the legacy layout="responsive" behavior in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With layout="responsive", the image would scale to fit width of container, reducing dimensions for smaller viewports and increasing for larger ones. The parent element had to use display: block. The srcSet was 640w, 750w, ... 2048w, 3840w with sizes: 100vw.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image-legacy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13Wsmv" prefix="r4174" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14471830663267189326"],"question":[0,"What do the width and height props represent in Next.js Image component?"],"answer":[0,"The width and height properties represent the intrinsic image size in pixels. They are used to infer the correct aspect ratio and prevent layout shift. They do NOT determine the rendered size of the image, which is controlled by CSS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-do-the-width-and-height-props-represent-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-do-the-width-and-height-props-represent-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-do-the-width-and-height-props-represent-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What do the width and height props represent in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The width and height properties represent the intrinsic image size in pixels. They are used to infer the correct aspect ratio and prevent layout shift. They do NOT determine the rendered size of the image, which is controlled by CSS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBXIkc" prefix="r4175" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14542995091248239795"],"question":[0,"What is the default quality value for Next.js Image optimization?"],"answer":[0,"The default quality value is 75 (an integer between 1 and 100 where 100 is the best quality)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-value-for-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-value-for-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-value-for-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality value for Next.js Image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default quality value is 75 (an integer between 1 and 100 where 100 is the best quality).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OuI6n" prefix="r4176" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14774747070693032562"],"question":[0,"What was the legacy layout=\"fixed\" behavior in Next.js Image component?"],"answer":[0,"With layout=\"fixed\", the image was sized to width and height exactly, with dimensions remaining constant regardless of viewport changes. The srcSet was 1x, 2x based on imageSizes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image-legacy"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-legacy-layout-fixed-behavior-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-legacy-layout-fixed-behavior-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-legacy-layout-fixed-behavior-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the legacy layout="fixed" behavior in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With layout="fixed", the image was sized to width and height exactly, with dimensions remaining constant regardless of viewport changes. The srcSet was 1x, 2x based on imageSizes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image-legacy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ucSjF" prefix="r4177" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14832281736255959629"],"question":[0,"How does the sizes prop affect srcset generation in Next.js Image component?"],"answer":[0,"Without sizes: Next.js generates a limited srcset (e.g. 1x, 2x), suitable for fixed-size images. With sizes: Next.js generates a full srcset (e.g. 640w, 750w, etc.), optimized for responsive layouts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-sizes-prop-affect-srcset-generation-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-sizes-prop-affect-srcset-generation-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-sizes-prop-affect-srcset-generation-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the sizes prop affect srcset generation in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Without sizes: Next.js generates a limited srcset (e.g. 1x, 2x), suitable for fixed-size images. With sizes: Next.js generates a full srcset (e.g. 640w, 750w, etc.), optimized for responsive layouts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="error-handling-uncaught-exception-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Error Handling > Uncaught Exception Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1wLn1R" prefix="r4178" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15045445963084232"],"question":[0,"What HTML tags must global-error.js include that regular error.js files don't need?"],"answer":[0,"global-error.js must include <html> and <body> tags since it replaces the root layout when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-tags-must-global-error-js-include-that-regular-error-js-files-don-t-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-tags-must-global-error-js-include-that-regular-error-js-files-don-t-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-tags-must-global-error-js-include-that-regular-error-js-files-don-t-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML tags must global-error.js include that regular error.js files don't need?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js must include <html> and <body> tags since it replaces the root layout when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2olVwe" prefix="r4179" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"381173216315772281"],"question":[0,"What file extensions are valid for error.js in a TypeScript Next.js project?"],"answer":[0,"Valid extensions are .js, .jsx, .ts, and .tsx. For TypeScript projects, error.tsx is the recommended convention."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-valid-for-error-js-in-a-typescript-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-valid-for-error-js-in-a-typescript-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-valid-for-error-js-in-a-typescript-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are valid for error.js in a TypeScript Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Valid extensions are .js, .jsx, .ts, and .tsx. For TypeScript projects, error.tsx is the recommended convention.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoYNI0" prefix="r4180" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"813830329904292067"],"question":[0,"What configuration flag was required to enable instrumentation in Next.js versions before 15?"],"answer":[0,"Before Next.js 15, you had to set experimental.instrumentationHook = true in next.config.js to enable instrumentation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/13/app/building-your-application/optimizing/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-flag-was-required-to-enable-instrumentation-in-next-js-versio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-flag-was-required-to-enable-instrumentation-in-next-js-versio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-flag-was-required-to-enable-instrumentation-in-next-js-versio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration flag was required to enable instrumentation in Next.js versions before 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Before Next.js 15, you had to set experimental.instrumentationHook = true in next.config.js to enable instrumentation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/13/app/building-your-application/optimizing/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aVrxF" prefix="r4181" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1535994945201478338"],"question":[0,"What is the component rendering hierarchy that includes error.js in Next.js?"],"answer":[0,"The hierarchy is: layout.js → template.js → error.js (React error boundary) → loading.js (React suspense boundary) → not-found.js (React error boundary for 'not found' UI) → page.js or nested layout.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-component-rendering-hierarchy-that-includes-error-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-component-rendering-hierarchy-that-includes-error-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-component-rendering-hierarchy-that-includes-error-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the component rendering hierarchy that includes error.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The hierarchy is: layout.js → template.js → error.js (React error boundary) → loading.js (React suspense boundary) → not-found.js (React error boundary for 'not found' UI) → page.js or nested layout.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2gtHDi" prefix="r4182" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1609865326205449503"],"question":[0,"Is the experimental.instrumentationHook configuration needed in Next.js 15 or later?"],"answer":[0,"No, as of Next.js 15, instrumentation is stable and the experimental.instrumentationHook config option can be removed. A warning will be emitted if it's still set."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-experimental-instrumentationhook-configuration-needed-in-next-js-15-or-la"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-experimental-instrumentationhook-configuration-needed-in-next-js-15-or-la" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-experimental-instrumentationhook-configuration-needed-in-next-js-15-or-la" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the experimental.instrumentationHook configuration needed in Next.js 15 or later?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, as of Next.js 15, instrumentation is stable and the experimental.instrumentationHook config option can be removed. A warning will be emitted if it's still set.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Bad2j" prefix="r4183" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1789202645651776370"],"question":[0,"When does instrumentation-client.js execute relative to React hydration?"],"answer":[0,"instrumentation-client.js runs after HTML loads but before React hydration begins and before user interactions are possible."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-instrumentation-client-js-execute-relative-to-react-hydration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-instrumentation-client-js-execute-relative-to-react-hydration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-instrumentation-client-js-execute-relative-to-react-hydration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does instrumentation-client.js execute relative to React hydration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>instrumentation-client.js runs after HTML loads but before React hydration begins and before user interactions are possible.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="w7u27" prefix="r4184" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2735333023814676432"],"question":[0,"What does the reset() function do in an error.js component?"],"answer":[0,"The reset() function attempts to recover from an error by re-rendering the error boundary's content. If successful, the fallback error component is replaced with the result of the re-render."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-reset-function-do-in-an-error-js-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-reset-function-do-in-an-error-js-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-reset-function-do-in-an-error-js-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the reset() function do in an error.js component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The reset() function attempts to recover from an error by re-rendering the error boundary's content. If successful, the fallback error component is replaced with the result of the re-render.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuxMgJ" prefix="r4185" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2920833318509408428"],"question":[0,"What optional export does instrumentation-client.js provide for navigation tracking?"],"answer":[0,"instrumentation-client.js can optionally export 'onRouterTransitionStart(url, navigationType)' which fires when navigation begins and receives the destination URL and navigation type ('push' | 'replace' | 'traverse')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-export-does-instrumentation-client-js-provide-for-navigation-track"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-export-does-instrumentation-client-js-provide-for-navigation-track" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-export-does-instrumentation-client-js-provide-for-navigation-track" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional export does instrumentation-client.js provide for navigation tracking?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>instrumentation-client.js can optionally export 'onRouterTransitionStart(url, navigationType)' which fires when navigation begins and receives the destination URL and navigation type ('push' | 'replace' | 'traverse').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1s3QJ2" prefix="r4186" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3189829708627010348"],"question":[0,"Where should the instrumentation.js file be placed in a Next.js project?"],"answer":[0,"The instrumentation.js file must be placed at the application root, or inside the src folder if you're using one (not inside the app or pages directory)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-instrumentation-js-file-be-placed-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-instrumentation-js-file-be-placed-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-instrumentation-js-file-be-placed-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the instrumentation.js file be placed in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The instrumentation.js file must be placed at the application root, or inside the src folder if you're using one (not inside the app or pages directory).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CVlPm" prefix="r4187" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3483797900150805161"],"question":[0,"Why might the error instance in onRequestError not be the original error thrown?"],"answer":[0,"The error instance might be processed by React if encountered during Server Components rendering. You can use the digest property on the error to identify the actual error type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"why-might-the-error-instance-in-onrequesterror-not-be-the-original-error-thrown"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-might-the-error-instance-in-onrequesterror-not-be-the-original-error-thrown" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-might-the-error-instance-in-onrequesterror-not-be-the-original-error-thrown" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why might the error instance in onRequestError not be the original error thrown?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error instance might be processed by React if encountered during Server Components rendering. You can use the digest property on the error to identify the actual error type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1a2xiF" prefix="r4188" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6444010437824334460"],"question":[0,"Which takes precedence when both error.js and not-found.js exist: error.js or not-found.js?"],"answer":[0,"notFound() errors take precedence over error.js, so not-found.js is used for handling more specific 404-related errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"which-takes-precedence-when-both-error-js-and-not-found-js-exist-error-js-or-not"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-takes-precedence-when-both-error-js-and-not-found-js-exist-error-js-or-not" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-takes-precedence-when-both-error-js-and-not-found-js-exist-error-js-or-not" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which takes precedence when both error.js and not-found.js exist: error.js or not-found.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>notFound() errors take precedence over error.js, so not-found.js is used for handling more specific 404-related errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqQNoc" prefix="r4189" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6927738125031571639"],"question":[0,"How are error messages from Server Components displayed in production vs development in Next.js?"],"answer":[0,"In development, error objects are serialized for debugging transparency. In production, Server Component errors display a generic message with an identifier to prevent leaking sensitive details, while Client Component errors show the original error message."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-error-messages-from-server-components-displayed-in-production-vs-develop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-error-messages-from-server-components-displayed-in-production-vs-develop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-error-messages-from-server-components-displayed-in-production-vs-develop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are error messages from Server Components displayed in production vs development in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In development, error objects are serialized for debugging transparency. In production, Server Component errors display a generic message with an identifier to prevent leaking sensitive details, while Client Component errors show the original error message.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtpU5Y" prefix="r4190" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7304644659319430477"],"question":[0,"What are the possible values for the routeType property in the onRequestError context parameter?"],"answer":[0,"The routeType can be 'render', 'route', 'action', or 'proxy'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-the-routetype-property-in-the-onrequesterror-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-the-routetype-property-in-the-onrequesterror-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-the-routetype-property-in-the-onrequesterror-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for the routeType property in the onRequestError context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The routeType can be 'render', 'route', 'action', or 'proxy'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1w8FvL" prefix="r4191" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9355949500567981665"],"question":[0,"What property does the error object in error.js contain that helps match server-side logs?"],"answer":[0,"The error object contains an optional 'digest' property, which is an automatically generated hash of the error that can be used to match corresponding server-side logs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-property-does-the-error-object-in-error-js-contain-that-helps-match-server-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-property-does-the-error-object-in-error-js-contain-that-helps-match-server-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-property-does-the-error-object-in-error-js-contain-that-helps-match-server-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What property does the error object in error.js contain that helps match server-side logs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error object contains an optional 'digest' property, which is an automatically generated hash of the error that can be used to match corresponding server-side logs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KfYbg" prefix="r4192" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9495026246859337633"],"question":[0,"Does instrumentation-client.js require specific function exports like the server-side instrumentation.js?"],"answer":[0,"No, instrumentation-client.js does not require specific function exports. You can write your monitoring code directly in the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"does-instrumentation-client-js-require-specific-function-exports-like-the-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-instrumentation-client-js-require-specific-function-exports-like-the-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-instrumentation-client-js-require-specific-function-exports-like-the-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does instrumentation-client.js require specific function exports like the server-side instrumentation.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, instrumentation-client.js does not require specific function exports. You can write your monitoring code directly in the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dX5qx" prefix="r4193" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9543367891439820898"],"question":[0,"What critical requirement exists for async tasks in onRequestError?"],"answer":[0,"If you're running any async tasks in onRequestError, you must await them to ensure they complete properly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-critical-requirement-exists-for-async-tasks-in-onrequesterror"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-critical-requirement-exists-for-async-tasks-in-onrequesterror" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-critical-requirement-exists-for-async-tasks-in-onrequesterror" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What critical requirement exists for async tasks in onRequestError?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you're running any async tasks in onRequestError, you must await them to ensure they complete properly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sm8gj" prefix="r4194" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9998475897886367982"],"question":[0,"What file name is used for handling errors in the root layout in Next.js?"],"answer":[0,"global-error.js (or global-error.jsx/tsx) is placed in the root app directory to handle errors in the root layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-name-is-used-for-handling-errors-in-the-root-layout-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-name-is-used-for-handling-errors-in-the-root-layout-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-name-is-used-for-handling-errors-in-the-root-layout-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file name is used for handling errors in the root layout in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js (or global-error.jsx/tsx) is placed in the root app directory to handle errors in the root layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2sgeuh" prefix="r4195" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10255039356361099399"],"question":[0,"In which Next.js version did global-error.js start displaying in development mode?"],"answer":[0,"global-error.js started displaying in development mode in Next.js v15.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-global-error-js-start-displaying-in-development-mod"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-global-error-js-start-displaying-in-development-mod" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-global-error-js-start-displaying-in-development-mod" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did global-error.js start displaying in development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js started displaying in development mode in Next.js v15.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1SNvQx" prefix="r4196" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10579015903607768837"],"question":[0,"What are the three parameters accepted by the onRequestError function?"],"answer":[0,"onRequestError accepts: 1) error (Error object with digest property), 2) request (object with path, method, and headers), and 3) context (object with routerKind, routePath, routeType, renderSource, revalidateReason, and renderType)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-parameters-accepted-by-the-onrequesterror-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-parameters-accepted-by-the-onrequesterror-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-parameters-accepted-by-the-onrequesterror-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three parameters accepted by the onRequestError function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onRequestError accepts: 1) error (Error object with digest property), 2) request (object with path, method, and headers), and 3) context (object with routerKind, routePath, routeType, renderSource, revalidateReason, and renderType).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DauDQ" prefix="r4197" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11081471043076682547"],"question":[0,"In which Next.js version was global-error.js introduced?"],"answer":[0,"global-error.js was introduced in Next.js v13.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-global-error-js-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-global-error-js-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-global-error-js-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was global-error.js introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js was introduced in Next.js v13.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8PbKC" prefix="r4198" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11724246448310168209"],"question":[0,"What is the function name exported from instrumentation.js for tracking server errors?"],"answer":[0,"The function is called 'onRequestError' and is exported from instrumentation.js to track server errors to observability providers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-function-name-exported-from-instrumentation-js-for-tracking-server-e"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-function-name-exported-from-instrumentation-js-for-tracking-server-e" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-function-name-exported-from-instrumentation-js-for-tracking-server-e" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the function name exported from instrumentation.js for tracking server errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The function is called 'onRequestError' and is exported from instrumentation.js to track server errors to observability providers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zbph7m" prefix="r4199" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11854717860294292014"],"question":[0,"In which Next.js version was the error.js file convention introduced?"],"answer":[0,"The error.js file convention was introduced in Next.js v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-error-js-file-convention-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-error-js-file-convention-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-error-js-file-convention-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the error.js file convention introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error.js file convention was introduced in Next.js v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoSN5k" prefix="r4200" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12810090083867670362"],"question":[0,"Do error boundaries in Next.js catch errors in event handlers or async code?"],"answer":[0,"No, error boundaries do not catch errors in event handlers or async code. They're designed to catch errors during rendering only. Errors in event handlers/async code occur after rendering and require manual handling using useState or useReducer."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-error-boundaries-in-next-js-catch-errors-in-event-handlers-or-async-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-error-boundaries-in-next-js-catch-errors-in-event-handlers-or-async-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-error-boundaries-in-next-js-catch-errors-in-event-handlers-or-async-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do error boundaries in Next.js catch errors in event handlers or async code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, error boundaries do not catch errors in event handlers or async code. They're designed to catch errors during rendering only. Errors in event handlers/async code occur after rendering and require manual handling using useState or useReducer.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15B8Hj" prefix="r4201" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12849792925104757377"],"question":[0,"In which Next.js version was instrumentation-client.js introduced?"],"answer":[0,"instrumentation-client.js was introduced in Next.js v15.3."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-instrumentation-client-js-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-instrumentation-client-js-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-instrumentation-client-js-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was instrumentation-client.js introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>instrumentation-client.js was introduced in Next.js v15.3.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1g1Xfn" prefix="r4202" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13095393199038796963"],"question":[0,"What are the two required props that an error.js component receives?"],"answer":[0,"The error.js component receives two props: 'error' (an Error object with optional digest property) and 'reset' (a function to attempt recovery by re-rendering the segment)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-required-props-that-an-error-js-component-receives"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-required-props-that-an-error-js-component-receives" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-required-props-that-an-error-js-component-receives" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two required props that an error.js component receives?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error.js component receives two props: 'error' (an Error object with optional digest property) and 'reset' (a function to attempt recovery by re-rendering the segment).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZUtoMw" prefix="r4203" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14552423643114150444"],"question":[0,"How do errors from useTransition's startTransition behave with error boundaries in Next.js?"],"answer":[0,"Errors from useTransition's startTransition bubble up to the nearest error boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-errors-from-usetransition-s-starttransition-behave-with-error-boundaries-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-errors-from-usetransition-s-starttransition-behave-with-error-boundaries-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-errors-from-usetransition-s-starttransition-behave-with-error-boundaries-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do errors from useTransition's startTransition behave with error boundaries in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Errors from useTransition's startTransition bubble up to the nearest error boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmpgTe" prefix="r4204" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14869400464430127436"],"question":[0,"Can global-error.js export metadata or generateMetadata?"],"answer":[0,"No, global-error.js cannot export metadata or generateMetadata. Use the React <title> component instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"can-global-error-js-export-metadata-or-generatemetadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-global-error-js-export-metadata-or-generatemetadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-global-error-js-export-metadata-or-generatemetadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can global-error.js export metadata or generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, global-error.js cannot export metadata or generateMetadata. Use the React <title> component instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="data-fetching-progressive-rendering" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Data Fetching > Progressive Rendering</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZFwtNS" prefix="r4205" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"49467105411246183"],"question":[0,"Can you change the HTTP status code after streaming has started in Next.js?"],"answer":[0,"No, it is not possible to change the status code after streaming started because the response headers have already been sent to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-change-the-http-status-code-after-streaming-has-started-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-change-the-http-status-code-after-streaming-has-started-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-change-the-http-status-code-after-streaming-has-started-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you change the HTTP status code after streaming has started in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, it is not possible to change the status code after streaming started because the response headers have already been sent to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gfi11" prefix="r4206" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"914071926483793530"],"question":[0,"Does request memoization work in Route Handlers?"],"answer":[0,"No, memoization doesn't apply to fetch requests in Route Handlers as they are not a part of the React component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"does-request-memoization-work-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-request-memoization-work-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-request-memoization-work-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does request memoization work in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, memoization doesn't apply to fetch requests in Route Handlers as they are not a part of the React component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13JhFU" prefix="r4207" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1004316852708798061"],"question":[0,"Can you use the ssr: false option in Server Components with next/dynamic?"],"answer":[0,"No, `ssr: false` is not supported in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/lazy-loading"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-ssr-false-option-in-server-components-with-next-dynamic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-ssr-false-option-in-server-components-with-next-dynamic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-ssr-false-option-in-server-components-with-next-dynamic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the ssr: false option in Server Components with next/dynamic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, <code>ssr: false</code> is not supported in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/lazy-loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rM3TW" prefix="r4208" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1336877249582928097"],"question":[0,"How can you opt out of fetch request memoization in Next.js?"],"answer":[0,"You can opt out of request memoization by passing an Abort signal to fetch."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-opt-out-of-fetch-request-memoization-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-opt-out-of-fetch-request-memoization-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-opt-out-of-fetch-request-memoization-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you opt out of fetch request memoization in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can opt out of request memoization by passing an Abort signal to fetch.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YkITU" prefix="r4209" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1714638443971520612"],"question":[0,"What HTTP methods does Next.js automatically memoize for fetch requests?"],"answer":[0,"Next.js automatically memoizes fetch requests using the GET or HEAD methods with the same URL and options within a single render pass."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-does-next-js-automatically-memoize-for-fetch-requests"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-does-next-js-automatically-memoize-for-fetch-requests" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-does-next-js-automatically-memoize-for-fetch-requests" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods does Next.js automatically memoize for fetch requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically memoizes fetch requests using the GET or HEAD methods with the same URL and options within a single render pass.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20zmre" prefix="r4210" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2488257929753000584"],"question":[0,"What does loading.js automatically wrap in a Suspense boundary?"],"answer":[0,"loading.js automatically wraps the `page.js` file and any children below in a `<Suspense>` boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-loading-js-automatically-wrap-in-a-suspense-boundary"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-loading-js-automatically-wrap-in-a-suspense-boundary" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-loading-js-automatically-wrap-in-a-suspense-boundary" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does loading.js automatically wrap in a Suspense boundary?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js automatically wraps the <code>page.js</code> file and any children below in a <code><Suspense></code> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z296weE" prefix="r4211" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4683308885329242936"],"question":[0,"What HTTP status code is returned when streaming begins in Next.js?"],"answer":[0,"A `200` status code is returned to signal that the request was successful when streaming begins."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-is-returned-when-streaming-begins-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-is-returned-when-streaming-begins-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-is-returned-when-streaming-begins-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code is returned when streaming begins in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A <code>200</code> status code is returned to signal that the request was successful when streaming begins.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IuCWo" prefix="r4212" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4971424457091391987"],"question":[0,"Does loading.js accept any parameters?"],"answer":[0,"No, loading.js does not accept any parameters. The exported default component must take no parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"does-loading-js-accept-any-parameters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-loading-js-accept-any-parameters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-loading-js-accept-any-parameters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does loading.js accept any parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, loading.js does not accept any parameters. The exported default component must take no parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rvnfc" prefix="r4213" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5179568337350138808"],"question":[0,"What file name must you use to create a loading UI in Next.js App Router?"],"answer":[0,"The file must be named exactly `loading.js` or `loading.tsx` and placed inside a route folder (e.g., `app/dashboard/loading.js`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-name-must-you-use-to-create-a-loading-ui-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-name-must-you-use-to-create-a-loading-ui-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-name-must-you-use-to-create-a-loading-ui-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file name must you use to create a loading UI in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The file must be named exactly <code>loading.js</code> or <code>loading.tsx</code> and placed inside a route folder (e.g., <code>app/dashboard/loading.js</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21poMD" prefix="r4214" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6307770760218204078"],"question":[0,"When navigating between sibling pages that share a layout, what does Next.js re-fetch?"],"answer":[0,"Next.js will only fetch and render from that segment down. It will not need to re-fetch or re-render anything above. This means the layout will be preserved when a user navigates between sibling pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"when-navigating-between-sibling-pages-that-share-a-layout-what-does-next-js-re-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-navigating-between-sibling-pages-that-share-a-layout-what-does-next-js-re-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-navigating-between-sibling-pages-that-share-a-layout-what-does-next-js-re-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When navigating between sibling pages that share a layout, what does Next.js re-fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will only fetch and render from that segment down. It will not need to re-fetch or re-render anything above. This means the layout will be preserved when a user navigates between sibling pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KaUX5" prefix="r4215" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6841522536033626661"],"question":[0,"Is the Data Cache in Next.js persistent across deployments?"],"answer":[0,"Yes, the Data Cache is persistent across incoming requests and deployments unless you revalidate or opt-out."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-data-cache-in-next-js-persistent-across-deployments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-data-cache-in-next-js-persistent-across-deployments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-data-cache-in-next-js-persistent-across-deployments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the Data Cache in Next.js persistent across deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the Data Cache is persistent across incoming requests and deployments unless you revalidate or opt-out.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PuUfu" prefix="r4216" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6849202631141067920"],"question":[0,"Is navigation interruptible when using loading.js in Next.js?"],"answer":[0,"Yes, navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load before navigating to another route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"is-navigation-interruptible-when-using-loading-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-navigation-interruptible-when-using-loading-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-navigation-interruptible-when-using-loading-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is navigation interruptible when using loading.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load before navigating to another route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26fx1K" prefix="r4217" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6978333885085773959"],"question":[0,"What is the minimum byte threshold some browsers require before displaying streamed responses?"],"answer":[0,"Some browsers buffer streaming responses and may not display the streamed response until it exceeds 1024 bytes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-byte-threshold-some-browsers-require-before-displaying-strea"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-byte-threshold-some-browsers-require-before-displaying-strea" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-byte-threshold-some-browsers-require-before-displaying-strea" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum byte threshold some browsers require before displaying streamed responses?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some browsers buffer streaming responses and may not display the streamed response until it exceeds 1024 bytes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NVj3B" prefix="r4218" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7493959129774344746"],"question":[0,"What meta tag does Next.js automatically add to 404 pages when streaming?"],"answer":[0,"When a 404 page is streamed to the client, Next.js includes a `<meta name=\"robots\" content=\"noindex\">` tag in the streamed HTML to prevent search engines from indexing that URL even if the HTTP status is 200."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-meta-tag-does-next-js-automatically-add-to-404-pages-when-streaming"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-meta-tag-does-next-js-automatically-add-to-404-pages-when-streaming" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-meta-tag-does-next-js-automatically-add-to-404-pages-when-streaming" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What meta tag does Next.js automatically add to 404 pages when streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a 404 page is streamed to the client, Next.js includes a <code><meta name="robots" content="noindex"></code> tag in the streamed HTML to prevent search engines from indexing that URL even if the HTTP status is 200.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1M2gSN" prefix="r4219" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8464275543656599678"],"question":[0,"What are the two implementation methods for streaming in Next.js?"],"answer":[0,"Two methods: (1) `loading.js` files for streaming entire pages while data loads, and (2) `<Suspense>` boundaries for enabling granular streaming of specific page sections."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-implementation-methods-for-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-implementation-methods-for-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-implementation-methods-for-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two implementation methods for streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Two methods: (1) <code>loading.js</code> files for streaming entire pages while data loads, and (2) <code><Suspense></code> boundaries for enabling granular streaming of specific page sections.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2e4Wng" prefix="r4220" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8549380522285049938"],"question":[0,"Is loading.js a Server Component or Client Component by default?"],"answer":[0,"loading.js functions as a Server Component by default, but can become a Client Component via the `\"use client\"` directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-loading-js-a-server-component-or-client-component-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-loading-js-a-server-component-or-client-component-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-loading-js-a-server-component-or-client-component-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is loading.js a Server Component or Client Component by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js functions as a Server Component by default, but can become a Client Component via the <code>"use client"</code> directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqydwL" prefix="r4221" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8588540841742394644"],"question":[0,"What is the scope lifetime of request memoization in Next.js?"],"answer":[0,"Request memoization is scoped to the lifetime of a request. The cache persists for the duration of a single server request, remaining active until the rendering of the React component tree is complete."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-scope-lifetime-of-request-memoization-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-scope-lifetime-of-request-memoization-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-scope-lifetime-of-request-memoization-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the scope lifetime of request memoization in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization is scoped to the lifetime of a request. The cache persists for the duration of a single server request, remaining active until the rendering of the React component tree is complete.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IbcCO" prefix="r4222" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8892199115155325542"],"question":[0,"Is streaming supported when using Next.js static export?"],"answer":[0,"No, streaming is not supported with static export deployment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-streaming-supported-when-using-next-js-static-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-streaming-supported-when-using-next-js-static-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-streaming-supported-when-using-next-js-static-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is streaming supported when using Next.js static export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, streaming is not supported with static export deployment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nNY6W" prefix="r4223" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8914769761682298980"],"question":[0,"When you dynamically import a Server Component, what actually gets lazy-loaded?"],"answer":[0,"Only the Client Components that are children of the Server Component will be lazy-loaded - not the Server Component itself."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/lazy-loading"]]],"topic":[0,"nextjs"],"slug":[0,"when-you-dynamically-import-a-server-component-what-actually-gets-lazy-loaded"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-you-dynamically-import-a-server-component-what-actually-gets-lazy-loaded" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-you-dynamically-import-a-server-component-what-actually-gets-lazy-loaded" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When you dynamically import a Server Component, what actually gets lazy-loaded?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the Client Components that are children of the Server Component will be lazy-loaded - not the Server Component itself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/lazy-loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SSMe" prefix="r4224" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9184367216480458817"],"question":[0,"How do you cache a fetch request indefinitely in Next.js?"],"answer":[0,"Set the cache option to `'force-cache'` or use `revalidate: false`, which caches the resource indefinitely (semantically equivalent to `revalidate: Infinity`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-cache-a-fetch-request-indefinitely-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-cache-a-fetch-request-indefinitely-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-cache-a-fetch-request-indefinitely-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you cache a fetch request indefinitely in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set the cache option to <code>'force-cache'</code> or use <code>revalidate: false</code>, which caches the resource indefinitely (semantically equivalent to <code>revalidate: Infinity</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16jeLd" prefix="r4225" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9440475762105433329"],"question":[0,"Where is loading.js nested in the component hierarchy?"],"answer":[0,"In the same folder, `loading.js` will be nested inside `layout.js`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"where-is-loading-js-nested-in-the-component-hierarchy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-is-loading-js-nested-in-the-component-hierarchy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-is-loading-js-nested-in-the-component-hierarchy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where is loading.js nested in the component hierarchy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the same folder, <code>loading.js</code> will be nested inside <code>layout.js</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="crtG7" prefix="r4226" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10428458602312256866"],"question":[0,"Are layouts and pages rendered in parallel by default in Next.js App Router?"],"answer":[0,"Yes, by default, layouts and pages are rendered in parallel. So each segment starts fetching data as soon as possible."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"are-layouts-and-pages-rendered-in-parallel-by-default-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-layouts-and-pages-rendered-in-parallel-by-default-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-layouts-and-pages-rendered-in-parallel-by-default-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are layouts and pages rendered in parallel by default in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, by default, layouts and pages are rendered in parallel. So each segment starts fetching data as soon as possible.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cLeSS" prefix="r4227" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11371520872369862790"],"question":[0,"What JavaScript method should you use to initiate multiple data fetches in parallel in Next.js?"],"answer":[0,"Use `Promise.all()` or `Promise.allSettled()` to initiate all promises at the same time. Start executing all data fetches by defining them and then awaiting them together: `const [data1, data2] = await Promise.all([fetchData1(), fetchData2()])`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-javascript-method-should-you-use-to-initiate-multiple-data-fetches-in-paral"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-javascript-method-should-you-use-to-initiate-multiple-data-fetches-in-paral" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-javascript-method-should-you-use-to-initiate-multiple-data-fetches-in-paral" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What JavaScript method should you use to initiate multiple data fetches in parallel in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>Promise.all()</code> or <code>Promise.allSettled()</code> to initiate all promises at the same time. Start executing all data fetches by defining them and then awaiting them together: <code>const [data1, data2] = await Promise.all([fetchData1(), fetchData2()])</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="VISCn" prefix="r4228" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13074109758228996468"],"question":[0,"What React function can you use to deduplicate non-fetch data requests in Next.js?"],"answer":[0,"You can use the React `cache` function to wrap your data access calls (such as database queries or ORM calls) to achieve deduplication for non-fetch operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-function-can-you-use-to-deduplicate-non-fetch-data-requests-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-function-can-you-use-to-deduplicate-non-fetch-data-requests-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-function-can-you-use-to-deduplicate-non-fetch-data-requests-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React function can you use to deduplicate non-fetch data requests in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use the React <code>cache</code> function to wrap your data access calls (such as database queries or ORM calls) to achieve deduplication for non-fetch operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1U1tnJ" prefix="r4229" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13798454589852145368"],"question":[0,"What does the void operator return in the Next.js preload pattern?"],"answer":[0,"The void operator evaluates the given expression and returns `undefined`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-void-operator-return-in-the-next-js-preload-pattern"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-void-operator-return-in-the-next-js-preload-pattern" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-void-operator-return-in-the-next-js-preload-pattern" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the void operator return in the Next.js preload pattern?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The void operator evaluates the given expression and returns <code>undefined</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16tSUz" prefix="r4230" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14264711264873731479"],"question":[0,"Are Client Components prerendered (SSR) by default when using React.lazy() and Suspense?"],"answer":[0,"Yes, Client Components are prerendered (SSR) by default when using `React.lazy()` and Suspense. You can disable this with the `{ ssr: false }` option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/lazy-loading"]]],"topic":[0,"nextjs"],"slug":[0,"are-client-components-prerendered-ssr-by-default-when-using-react-lazy-and-suspe"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-client-components-prerendered-ssr-by-default-when-using-react-lazy-and-suspe" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-client-components-prerendered-ssr-by-default-when-using-react-lazy-and-suspe" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Client Components prerendered (SSR) by default when using React.lazy() and Suspense?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Client Components are prerendered (SSR) by default when using <code>React.lazy()</code> and Suspense. You can disable this with the <code>{ ssr: false }</code> option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/lazy-loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LeokL" prefix="r4231" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14952722098942045364"],"question":[0,"Do shared layouts remain interactive during navigation in Next.js?"],"answer":[0,"Yes, shared layouts remain interactive while new segments load during navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"do-shared-layouts-remain-interactive-during-navigation-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-shared-layouts-remain-interactive-during-navigation-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-shared-layouts-remain-interactive-during-navigation-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do shared layouts remain interactive during navigation in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, shared layouts remain interactive while new segments load during navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-security-and-access-control" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Security and Access Control</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="1jdQS5" prefix="r4232" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"122903420713259259"],"question":[0,"What is the security risk of CVE-2025-55173 in Next.js image optimization?"],"answer":[0,"When Next.js fails to identify content type using file signatures, it falls back to trusting upstream Content-Type headers. Under certain configurations (images.domains or permissive images.remotePatterns), attackers can host malicious files on external servers and manipulate response headers to bypass validation, leading to arbitrary file downloads under trusted domains. This can be abused for phishing or malicious file delivery."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/changelog/cve-2025-55173"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-security-risk-of-cve-2025-55173-in-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-security-risk-of-cve-2025-55173-in-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-security-risk-of-cve-2025-55173-in-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the security risk of CVE-2025-55173 in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When Next.js fails to identify content type using file signatures, it falls back to trusting upstream Content-Type headers. Under certain configurations (images.domains or permissive images.remotePatterns), attackers can host malicious files on external servers and manipulate response headers to bypass validation, leading to arbitrary file downloads under trusted domains. This can be abused for phishing or malicious file delivery.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/changelog/cve-2025-55173" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nQDrc" prefix="r4233" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"706317351331388045"],"question":[0,"Which Next.js versions fixed the CVE-2025-55173 content injection vulnerability for image optimization?"],"answer":[0,"The vulnerability was fixed in Next.js v15.4.5 and v14.2.31. The issue allowed attacker-controlled external image sources to trigger file downloads with arbitrary content and filenames under specific configurations."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/security/advisories/GHSA-xv57-4mr9-wg8v"]]],"topic":[0,"nextjs"],"slug":[0,"which-next-js-versions-fixed-the-cve-2025-55173-content-injection-vulnerability-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-next-js-versions-fixed-the-cve-2025-55173-content-injection-vulnerability-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-next-js-versions-fixed-the-cve-2025-55173-content-injection-vulnerability-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Next.js versions fixed the CVE-2025-55173 content injection vulnerability for image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The vulnerability was fixed in Next.js v15.4.5 and v14.2.31. The issue allowed attacker-controlled external image sources to trigger file downloads with arbitrary content and filenames under specific configurations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/security/advisories/GHSA-xv57-4mr9-wg8v" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrYw3G" prefix="r4234" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"996818982997201834"],"question":[0,"What are the two valid values for contentDispositionType in Next.js image configuration?"],"answer":[0,"'attachment' (default) which forces the browser to download images when visited directly, and 'inline' which allows the browser to render images when visited directly without downloading them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-valid-values-for-contentdispositiontype-in-next-js-image-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-valid-values-for-contentdispositiontype-in-next-js-image-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-valid-values-for-contentdispositiontype-in-next-js-image-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two valid values for contentDispositionType in Next.js image configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'attachment' (default) which forces the browser to download images when visited directly, and 'inline' which allows the browser to render images when visited directly without downloading them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kE6aY" prefix="r4235" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2051294727428908316"],"question":[0,"What configuration is required when using a custom image loader with loaderFile?"],"answer":[0,"The loaderFile must point to a file relative to the root of your Next.js application. The loader file must export a default function that returns a string and requires the 'use client' directive for App Router. You must also set loader: 'custom' in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-required-when-using-a-custom-image-loader-with-loaderfile"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-required-when-using-a-custom-image-loader-with-loaderfile" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-required-when-using-a-custom-image-loader-with-loaderfile" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is required when using a custom image loader with loaderFile?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The loaderFile must point to a file relative to the root of your Next.js application. The loader file must export a default function that returns a string and requires the 'use client' directive for App Router. You must also set loader: 'custom' in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8zhAw" prefix="r4236" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2496188237756769810"],"question":[0,"What does the port property in remotePatterns do when set to an empty string?"],"answer":[0,"An empty string port: '' is used for standard ports (80 for HTTP, 443 for HTTPS). You must specify the port explicitly for non-standard ports, such as port: '1337' for local development."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/images"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-port-property-in-remotepatterns-do-when-set-to-an-empty-string"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-port-property-in-remotepatterns-do-when-set-to-an-empty-string" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-port-property-in-remotepatterns-do-when-set-to-an-empty-string" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the port property in remotePatterns do when set to an empty string?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An empty string port: '' is used for standard ports (80 for HTTP, 443 for HTTPS). You must specify the port explicitly for non-standard ports, such as port: '1337' for local development.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEH8me" prefix="r4237" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2808550081610625720"],"question":[0,"What are the default imageSizes values in Next.js image optimization?"],"answer":[0,"[16, 32, 48, 64, 96, 128, 256, 384]. These widths are used for images which provide a sizes prop indicating the image is less than the full width of the screen."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-imagesizes-values-in-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-imagesizes-values-in-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-imagesizes-values-in-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default imageSizes values in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[16, 32, 48, 64, 96, 128, 256, 384]. These widths are used for images which provide a sizes prop indicating the image is less than the full width of the screen.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtaKqr" prefix="r4238" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3299087819816183876"],"question":[0,"What CVE was assigned to the Next.js SSRF vulnerability involving image optimization?"],"answer":[0,"CVE-2024-34351. This SSRF vulnerability affected Next.js versions before 14.1.1 and allowed attackers to make requests appearing to originate from the Next.js application server if certain conditions were met, including the ability to manipulate image URLs."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.assetnote.io/resources/research/advisory-next-js-ssrf-cve-2024-34351"]]],"topic":[0,"nextjs"],"slug":[0,"what-cve-was-assigned-to-the-next-js-ssrf-vulnerability-involving-image-optimiza"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cve-was-assigned-to-the-next-js-ssrf-vulnerability-involving-image-optimiza" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cve-was-assigned-to-the-next-js-ssrf-vulnerability-involving-image-optimiza" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CVE was assigned to the Next.js SSRF vulnerability involving image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CVE-2024-34351. This SSRF vulnerability affected Next.js versions before 14.1.1 and allowed attackers to make requests appearing to originate from the Next.js application server if certain conditions were met, including the ability to manipulate image URLs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.assetnote.io/resources/research/advisory-next-js-ssrf-cve-2024-34351" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>assetnote.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1W9NHD" prefix="r4239" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3410668338920802011"],"question":[0,"What is the recommended Content-Security-Policy header value when using dangerouslyAllowSVG?"],"answer":[0,"The recommended CSP value is: \"default-src 'self'; script-src 'none'; sandbox;\". This prevents scripts embedded in SVG images from executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-content-security-policy-header-value-when-using-dangerou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-content-security-policy-header-value-when-using-dangerou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-content-security-policy-header-value-when-using-dangerou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended Content-Security-Policy header value when using dangerouslyAllowSVG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended CSP value is: "default-src 'self'; script-src 'none'; sandbox;". This prevents scripts embedded in SVG images from executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dGG3O" prefix="r4240" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4873871087182581411"],"question":[0,"What is the default image format configuration in Next.js?"],"answer":[0,"The default is formats: ['image/webp']. Next.js automatically detects the browser's supported image formats via the request's Accept header to determine the best output format."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-image-format-configuration-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-image-format-configuration-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-image-format-configuration-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default image format configuration in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is formats: ['image/webp']. Next.js automatically detects the browser's supported image formats via the request's Accept header to determine the best output format.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ag5eO" prefix="r4241" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5233497900954715069"],"question":[0,"What parameters can be configured in localPatterns?"],"answer":[0,"localPatterns accepts pathname (e.g., '/assets/images/**') and search (e.g., '' for no query string) parameters. The pathname specifies allowed local paths with wildcard support, and search controls query string parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@vikrant-dev/increase-next-js-14-application-performance-with-image-optimization-fcaf3ad7c8c0"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-can-be-configured-in-localpatterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-can-be-configured-in-localpatterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-can-be-configured-in-localpatterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters can be configured in localPatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>localPatterns accepts pathname (e.g., '/assets/images/**') and search (e.g., '' for no query string) parameters. The pathname specifies allowed local paths with wildcard support, and search controls query string parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@vikrant-dev/increase-next-js-14-application-performance-with-image-optimization-fcaf3ad7c8c0" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DmPEM" prefix="r4242" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5850041550680111093"],"question":[0,"What is the default value of the `contentDispositionType` configuration for Next.js image optimization?"],"answer":[0,"The default value is 'attachment', which forces the browser to download the image when visiting directly. This was changed to 'attachment' (from 'inline') for added protection since the API can serve arbitrary remote images."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/65631"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-contentdispositiontype-configuration-for-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-contentdispositiontype-configuration-for-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-contentdispositiontype-configuration-for-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `contentDispositionType` configuration for Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'attachment', which forces the browser to download the image when visiting directly. This was changed to 'attachment' (from 'inline') for added protection since the API can serve arbitrary remote images.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/65631" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QEM2L" prefix="r4243" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6224353881105577416"],"question":[0,"What happens if a quality prop is specified that's not in the images.qualities array?"],"answer":[0,"The quality will be coerced to the closest value in images.qualities. For example, a quality prop of 80 is coerced to 75 if qualities: [25, 50, 75] is configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-qualities"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-a-quality-prop-is-specified-that-s-not-in-the-images-qualities-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-a-quality-prop-is-specified-that-s-not-in-the-images-qualities-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-a-quality-prop-is-specified-that-s-not-in-the-images-qualities-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if a quality prop is specified that's not in the images.qualities array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The quality will be coerced to the closest value in images.qualities. For example, a quality prop of 80 is coerced to 75 if qualities: [25, 50, 75] is configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-qualities" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="T9fLT" prefix="r4244" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7267425000192131883"],"question":[0,"What security implications exist when omitting protocol, port, or pathname in remotePatterns?"],"answer":[0,"When omitting protocol, port, pathname, or search then the wildcard ** is implied. This is not recommended because it may allow malicious actors to optimize urls you did not intend."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-implications-exist-when-omitting-protocol-port-or-pathname-in-remo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-implications-exist-when-omitting-protocol-port-or-pathname-in-remo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-implications-exist-when-omitting-protocol-port-or-pathname-in-remo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security implications exist when omitting protocol, port, or pathname in remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When omitting protocol, port, pathname, or search then the wildcard ** is implied. This is not recommended because it may allow malicious actors to optimize urls you did not intend.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mpKGb" prefix="r4245" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8253097322191602434"],"question":[0,"What security implications exist when omitting the search property in remotePatterns?"],"answer":[0,"Omitting the search property allows all search parameters, which could allow malicious actors to optimize URLs you did not intend. The wildcard ** is implied when search is omitted, which is not recommended."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-implications-exist-when-omitting-the-search-property-in-remotepatt"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-implications-exist-when-omitting-the-search-property-in-remotepatt" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-implications-exist-when-omitting-the-search-property-in-remotepatt" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security implications exist when omitting the search property in remotePatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Omitting the search property allows all search parameters, which could allow malicious actors to optimize URLs you did not intend. The wildcard ** is implied when search is omitted, which is not recommended.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25tFJT" prefix="r4246" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8686235544109119863"],"question":[0,"How does the search parameter in remotePatterns match query strings?"],"answer":[0,"The search property requires an exact match of the query string, starting with ?. For example, search: '?v=1727111025337' will ensure the image source must have exactly that query string. Setting search: '' ensures the image must not have a query string."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-search-parameter-in-remotepatterns-match-query-strings"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-search-parameter-in-remotepatterns-match-query-strings" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-search-parameter-in-remotepatterns-match-query-strings" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the search parameter in remotePatterns match query strings?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The search property requires an exact match of the query string, starting with ?. For example, search: '?v=1727111025337' will ensure the image source must have exactly that query string. Setting search: '' ensures the image must not have a query string.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nbSrO" prefix="r4247" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8966109573773513529"],"question":[0,"When was the `images.domains` configuration deprecated in Next.js?"],"answer":[0,"The images.domains configuration was deprecated starting from Next.js 12.3.0 and was replaced with images.remotePatterns for enhanced security."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@andipyk/handling-external-images-in-next-js-remotepatterns-vs-domains-versions-15-3-vs-12-3-06e9c0fe6409"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-images-domains-configuration-deprecated-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-images-domains-configuration-deprecated-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-images-domains-configuration-deprecated-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the `images.domains` configuration deprecated in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The images.domains configuration was deprecated starting from Next.js 12.3.0 and was replaced with images.remotePatterns for enhanced security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@andipyk/handling-external-images-in-next-js-remotepatterns-vs-domains-versions-15-3-vs-12-3-06e9c0fe6409" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eQNie" prefix="r4248" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9994446231554882845"],"question":[0,"What HTTP status code does Next.js return when an image src uses an unconfigured hostname?"],"answer":[0,"400 Bad Request. Any protocol, hostname, port, or unmatched path that isn't configured in remotePatterns will respond with 400 Bad Request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-return-when-an-image-src-uses-an-unconfigured"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-return-when-an-image-src-uses-an-unconfigured" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-return-when-an-image-src-uses-an-unconfigured" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js return when an image src uses an unconfigured hostname?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>400 Bad Request. Any protocol, hostname, port, or unmatched path that isn't configured in remotePatterns will respond with 400 Bad Request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IsCPX" prefix="r4249" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10180501365814220444"],"question":[0,"What additional configuration is strongly recommended when dangerouslyAllowSVG is set to true?"],"answer":[0,"It is strongly recommended to also set contentDispositionType to 'attachment' to force the browser to download the image, as well as contentSecurityPolicy to prevent scripts embedded in the image from executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-additional-configuration-is-strongly-recommended-when-dangerouslyallowsvg-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-additional-configuration-is-strongly-recommended-when-dangerouslyallowsvg-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-additional-configuration-is-strongly-recommended-when-dangerouslyallowsvg-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What additional configuration is strongly recommended when dangerouslyAllowSVG is set to true?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is strongly recommended to also set contentDispositionType to 'attachment' to force the browser to download the image, as well as contentSecurityPolicy to prevent scripts embedded in the image from executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVncTB" prefix="r4250" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10184135133456717999"],"question":[0,"What wildcard syntax does Next.js remotePatterns support for pathname matching?"],"answer":[0,"Next.js supports * which matches a single path segment, and ** which matches any number of path segments at the end. For example, pathname: '/account123/**' matches all paths under /account123/."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61071"]]],"topic":[0,"nextjs"],"slug":[0,"what-wildcard-syntax-does-next-js-remotepatterns-support-for-pathname-matching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-wildcard-syntax-does-next-js-remotepatterns-support-for-pathname-matching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-wildcard-syntax-does-next-js-remotepatterns-support-for-pathname-matching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What wildcard syntax does Next.js remotePatterns support for pathname matching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports * which matches a single path segment, and ** which matches any number of path segments at the end. For example, pathname: '/account123/**' matches all paths under /account123/.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61071" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hHxO3" prefix="r4251" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10303263928069793346"],"question":[0,"Why is it recommended to use the unoptimized prop when the src is known to be SVG?"],"answer":[0,"SVG has many of the same features as HTML/CSS, which can lead to vulnerabilities without proper Content Security Policy (CSP) headers. Using unoptimized bypasses the Image Optimization API and avoids these security risks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-it-recommended-to-use-the-unoptimized-prop-when-the-src-is-known-to-be-sv"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-it-recommended-to-use-the-unoptimized-prop-when-the-src-is-known-to-be-sv" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-it-recommended-to-use-the-unoptimized-prop-when-the-src-is-known-to-be-sv" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is it recommended to use the unoptimized prop when the src is known to be SVG?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SVG has many of the same features as HTML/CSS, which can lead to vulnerabilities without proper Content Security Policy (CSP) headers. Using unoptimized bypasses the Image Optimization API and avoids these security risks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1wWB8B" prefix="r4252" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10409211326074342663"],"question":[0,"What are the default deviceSizes values in Next.js image optimization?"],"answer":[0,"[640, 750, 828, 1080, 1200, 1920, 2048, 3840]. These device width breakpoints are used when the next/image component uses sizes prop to ensure the correct image is served for the user's device."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-devicesizes-values-in-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-devicesizes-values-in-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-devicesizes-values-in-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default deviceSizes values in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[640, 750, 828, 1080, 1200, 1920, 2048, 3840]. These device width breakpoints are used when the next/image component uses sizes prop to ensure the correct image is served for the user's device.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="TyBmi" prefix="r4253" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11304972510572187243"],"question":[0,"Why was `images.domains` deprecated in favor of `remotePatterns`?"],"answer":[0,"The domains configuration does not support wildcard pattern matching and it cannot restrict protocol, port, or pathname. Since most remote image servers are shared between multiple tenants, it's safer to use remotePatterns to ensure only the intended images are optimized and to protect applications from malicious users."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"why-was-images-domains-deprecated-in-favor-of-remotepatterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-was-images-domains-deprecated-in-favor-of-remotepatterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-was-images-domains-deprecated-in-favor-of-remotepatterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why was `images.domains` deprecated in favor of `remotePatterns`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The domains configuration does not support wildcard pattern matching and it cannot restrict protocol, port, or pathname. Since most remote image servers are shared between multiple tenants, it's safer to use remotePatterns to ensure only the intended images are optimized and to protect applications from malicious users.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XKCx6" prefix="r4254" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11452510754606032832"],"question":[0,"Starting with Next.js 16, what image configuration field became required and why?"],"answer":[0,"The images.qualities field became required because unrestricted access could allow malicious actors to optimize more qualities than you intended. You must configure allowed image quality values in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-image-unconfigured-qualities"]]],"topic":[0,"nextjs"],"slug":[0,"starting-with-next-js-16-what-image-configuration-field-became-required-and-why"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="starting-with-next-js-16-what-image-configuration-field-became-required-and-why" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#starting-with-next-js-16-what-image-configuration-field-became-required-and-why" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Starting with Next.js 16, what image configuration field became required and why?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The images.qualities field became required because unrestricted access could allow malicious actors to optimize more qualities than you intended. You must configure allowed image quality values in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-image-unconfigured-qualities" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2sKGQx" prefix="r4255" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11531786244728119643"],"question":[0,"What happens when attempting to optimize a local image path not matching localPatterns?"],"answer":[0,"Attempting to optimize any path that doesn't match the configured localPatterns will respond with a 400 Bad Request error."],"confidence":[0,0.95],"sources":[1,[[0,"https://webcodingcenter.com/next.js/images-Configurations.html"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-attempting-to-optimize-a-local-image-path-not-matching-localpa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-attempting-to-optimize-a-local-image-path-not-matching-localpa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-attempting-to-optimize-a-local-image-path-not-matching-localpa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when attempting to optimize a local image path not matching localPatterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Attempting to optimize any path that doesn't match the configured localPatterns will respond with a 400 Bad Request error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://webcodingcenter.com/next.js/images-Configurations.html" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>webcodingcenter.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1AbyKF" prefix="r4256" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11663168910368719661"],"question":[0,"Can Next.js remotePatterns use a wildcard * for the hostname to allow all domains?"],"answer":[0,"No. Using * as a wildcard for the entire hostname in remotePatterns is not allowed due to security reasons. You can only use wildcards for subdomains (e.g., **.example.com), not for the entire hostname."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/71843"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-remotepatterns-use-a-wildcard-for-the-hostname-to-allow-all-domains"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-remotepatterns-use-a-wildcard-for-the-hostname-to-allow-all-domains" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-remotepatterns-use-a-wildcard-for-the-hostname-to-allow-all-domains" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js remotePatterns use a wildcard * for the hostname to allow all domains?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Using * as a wildcard for the entire hostname in remotePatterns is not allowed due to security reasons. You can only use wildcards for subdomains (e.g., **.example.com), not for the entire hostname.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/71843" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8zUYH" prefix="r4257" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12747638502837790694"],"question":[0,"What is the localPatterns configuration used for in Next.js image optimization?"],"answer":[0,"The localPatterns configuration specifies which local image paths can be optimized and blocks all others. It improves security by ensuring that only trusted local images are optimized and preventing unauthorized access to files outside designated directories."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@vikrant-dev/increase-next-js-14-application-performance-with-image-optimization-fcaf3ad7c8c0"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-localpatterns-configuration-used-for-in-next-js-image-optimization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-localpatterns-configuration-used-for-in-next-js-image-optimization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-localpatterns-configuration-used-for-in-next-js-image-optimization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the localPatterns configuration used for in Next.js image optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The localPatterns configuration specifies which local image paths can be optimized and blocks all others. It improves security by ensuring that only trusted local images are optimized and preventing unauthorized access to files outside designated directories.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@vikrant-dev/increase-next-js-14-application-performance-with-image-optimization-fcaf3ad7c8c0" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z95yCn" prefix="r4258" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14440806950243085203"],"question":[0,"Does Next.js Image Optimization API forward authentication headers when fetching remote images with the default loader?"],"answer":[0,"No. For security reasons, the Image Optimization API using the default loader will not forward headers when fetching the src image. If the src image requires authentication, consider using the unoptimized property to disable Image Optimization."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-image-optimization-api-forward-authentication-headers-when-fetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-image-optimization-api-forward-authentication-headers-when-fetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-image-optimization-api-forward-authentication-headers-when-fetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js Image Optimization API forward authentication headers when fetching remote images with the default loader?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. For security reasons, the Image Optimization API using the default loader will not forward headers when fetching the src image. If the src image requires authentication, consider using the unoptimized property to disable Image Optimization.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="data-fetching-fetch-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Data Fetching > Fetch Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2c8iiE" prefix="r4259" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"345383947477330302"],"question":[0,"What does the cache: 'no-store' option do in Next.js fetch?"],"answer":[0,"Next.js fetches the resource from the remote server on every request, even if Dynamic APIs are not detected on the route. This opts out of caching for individual fetch requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-cache-no-store-option-do-in-next-js-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-cache-no-store-option-do-in-next-js-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-cache-no-store-option-do-in-next-js-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the cache: 'no-store' option do in Next.js fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js fetches the resource from the remote server on every request, even if Dynamic APIs are not detected on the route. This opts out of caching for individual fetch requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2aQlEO" prefix="r4260" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"499885228566011904"],"question":[0,"Are fetch requests automatically memoized in Next.js?"],"answer":[0,"Yes, fetch requests are automatically memoized. Requests with the same URL and options in a single render pass are combined into one request, allowing you to safely request the same data from multiple components without performance concerns."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"are-fetch-requests-automatically-memoized-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-fetch-requests-automatically-memoized-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-fetch-requests-automatically-memoized-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are fetch requests automatically memoized in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, fetch requests are automatically memoized. Requests with the same URL and options in a single render pass are combined into one request, allowing you to safely request the same data from multiple components without performance concerns.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VIBbK" prefix="r4261" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1158361393239705038"],"question":[0,"Are fetch requests in generateMetadata memoized with other functions in Next.js?"],"answer":[0,"Yes, fetch requests inside generateMetadata are automatically memoized for the same data across generateMetadata, generateStaticParams, Layouts, Pages, and Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"are-fetch-requests-in-generatemetadata-memoized-with-other-functions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-fetch-requests-in-generatemetadata-memoized-with-other-functions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-fetch-requests-in-generatemetadata-memoized-with-other-functions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are fetch requests in generateMetadata memoized with other functions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, fetch requests inside generateMetadata are automatically memoized for the same data across generateMetadata, generateStaticParams, Layouts, Pages, and Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZlUrkO" prefix="r4262" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1473212631231230554"],"question":[0,"In which version of Next.js was the fetch API extension introduced?"],"answer":[0,"The fetch API extension was introduced in Next.js v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-of-next-js-was-the-fetch-api-extension-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-of-next-js-was-the-fetch-api-extension-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-of-next-js-was-the-fetch-api-extension-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version of Next.js was the fetch API extension introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The fetch API extension was introduced in Next.js v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jUPj" prefix="r4263" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1893501522492994570"],"question":[0,"What is the preload pattern in Next.js and how is it implemented?"],"answer":[0,"The preload pattern uses a function (customarily named 'preload') to eagerly initiate data fetching before rendering. It uses the void operator: `export const preload = (id: string) => { void getItem(id) }`. The void operator evaluates the expression and returns undefined, allowing async tasks to proceed while data loads in parallel."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-preload-pattern-in-next-js-and-how-is-it-implemented"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-preload-pattern-in-next-js-and-how-is-it-implemented" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-preload-pattern-in-next-js-and-how-is-it-implemented" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the preload pattern in Next.js and how is it implemented?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The preload pattern uses a function (customarily named 'preload') to eagerly initiate data fetching before rendering. It uses the void operator: <code>export const preload = (id: string) => { void getItem(id) }</code>. The void operator evaluates the expression and returns undefined, allowing async tasks to proceed while data loads in parallel.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BBLCD" prefix="r4264" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2579102934025601727"],"question":[0,"What is a critical limitation of Next.js taint APIs?"],"answer":[0,"Tainting can only keep track of objects by reference. Copying an object creates an untainted version. Derived data from tainted values must also be explicitly tainted. The documentation warns: 'Do not rely on the taint API as your only mechanism to prevent exposing sensitive data to the client.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-critical-limitation-of-next-js-taint-apis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-critical-limitation-of-next-js-taint-apis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-critical-limitation-of-next-js-taint-apis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a critical limitation of Next.js taint APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tainting can only keep track of objects by reference. Copying an object creates an untainted version. Derived data from tainted values must also be explicitly tainted. The documentation warns: 'Do not rely on the taint API as your only mechanism to prevent exposing sensitive data to the client.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQDPrc" prefix="r4265" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2843648476141144325"],"question":[0,"How do you enable experimental taint APIs in Next.js?"],"answer":[0,"Set experimental.taint: true in next.config.ts or next.config.js: `const nextConfig: NextConfig = { experimental: { taint: true } }`. This also enables the React experimental channel for the app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-experimental-taint-apis-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-experimental-taint-apis-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-experimental-taint-apis-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable experimental taint APIs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set experimental.taint: true in next.config.ts or next.config.js: <code>const nextConfig: NextConfig = { experimental: { taint: true } }</code>. This also enables the React experimental channel for the app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ypk3w" prefix="r4266" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3809537155939479908"],"question":[0,"What are the two experimental taint APIs available in Next.js?"],"answer":[0,"1) experimental_taintObjectReference - prevents object references from crossing server-client boundaries. 2) experimental_taintUniqueValue - prevents specific values within objects from crossing boundaries."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/taint"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-experimental-taint-apis-available-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-experimental-taint-apis-available-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-experimental-taint-apis-available-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two experimental taint APIs available in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>experimental_taintObjectReference - prevents object references from crossing server-client boundaries. 2) experimental_taintUniqueValue - prevents specific values within objects from crossing boundaries.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/taint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zf7dnO" prefix="r4267" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5731602146080854767"],"question":[0,"What happens when the same URL has conflicting revalidate values in Next.js?"],"answer":[0,"When the same URL has conflicting revalidate values across multiple fetches, the lower value applies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-the-same-url-has-conflicting-revalidate-values-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-the-same-url-has-conflicting-revalidate-values-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-the-same-url-has-conflicting-revalidate-values-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when the same URL has conflicting revalidate values in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When the same URL has conflicting revalidate values across multiple fetches, the lower value applies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="AvdYm" prefix="r4268" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5957604736744650301"],"question":[0,"What happens if you use contradictory cache options in Next.js fetch?"],"answer":[0,"Options like { revalidate: 3600, cache: 'no-store' } are contradictory and both are ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-use-contradictory-cache-options-in-next-js-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-use-contradictory-cache-options-in-next-js-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-use-contradictory-cache-options-in-next-js-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you use contradictory cache options in Next.js fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Options like { revalidate: 3600, cache: 'no-store' } are contradictory and both are ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZLrWbh" prefix="r4269" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6072709028029879661"],"question":[0,"Can the preload function have any name in Next.js?"],"answer":[0,"Yes, the preload function can have any name as it's a pattern, not an API."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-preload-function-have-any-name-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-preload-function-have-any-name-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-preload-function-have-any-name-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the preload function have any name in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the preload function can have any name as it's a pattern, not an API.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24IgUp" prefix="r4270" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6234711203978696655"],"question":[0,"What is the server-only package in Next.js and how do you install it?"],"answer":[0,"The server-only package prevents server-only code from accidentally being imported into client components. Install with: `npm install server-only`. Use by importing at the top of server-only modules: `import 'server-only'`. Client components that try to import server-only code will receive a build-time error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-server-only-package-in-next-js-and-how-do-you-install-it"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-server-only-package-in-next-js-and-how-do-you-install-it" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-server-only-package-in-next-js-and-how-do-you-install-it" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the server-only package in Next.js and how do you install it?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The server-only package prevents server-only code from accidentally being imported into client components. Install with: <code>npm install server-only</code>. Use by importing at the top of server-only modules: <code>import 'server-only'</code>. Client components that try to import server-only code will receive a build-time error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2stsCv" prefix="r4271" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7427319478221852396"],"question":[0,"Does streaming affect SEO in Next.js?"],"answer":[0,"No, streaming doesn't negatively impact SEO. Metadata fetching completes before streaming begins, ensuring <head> tags appear in the initial response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"does-streaming-affect-seo-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-streaming-affect-seo-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-streaming-affect-seo-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does streaming affect SEO in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, streaming doesn't negatively impact SEO. Metadata fetching completes before streaming begins, ensuring <head> tags appear in the initial response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zy13JT" prefix="r4272" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7465734487582221836"],"question":[0,"How long does request memoization last in Next.js?"],"answer":[0,"The cache lasts the lifetime of a server request until the React component tree has finished rendering. Once the route has been rendered and the rendering pass is complete, memory is reset and all request memoization entries are cleared."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-does-request-memoization-last-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-does-request-memoization-last-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-does-request-memoization-last-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long does request memoization last in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cache lasts the lifetime of a server request until the React component tree has finished rendering. Once the route has been rendered and the rendering pass is complete, memory is reset and all request memoization entries are cleared.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tNDJd" prefix="r4273" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8845330490348571245"],"question":[0,"What are the two ways to implement streaming in Next.js applications?"],"answer":[0,"1) Use the loading.js file to stream entire route segments. 2) Use <Suspense> components for granular control over specific components, showing fallback UI while specific content loads."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-ways-to-implement-streaming-in-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-ways-to-implement-streaming-in-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-ways-to-implement-streaming-in-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two ways to implement streaming in Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Use the loading.js file to stream entire route segments. 2) Use <Suspense> components for granular control over specific components, showing fallback UI while specific content loads.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16jYc3" prefix="r4274" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10281870183219719723"],"question":[0,"What happens when a Client Component tries to import a module marked with server-only?"],"answer":[0,"The build fails with a build-time error explaining that the module can only be used on the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-client-component-tries-to-import-a-module-marked-with-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-client-component-tries-to-import-a-module-marked-with-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-client-component-tries-to-import-a-module-marked-with-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a Client Component tries to import a module marked with server-only?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The build fails with a build-time error explaining that the module can only be used on the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2962k7" prefix="r4275" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10317345571988792809"],"question":[0,"What is the difference between Promise.all() and Promise.allSettled() for parallel fetching in Next.js?"],"answer":[0,"Promise.all() fails fast - if any promise rejects, the entire operation fails. Promise.allSettled() always waits for all promises to complete regardless of success or failure, allowing you to handle errors individually. Next.js recommends Promise.allSettled() for error resilience."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-promise-all-and-promise-allsettled-for-parallel-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-promise-all-and-promise-allsettled-for-parallel-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-promise-all-and-promise-allsettled-for-parallel-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between Promise.all() and Promise.allSettled() for parallel fetching in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Promise.all() fails fast - if any promise rejects, the entire operation fails. Promise.allSettled() always waits for all promises to complete regardless of success or failure, allowing you to handle errors individually. Next.js recommends Promise.allSettled() for error resilience.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kCpbq" prefix="r4276" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10401853458995719124"],"question":[0,"Is request memoization a Next.js feature or a React feature?"],"answer":[0,"Request memoization is a React feature, not a Next.js feature. It's included in Next.js documentation to show how it interacts with other caching mechanisms."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"is-request-memoization-a-next-js-feature-or-a-react-feature"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-request-memoization-a-next-js-feature-or-a-react-feature" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-request-memoization-a-next-js-feature-or-a-react-feature" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is request memoization a Next.js feature or a React feature?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization is a React feature, not a Next.js feature. It's included in Next.js documentation to show how it interacts with other caching mechanisms.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="537Ns" prefix="r4277" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11078147825919464902"],"question":[0,"How do you use React's cache() function with Next.js for database or ORM queries?"],"answer":[0,"Wrap your data access function with React's cache(): `import { cache } from 'react'; export const getPost = cache(async (id: string) => { const post = await db.query.posts.findFirst({ where: eq(posts.id, parseInt(id)) }) })`. This memoizes results across the component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-react-s-cache-function-with-next-js-for-database-or-orm-queries"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-react-s-cache-function-with-next-js-for-database-or-orm-queries" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-react-s-cache-function-with-next-js-for-database-or-orm-queries" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use React's cache() function with Next.js for database or ORM queries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap your data access function with React's cache(): <code>import { cache } from 'react'; export const getPost = cache(async (id: string) => { const post = await db.query.posts.findFirst({ where: eq(posts.id, parseInt(id)) }) })</code>. This memoizes results across the component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ihQN0" prefix="r4278" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11197373816896633948"],"question":[0,"What performance metrics does streaming improve in Next.js?"],"answer":[0,"Streaming reduces Time To First Byte (TTFB), First Contentful Paint (FCP), and improves Time to Interactive (TTI), particularly on slower devices."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-metrics-does-streaming-improve-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-metrics-does-streaming-improve-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-metrics-does-streaming-improve-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance metrics does streaming improve in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Streaming reduces Time To First Byte (TTFB), First Contentful Paint (FCP), and improves Time to Interactive (TTI), particularly on slower devices.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pCzry" prefix="r4279" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11358175221988565923"],"question":[0,"What HTTP status code is returned for successful streaming responses in Next.js?"],"answer":[0,"Successful requests return 200 status codes. Errors are communicated through streamed content itself rather than response headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-is-returned-for-successful-streaming-responses-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-is-returned-for-successful-streaming-responses-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-is-returned-for-successful-streaming-responses-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code is returned for successful streaming responses in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Successful requests return 200 status codes. Errors are communicated through streamed content itself rather than response headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kchTT" prefix="r4280" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12564459615246076367"],"question":[0,"What will block rendering and data fetching for the entire tree in Next.js?"],"answer":[0,"Any fetch requests with await will block rendering and data fetching for the entire tree beneath it, unless they are wrapped in a <Suspense> boundary or loading.js is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-will-block-rendering-and-data-fetching-for-the-entire-tree-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-will-block-rendering-and-data-fetching-for-the-entire-tree-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-will-block-rendering-and-data-fetching-for-the-entire-tree-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What will block rendering and data fetching for the entire tree in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any fetch requests with await will block rendering and data fetching for the entire tree beneath it, unless they are wrapped in a <Suspense> boundary or loading.js is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ti29g" prefix="r4281" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13032369102900492112"],"question":[0,"What are the two main data fetching patterns in Next.js?"],"answer":[0,"The two main patterns are: 1) Parallel data fetching - where requests in a route are eagerly initiated and load data at the same time, reducing client-server waterfalls and total load time. 2) Sequential data fetching - where requests are dependent on each other and create waterfalls, which may be intentional when one fetch depends on another's result."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-data-fetching-patterns-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-data-fetching-patterns-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-data-fetching-patterns-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main data fetching patterns in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The two main patterns are: 1) Parallel data fetching - where requests in a route are eagerly initiated and load data at the same time, reducing client-server waterfalls and total load time. 2) Sequential data fetching - where requests are dependent on each other and create waterfalls, which may be intentional when one fetch depends on another's result.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hJch3" prefix="r4282" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13054917354072325185"],"question":[0,"What is the scope of Next.js request memoization in the application?"],"answer":[0,"Request memoization applies to the React Component tree, meaning it applies to fetch requests in generateMetadata, generateStaticParams, Layouts, Pages, and other Server Components. It does NOT apply to fetch requests in Route Handlers as they are not part of the React component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-scope-of-next-js-request-memoization-in-the-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-scope-of-next-js-request-memoization-in-the-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-scope-of-next-js-request-memoization-in-the-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the scope of Next.js request memoization in the application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization applies to the React Component tree, meaning it applies to fetch requests in generateMetadata, generateStaticParams, Layouts, Pages, and other Server Components. It does NOT apply to fetch requests in Route Handlers as they are not part of the React component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1AxNFJ" prefix="r4283" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13060551308743461914"],"question":[0,"What does the cache: 'force-cache' option do in Next.js fetch?"],"answer":[0,"Next.js looks for a matching request in its Data Cache. If there is a match and it is fresh, it will be returned from the cache. If there is no match or a stale match, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-cache-force-cache-option-do-in-next-js-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-cache-force-cache-option-do-in-next-js-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-cache-force-cache-option-do-in-next-js-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the cache: 'force-cache' option do in Next.js fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js looks for a matching request in its Data Cache. If there is a match and it is fresh, it will be returned from the cache. If there is no match or a stale match, Next.js will fetch the resource from the remote server and update the cache with the downloaded resource.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="VITud" prefix="r4284" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14587475867390206050"],"question":[0,"What is the default caching behavior for fetch in Next.js App Router?"],"answer":[0,"The default is 'auto no cache'. Next.js fetches the resource from the remote server on every request in development, but will fetch once during next build because the route will be statically prerendered. Fetch responses are not cached by default, however Next.js will pre-render the route and the output will be cached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is 'auto no cache'. Next.js fetches the resource from the remote server on every request in development, but will fetch once during next build because the route will be statically prerendered. Fetch responses are not cached by default, however Next.js will pre-render the route and the output will be cached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPCDVW" prefix="r4285" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14698405244218005160"],"question":[0,"What are the possible values for options.next.revalidate in Next.js fetch?"],"answer":[0,"false - Cache the resource indefinitely. 0 - Prevent the resource from being cached. number - Specifies cache lifetime in seconds (e.g., revalidate: 3600 for one hour)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/fetch"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-options-next-revalidate-in-next-js-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-options-next-revalidate-in-next-js-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-options-next-revalidate-in-next-js-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for options.next.revalidate in Next.js fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - Cache the resource indefinitely. 0 - Prevent the resource from being cached. number - Specifies cache lifetime in seconds (e.g., revalidate: 3600 for one hour).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/fetch" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="instrumentation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Instrumentation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="106OGY" prefix="r4286" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"746829393476107050"],"question":[0,"Must you export specific functions from instrumentation-client.js?"],"answer":[0,"No, unlike server-side instrumentation, you do not need to export any specific functions from instrumentation-client.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"must-you-export-specific-functions-from-instrumentation-client-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-you-export-specific-functions-from-instrumentation-client-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-you-export-specific-functions-from-instrumentation-client-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must you export specific functions from instrumentation-client.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, unlike server-side instrumentation, you do not need to export any specific functions from instrumentation-client.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20BX7p" prefix="r4287" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2106645815981576463"],"question":[0,"Where must the instrumentation file be located in a Next.js project?"],"answer":[0,"In the root of your application, or inside a src folder if using one. It must NOT be placed inside the app or pages directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-instrumentation-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-instrumentation-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-instrumentation-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the instrumentation file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the root of your application, or inside a src folder if using one. It must NOT be placed inside the app or pages directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GPfHf" prefix="r4288" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2245637277660005333"],"question":[0,"In which Next.js version was onRequestError introduced?"],"answer":[0,"Version 15.0.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-onrequesterror-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-onrequesterror-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-onrequesterror-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was onRequestError introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.0.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z221qGr" prefix="r4289" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2658851717336420915"],"question":[0,"Why might the error instance in onRequestError not be the original error instance?"],"answer":[0,"The error may be processed by React if encountered during Server Components rendering. Use the digest property to identify the actual error type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"why-might-the-error-instance-in-onrequesterror-not-be-the-original-error-instanc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-might-the-error-instance-in-onrequesterror-not-be-the-original-error-instanc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-might-the-error-instance-in-onrequesterror-not-be-the-original-error-instanc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why might the error instance in onRequestError not be the original error instance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error may be processed by React if encountered during Server Components rendering. Use the digest property to identify the actual error type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QLBV" prefix="r4290" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3445971340785185895"],"question":[0,"What do the three navigationType values mean in onRouterTransitionStart?"],"answer":[0,"'push' is for router.push() or Link clicks, 'replace' is for router.replace(), and 'traverse' is for browser back/forward buttons"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-do-the-three-navigationtype-values-mean-in-onroutertransitionstart"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-do-the-three-navigationtype-values-mean-in-onroutertransitionstart" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-do-the-three-navigationtype-values-mean-in-onroutertransitionstart" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What do the three navigationType values mean in onRouterTransitionStart?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'push' is for router.push() or Link clicks, 'replace' is for router.replace(), and 'traverse' is for browser back/forward buttons</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2u5EnO" prefix="r4291" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4825941002066380335"],"question":[0,"What must you do with async tasks in onRequestError?"],"answer":[0,"You must await any async tasks within the onRequestError function"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-you-do-with-async-tasks-in-onrequesterror"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-you-do-with-async-tasks-in-onrequesterror" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-you-do-with-async-tasks-in-onrequesterror" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must you do with async tasks in onRequestError?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must await any async tasks within the onRequestError function</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2msDwt" prefix="r4292" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5868629342012595745"],"question":[0,"What are the possible values for routeType in the onRequestError context parameter?"],"answer":[0,"'render' (Server Components), 'route' (Route Handlers), 'action' (Server Actions), or 'proxy' (Proxy)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-routetype-in-the-onrequesterror-context-paramet"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-routetype-in-the-onrequesterror-context-paramet" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-routetype-in-the-onrequesterror-context-paramet" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for routeType in the onRequestError context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'render' (Server Components), 'route' (Route Handlers), 'action' (Server Actions), or 'proxy' (Proxy)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QSetf" prefix="r4293" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6394839142637277677"],"question":[0,"What are the valid file names for Next.js client-side instrumentation?"],"answer":[0,"instrumentation-client.js or instrumentation-client.ts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-file-names-for-next-js-client-side-instrumentation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-file-names-for-next-js-client-side-instrumentation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-file-names-for-next-js-client-side-instrumentation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid file names for Next.js client-side instrumentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>instrumentation-client.js or instrumentation-client.ts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrLoaQ" prefix="r4294" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8399186633278909223"],"question":[0,"What optional function can be exported from instrumentation.js to track server errors?"],"answer":[0,"onRequestError"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-function-can-be-exported-from-instrumentation-js-to-track-server-e"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-function-can-be-exported-from-instrumentation-js-to-track-server-e" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-function-can-be-exported-from-instrumentation-js-to-track-server-e" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional function can be exported from instrumentation.js to track server errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onRequestError</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5bYQu" prefix="r4295" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8966887584568236316"],"question":[0,"What return type does the register function have?"],"answer":[0,"void or Promise<void>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-does-the-register-function-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-does-the-register-function-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-does-the-register-function-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type does the register function have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>void or Promise<void></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWaJEU" prefix="r4296" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9155562875012114726"],"question":[0,"In which Next.js version was the instrumentation feature first introduced?"],"answer":[0,"Version 13.2.0 (as experimental)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-instrumentation-feature-first-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-instrumentation-feature-first-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-instrumentation-feature-first-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the instrumentation feature first introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 13.2.0 (as experimental)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15cfY9" prefix="r4297" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9185238718520048803"],"question":[0,"In which Next.js version did Turbopack support for instrumentation get added?"],"answer":[0,"Version 14.0.4"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-turbopack-support-for-instrumentation-get-added"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-turbopack-support-for-instrumentation-get-added" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-turbopack-support-for-instrumentation-get-added" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did Turbopack support for instrumentation get added?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 14.0.4</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2caR31" prefix="r4298" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9306992154136484113"],"question":[0,"What are the possible values for revalidateReason in the onRequestError context parameter?"],"answer":[0,"'on-demand' (manual revalidation via revalidatePath/revalidateTag), 'stale' (cached data became stale), or undefined (normal request without revalidation)"],"confidence":[0,0.95],"sources":[1,[[0,"https://app.studyraid.com/en/read/13664/458508/using-the-onrequesterror-hook-for-error-tracking"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-revalidatereason-in-the-onrequesterror-context-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-revalidatereason-in-the-onrequesterror-context-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-revalidatereason-in-the-onrequesterror-context-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for revalidateReason in the onRequestError context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'on-demand' (manual revalidation via revalidatePath/revalidateTag), 'stale' (cached data became stale), or undefined (normal request without revalidation)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://app.studyraid.com/en/read/13664/458508/using-the-onrequesterror-hook-for-error-tracking" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>app.studyraid.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mkuD7" prefix="r4299" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9677485979985205477"],"question":[0,"Where should files with side effects be imported in instrumentation.js?"],"answer":[0,"Import files with side effects within the register function using dynamic import(), not at the top level of the file"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-files-with-side-effects-be-imported-in-instrumentation-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-files-with-side-effects-be-imported-in-instrumentation-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-files-with-side-effects-be-imported-in-instrumentation-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should files with side effects be imported in instrumentation.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import files with side effects within the register function using dynamic import(), not at the top level of the file</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rt9F7" prefix="r4300" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9864452959967400323"],"question":[0,"What optional function can be exported from instrumentation-client.js?"],"answer":[0,"onRouterTransitionStart"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-function-can-be-exported-from-instrumentation-client-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-function-can-be-exported-from-instrumentation-client-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-function-can-be-exported-from-instrumentation-client-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional function can be exported from instrumentation-client.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onRouterTransitionStart</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qnqWq" prefix="r4301" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10324621583680206910"],"question":[0,"In which Next.js version did client-side instrumentation (instrumentation-client.js) become available?"],"answer":[0,"Version 15.3"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-3"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-client-side-instrumentation-instrumentation-client-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-client-side-instrumentation-instrumentation-client-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-client-side-instrumentation-instrumentation-client-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did client-side instrumentation (instrumentation-client.js) become available?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.3</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-3" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3JTzp" prefix="r4302" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10729415599683581017"],"question":[0,"What type must the error parameter be in onRequestError?"],"answer":[0,"Always Error type (the error instance itself includes a digest property which is the unique ID of the error)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-must-the-error-parameter-be-in-onrequesterror"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-must-the-error-parameter-be-in-onrequesterror" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-must-the-error-parameter-be-in-onrequesterror" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type must the error parameter be in onRequestError?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Always Error type (the error instance itself includes a digest property which is the unique ID of the error)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2bLGro" prefix="r4303" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10875223774668371089"],"question":[0,"What are the possible values for routerKind in the onRequestError context parameter?"],"answer":[0,"'Pages Router' or 'App Router'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-routerkind-in-the-onrequesterror-context-parame"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-routerkind-in-the-onrequesterror-context-parame" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-routerkind-in-the-onrequesterror-context-parame" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for routerKind in the onRequestError context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'Pages Router' or 'App Router'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="117VLE" prefix="r4304" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11487350183841619918"],"question":[0,"Is the experimental.instrumentationHook config required in Next.js 15 and later?"],"answer":[0,"No, the experimental.instrumentationHook config option can be removed in Next.js 15 and later because the feature is now stable"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-experimental-instrumentationhook-config-required-in-next-js-15-and-later"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-experimental-instrumentationhook-config-required-in-next-js-15-and-later" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-experimental-instrumentationhook-config-required-in-next-js-15-and-later" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the experimental.instrumentationHook config required in Next.js 15 and later?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the experimental.instrumentationHook config option can be removed in Next.js 15 and later because the feature is now stable</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rAl0H" prefix="r4305" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11812263123091937123"],"question":[0,"What are the two valid values for the NEXT_RUNTIME environment variable?"],"answer":[0,"'nodejs' or 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-valid-values-for-the-next-runtime-environment-variable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-valid-values-for-the-next-runtime-environment-variable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-valid-values-for-the-next-runtime-environment-variable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two valid values for the NEXT_RUNTIME environment variable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' or 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZV958T" prefix="r4306" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11922680657418669559"],"question":[0,"What are the possible values for renderType in the onRequestError context parameter?"],"answer":[0,"'dynamic' or 'dynamic-resume' (where 'dynamic-resume' is for PPR - Partial Prerendering)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-possible-values-for-rendertype-in-the-onrequesterror-context-parame"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-possible-values-for-rendertype-in-the-onrequesterror-context-parame" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-possible-values-for-rendertype-in-the-onrequesterror-context-parame" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the possible values for renderType in the onRequestError context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'dynamic' or 'dynamic-resume' (where 'dynamic-resume' is for PPR - Partial Prerendering)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kGkbE" prefix="r4307" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12683391585062460083"],"question":[0,"In which Next.js version did the instrumentation feature become stable?"],"answer":[0,"Version 15.0.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-the-instrumentation-feature-become-stable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-the-instrumentation-feature-become-stable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-the-instrumentation-feature-become-stable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did the instrumentation feature become stable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.0.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/next-config-js/instrumentationHook" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2it9El" prefix="r4308" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12689671045442731235"],"question":[0,"In which environments does Next.js call the register function?"],"answer":[0,"Next.js calls register in all environments (Node.js, Edge, development, and production)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-environments-does-next-js-call-the-register-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-environments-does-next-js-call-the-register-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-environments-does-next-js-call-the-register-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which environments does Next.js call the register function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js calls register in all environments (Node.js, Edge, development, and production)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uCiBh" prefix="r4309" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13230895769857064844"],"question":[0,"What must you do with the instrumentation filename if you use the pageExtensions config option?"],"answer":[0,"You must update the instrumentation filename to match the suffix. For example, if pageExtensions uses '.page.ts', rename to 'instrumentation.page.ts'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-you-do-with-the-instrumentation-filename-if-you-use-the-pageextensions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-you-do-with-the-instrumentation-filename-if-you-use-the-pageextensions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-you-do-with-the-instrumentation-filename-if-you-use-the-pageextensions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must you do with the instrumentation filename if you use the pageExtensions config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must update the instrumentation filename to match the suffix. For example, if pageExtensions uses '.page.ts', rename to 'instrumentation.page.ts'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zs3B7U" prefix="r4310" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14061851811367852825"],"question":[0,"What properties does the request object contain in onRequestError?"],"answer":[0,"path (string), method (string), and headers (object with string key-value pairs)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-the-request-object-contain-in-onrequesterror"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-the-request-object-contain-in-onrequesterror" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-the-request-object-contain-in-onrequesterror" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does the request object contain in onRequestError?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>path (string), method (string), and headers (object with string key-value pairs)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1It3Kz" prefix="r4311" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14767536304038648597"],"question":[0,"Can the register function in instrumentation.js be async?"],"answer":[0,"Yes, the register function can be an async function"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-register-function-in-instrumentation-js-be-async"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-register-function-in-instrumentation-js-be-async" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-register-function-in-instrumentation-js-be-async" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the register function in instrumentation.js be async?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the register function can be an async function</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1O306m" prefix="r4312" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15063649283759793061"],"question":[0,"What are the parameters of the onRouterTransitionStart function?"],"answer":[0,"url (string - the URL being navigated to) and navigationType ('push' | 'replace' | 'traverse')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-parameters-of-the-onroutertransitionstart-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-parameters-of-the-onroutertransitionstart-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-parameters-of-the-onroutertransitionstart-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the parameters of the onRouterTransitionStart function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>url (string - the URL being navigated to) and navigationType ('push' | 'replace' | 'traverse')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="linking-and-navigating-performance-optimization" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Linking and Navigating > Performance Optimization</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="qfC9V" prefix="r4313" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1026020577909417355"],"question":[0,"When does a Link component trigger prefetching?"],"answer":[0,"Prefetching triggers when a Link component enters the user's viewport (initially or through scroll). Prefetching also happens on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-a-link-component-trigger-prefetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-a-link-component-trigger-prefetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-a-link-component-trigger-prefetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does a Link component trigger prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching triggers when a Link component enters the user's viewport (initially or through scroll). Prefetching also happens on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14alO1" prefix="r4314" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1634150667160145650"],"question":[0,"How many times will the onInvalidate callback be called per prefetch request?"],"answer":[0,"At most once per prefetch request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-will-the-oninvalidate-callback-be-called-per-prefetch-request"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-will-the-oninvalidate-callback-be-called-per-prefetch-request" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-will-the-oninvalidate-callback-be-called-per-prefetch-request" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times will the onInvalidate callback be called per prefetch request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At most once per prefetch request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1EjwB1" prefix="r4315" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2426861120775126978"],"question":[0,"When does the Router Cache get cleared?"],"answer":[0,"The Router Cache is cleared on page refresh. It persists across client-side navigation but not across hard refreshes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-router-cache-get-cleared"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-router-cache-get-cleared" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-router-cache-get-cleared" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the Router Cache get cleared?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Router Cache is cleared on page refresh. It persists across client-side navigation but not across hard refreshes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lrV6U" prefix="r4316" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2945042456734523238"],"question":[0,"What is the minimum buffer size (in bytes) that some browsers require before showing a streaming response in Next.js?"],"answer":[0,"1024 bytes. Some browsers buffer a streaming response and you may not see the streamed response until it exceeds 1024 bytes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-buffer-size-in-bytes-that-some-browsers-require-before-showi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-buffer-size-in-bytes-that-some-browsers-require-before-showi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-buffer-size-in-bytes-that-some-browsers-require-before-showi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum buffer size (in bytes) that some browsers require before showing a streaming response in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1024 bytes. Some browsers buffer a streaming response and you may not see the streamed response until it exceeds 1024 bytes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Jcx1q" prefix="r4317" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5065599822725187595"],"question":[0,"Is prefetching enabled in Next.js development mode?"],"answer":[0,"No. Prefetching is only enabled in production. When running the app in development mode with `npm run dev`, prefetching will not be triggered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"is-prefetching-enabled-in-next-js-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-prefetching-enabled-in-next-js-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-prefetching-enabled-in-next-js-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is prefetching enabled in Next.js development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Prefetching is only enabled in production. When running the app in development mode with <code>npm run dev</code>, prefetching will not be triggered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2his5M" prefix="r4318" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5128301819471031643"],"question":[0,"For dynamic routes without a loading.js file, how long does the prefetch persist?"],"answer":[0,"The prefetch persists until app reload (until the browser session ends)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"for-dynamic-routes-without-a-loading-js-file-how-long-does-the-prefetch-persist"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-dynamic-routes-without-a-loading-js-file-how-long-does-the-prefetch-persist" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-dynamic-routes-without-a-loading-js-file-how-long-does-the-prefetch-persist" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For dynamic routes without a loading.js file, how long does the prefetch persist?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The prefetch persists until app reload (until the browser session ends).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1qDyJS" prefix="r4319" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5241031650422093503"],"question":[0,"Does setting prefetch={false} on a Link component prevent prefetching on hover?"],"answer":[0,"Yes. Setting prefetch={false} disables prefetching both on entering the viewport and on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"does-setting-prefetch-false-on-a-link-component-prevent-prefetching-on-hover"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-setting-prefetch-false-on-a-link-component-prevent-prefetching-on-hover" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-setting-prefetch-false-on-a-link-component-prevent-prefetching-on-hover" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does setting prefetch={false} on a Link component prevent prefetching on hover?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Setting prefetch={false} disables prefetching both on entering the viewport and on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gepJx" prefix="r4320" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6304591404910663271"],"question":[0,"What is the default value of the prefetch prop on the Next.js Link component?"],"answer":[0,"The default value is `null` (also documented as `\"auto\"`), which means prefetching behavior depends on the route type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the prefetch prop on the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>null</code> (also documented as <code>"auto"</code>), which means prefetching behavior depends on the route type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qdR6f" prefix="r4321" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6403912390975520104"],"question":[0,"With the default prefetch behavior (null), what gets prefetched for static routes?"],"answer":[0,"For static routes with default prefetch behavior, the full route and all associated data are prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"with-the-default-prefetch-behavior-null-what-gets-prefetched-for-static-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="with-the-default-prefetch-behavior-null-what-gets-prefetched-for-static-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#with-the-default-prefetch-behavior-null-what-gets-prefetched-for-static-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">With the default prefetch behavior (null), what gets prefetched for static routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For static routes with default prefetch behavior, the full route and all associated data are prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zg6oOC" prefix="r4322" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6482925937743989311"],"question":[0,"What does Next.js store in the Router Cache?"],"answer":[0,"The Router Cache stores the React Server Component (RSC) Payload of prefetched route segments and visited routes, split by individual route segment including layouts, loading states, and pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-next-js-store-in-the-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-next-js-store-in-the-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-next-js-store-in-the-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Next.js store in the Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Router Cache stores the React Server Component (RSC) Payload of prefetched route segments and visited routes, split by individual route segment including layouts, loading states, and pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ESJ22" prefix="r4323" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6522307635539191447"],"question":[0,"Does Next.js prefetch routes when a user has Save-Data enabled?"],"answer":[0,"No. Next.js automatically disables prefetching when the network connection is slow or when users have Save-Data turned on."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-prefetch-routes-when-a-user-has-save-data-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-prefetch-routes-when-a-user-has-save-data-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-prefetch-routes-when-a-user-has-save-data-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js prefetch routes when a user has Save-Data enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js automatically disables prefetching when the network connection is slow or when users have Save-Data turned on.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SmNrs" prefix="r4324" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7234145320059015412"],"question":[0,"Are page segments cached by default in Next.js 15?"],"answer":[0,"No. As of Next.js 15, page segments are opted out by default, meaning pages won't be cached in the Router Cache unless explicitly configured through prefetching."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"are-page-segments-cached-by-default-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-page-segments-cached-by-default-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-page-segments-cached-by-default-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are page segments cached by default in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. As of Next.js 15, page segments are opted out by default, meaning pages won't be cached in the Router Cache unless explicitly configured through prefetching.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29B4xg" prefix="r4325" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7768486473347906080"],"question":[0,"What was the previous default cache duration for dynamic routes before Next.js 15?"],"answer":[0,"30 seconds. This was changed to 0 seconds (not cached) in Next.js 15.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-previous-default-cache-duration-for-dynamic-routes-before-next-js-1"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-previous-default-cache-duration-for-dynamic-routes-before-next-js-1" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-previous-default-cache-duration-for-dynamic-routes-before-next-js-1" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the previous default cache duration for dynamic routes before Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds. This was changed to 0 seconds (not cached) in Next.js 15.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Y04fF" prefix="r4326" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7812821880065437735"],"question":[0,"For dynamic routes with a loading.js file, how long is the prefetch cached?"],"answer":[0,"30 seconds (configurable via staleTimes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"for-dynamic-routes-with-a-loading-js-file-how-long-is-the-prefetch-cached"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-dynamic-routes-with-a-loading-js-file-how-long-is-the-prefetch-cached" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-dynamic-routes-with-a-loading-js-file-how-long-is-the-prefetch-cached" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For dynamic routes with a loading.js file, how long is the prefetch cached?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds (configurable via staleTimes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZUJtpp" prefix="r4327" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8128841971406987206"],"question":[0,"What is the default Router Cache TTL for dynamic routes in Next.js?"],"answer":[0,"0 seconds (not cached) as of Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-router-cache-ttl-for-dynamic-routes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-router-cache-ttl-for-dynamic-routes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-router-cache-ttl-for-dynamic-routes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Router Cache TTL for dynamic routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 seconds (not cached) as of Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8LsBD" prefix="r4328" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8137412348300861912"],"question":[0,"With the default prefetch behavior (null), what gets prefetched for dynamic routes?"],"answer":[0,"For dynamic routes with default prefetch behavior, prefetching extends only to the nearest segment with a `loading.js` boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"with-the-default-prefetch-behavior-null-what-gets-prefetched-for-dynamic-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="with-the-default-prefetch-behavior-null-what-gets-prefetched-for-dynamic-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#with-the-default-prefetch-behavior-null-what-gets-prefetched-for-dynamic-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">With the default prefetch behavior (null), what gets prefetched for dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For dynamic routes with default prefetch behavior, prefetching extends only to the nearest segment with a <code>loading.js</code> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Bo2su" prefix="r4329" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8626322648513574662"],"question":[0,"Does partial rendering affect shared layout fetching during navigation?"],"answer":[0,"No. Partial rendering doesn't affect shared layouts, meaning shared layouts won't automatically be refetched on every navigation, only the page segment that changes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"does-partial-rendering-affect-shared-layout-fetching-during-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-partial-rendering-affect-shared-layout-fetching-during-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-partial-rendering-affect-shared-layout-fetching-during-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does partial rendering affect shared layout fetching during navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Partial rendering doesn't affect shared layouts, meaning shared layouts won't automatically be refetched on every navigation, only the page segment that changes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lXuqF" prefix="r4330" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8761388849150923514"],"question":[0,"In which Next.js version was the onInvalidate callback for router.prefetch introduced?"],"answer":[0,"Version 15.4.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-oninvalidate-callback-for-router-prefetch-intro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-oninvalidate-callback-for-router-prefetch-intro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-oninvalidate-callback-for-router-prefetch-intro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the onInvalidate callback for router.prefetch introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.4.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2sGsbB" prefix="r4331" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9389957171377616863"],"question":[0,"What experimental config option can be used to adjust Router Cache automatic invalidation times?"],"answer":[0,"The experimental `staleTimes` config option in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-config-option-can-be-used-to-adjust-router-cache-automatic-inv"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-config-option-can-be-used-to-adjust-router-cache-automatic-inv" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-config-option-can-be-used-to-adjust-router-cache-automatic-inv" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental config option can be used to adjust Router Cache automatic invalidation times?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The experimental <code>staleTimes</code> config option in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11btrQ" prefix="r4332" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10283533662195119965"],"question":[0,"What rootMargin value does Next.js use for the Intersection Observer in Link prefetching?"],"answer":[0,"200px. This means Next.js starts prefetching when links come within 200 pixels of entering the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/7196/files"]]],"topic":[0,"nextjs"],"slug":[0,"what-rootmargin-value-does-next-js-use-for-the-intersection-observer-in-link-pre"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-rootmargin-value-does-next-js-use-for-the-intersection-observer-in-link-pre" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-rootmargin-value-does-next-js-use-for-the-intersection-observer-in-link-pre" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What rootMargin value does Next.js use for the Intersection Observer in Link prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>200px. This means Next.js starts prefetching when links come within 200 pixels of entering the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/7196/files" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hEd0s" prefix="r4333" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11637466941130528119"],"question":[0,"What type of navigation does the Next.js App Router use by default?"],"answer":[0,"Soft navigation. The App Router uses soft navigation, which means React only renders the segments that have changed while preserving React and browser state, instead of hard navigation where the browser reloads the page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-navigation-does-the-next-js-app-router-use-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-navigation-does-the-next-js-app-router-use-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-navigation-does-the-next-js-app-router-use-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of navigation does the Next.js App Router use by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Soft navigation. The App Router uses soft navigation, which means React only renders the segments that have changed while preserving React and browser state, instead of hard navigation where the browser reloads the page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14XPc2" prefix="r4334" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11983498442744933329"],"question":[0,"What is the method signature for manual prefetching using the useRouter hook?"],"answer":[0,"router.prefetch(href: string, options?: { onInvalidate?: () => void })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-method-signature-for-manual-prefetching-using-the-userouter-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-method-signature-for-manual-prefetching-using-the-userouter-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-method-signature-for-manual-prefetching-using-the-userouter-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the method signature for manual prefetching using the useRouter hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.prefetch(href: string, options?: { onInvalidate?: () => void })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OSGqq" prefix="r4335" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12298502925318746744"],"question":[0,"What happens to shared layouts during Next.js client-side navigation?"],"answer":[0,"Shared layouts preserve state, remain interactive, and do not re-render during client-side navigation. Only the route segments that change are re-rendered (partial rendering)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-shared-layouts-during-next-js-client-side-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-shared-layouts-during-next-js-client-side-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-shared-layouts-during-next-js-client-side-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to shared layouts during Next.js client-side navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Shared layouts preserve state, remain interactive, and do not re-render during client-side navigation. Only the route segments that change are re-rendered (partial rendering).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16RnW0" prefix="r4336" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12697231007813181656"],"question":[0,"What happens when Next.js wraps page.tsx contents when using loading.js?"],"answer":[0,"Next.js automatically wraps the page.tsx contents in a <Suspense> boundary when a loading.js file exists."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-next-js-wraps-page-tsx-contents-when-using-loading-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-next-js-wraps-page-tsx-contents-when-using-loading-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-next-js-wraps-page-tsx-contents-when-using-loading-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when Next.js wraps page.tsx contents when using loading.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically wraps the page.tsx contents in a <Suspense> boundary when a loading.js file exists.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zxrh2X" prefix="r4337" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13351082953671045560"],"question":[0,"What Core Web Vitals metrics does Next.js navigation optimization aim to improve?"],"answer":[0,"TTFB (Time to First Byte), FCP (First Contentful Paint), and TTI (Time to Interactive)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-core-web-vitals-metrics-does-next-js-navigation-optimization-aim-to-improve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-core-web-vitals-metrics-does-next-js-navigation-optimization-aim-to-improve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-core-web-vitals-metrics-does-next-js-navigation-optimization-aim-to-improve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Core Web Vitals metrics does Next.js navigation optimization aim to improve?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TTFB (Time to First Byte), FCP (First Contentful Paint), and TTI (Time to Interactive).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18JPyl" prefix="r4338" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14331155198848324936"],"question":[0,"Do standard HTML <a> tags trigger prefetching in Next.js?"],"answer":[0,"No. Only the Next.js <Link> component triggers automatic prefetching. Standard HTML <a> tags do not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"do-standard-html-a-tags-trigger-prefetching-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-standard-html-a-tags-trigger-prefetching-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-standard-html-a-tags-trigger-prefetching-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do standard HTML <a> tags trigger prefetching in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Only the Next.js <Link> component triggers automatic prefetching. Standard HTML <a> tags do not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rtRFq" prefix="r4339" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14517608926535636493"],"question":[0,"What are the three accepted values for the prefetch prop on the Link component?"],"answer":[0,"The three values are: (1) `null` or `\"auto\"` (default) - route-type dependent behavior, (2) `true` - full prefetch for both static and dynamic routes, (3) `false` - prefetching entirely disabled on viewport entry and hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-accepted-values-for-the-prefetch-prop-on-the-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-accepted-values-for-the-prefetch-prop-on-the-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-accepted-values-for-the-prefetch-prop-on-the-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three accepted values for the prefetch prop on the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three values are: (1) <code>null</code> or <code>"auto"</code> (default) - route-type dependent behavior, (2) <code>true</code> - full prefetch for both static and dynamic routes, (3) <code>false</code> - prefetching entirely disabled on viewport entry and hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-actions-invocation-methods" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server Actions > Invocation Methods</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 27 questions </span> </div> <div class="space-y-4"> <astro-island uid="UwSLq" prefix="r4340" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1608425891484351106"],"question":[0,"What formats are supported for the bodySizeLimit configuration in Server Actions?"],"answer":[0,"Numeric bytes (e.g., `1000`), or string formats like `'500kb'` or `'3mb'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-formats-are-supported-for-the-bodysizelimit-configuration-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-formats-are-supported-for-the-bodysizelimit-configuration-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-formats-are-supported-for-the-bodysizelimit-configuration-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What formats are supported for the bodySizeLimit configuration in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Numeric bytes (e.g., <code>1000</code>), or string formats like <code>'500kb'</code> or <code>'3mb'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z12r2Fs" prefix="r4341" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2059754856121248524"],"question":[0,"What does `useActionState` return?"],"answer":[0,"An array with three elements: [state, formAction, isPending] - the current state, a new action function to pass to the form, and a boolean indicating whether a transition is pending."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useactionstate-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useactionstate-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useactionstate-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does `useActionState` return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array with three elements: [state, formAction, isPending] - the current state, a new action function to pass to the form, and a boolean indicating whether a transition is pending.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="155pEg" prefix="r4342" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2966000526420492402"],"question":[0,"How do Client Components handle form submissions with Server Actions before JavaScript loads?"],"answer":[0,"In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-client-components-handle-form-submissions-with-server-actions-before-java"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-client-components-handle-form-submissions-with-server-actions-before-java" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-client-components-handle-form-submissions-with-server-actions-before-java" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do Client Components handle form submissions with Server Actions before JavaScript loads?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="abgGN" prefix="r4343" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3282252906804103266"],"question":[0,"Does the `bind()` method with Server Actions support Progressive Enhancement?"],"answer":[0,"Yes, `bind()` works in both Server and Client Components and supports Progressive Enhancement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-bind-method-with-server-actions-support-progressive-enhancement"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-bind-method-with-server-actions-support-progressive-enhancement" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-bind-method-with-server-actions-support-progressive-enhancement" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the `bind()` method with Server Actions support Progressive Enhancement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, <code>bind()</code> works in both Server and Client Components and supports Progressive Enhancement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24GOGf" prefix="r4344" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3656140619402906844"],"question":[0,"What are the two ways to use the \"use server\" directive?"],"answer":[0,"1) File-level (module-level): at the top of a file to mark all exports as Server Actions, and 2) Inline function-level: at the top of a function body to mark that specific function as a Server Action."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-ways-to-use-the-use-server-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-ways-to-use-the-use-server-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-ways-to-use-the-use-server-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two ways to use the "use server" directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>File-level (module-level): at the top of a file to mark all exports as Server Actions, and 2) Inline function-level: at the top of a function body to mark that specific function as a Server Action.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2bJ7H3" prefix="r4345" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4185964673384209766"],"question":[0,"What is the default bodySizeLimit for Server Actions in Next.js?"],"answer":[0,"1MB (1 megabyte)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bodysizelimit-for-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bodysizelimit-for-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bodysizelimit-for-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bodySizeLimit for Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1MB (1 megabyte).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="eL6M4" prefix="r4346" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4683490574817037616"],"question":[0,"What HTTP method do Server Actions use?"],"answer":[0,"Server Actions use only the POST method. This is the only HTTP method allowed to invoke them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-do-server-actions-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-do-server-actions-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-do-server-actions-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method do Server Actions use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions use only the POST method. This is the only HTTP method allowed to invoke them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1X2dr" prefix="r4347" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4781407774908007698"],"question":[0,"What is the return type of the `useFormStatus` hook?"],"answer":[0,"An object with four properties: `pending` (boolean), `data` (FormData | null), `method` (string: 'get' or 'post'), and `action` (function | null)."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-return-type-of-the-useformstatus-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-return-type-of-the-useformstatus-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-return-type-of-the-useformstatus-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the return type of the `useFormStatus` hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An object with four properties: <code>pending</code> (boolean), <code>data</code> (FormData | null), <code>method</code> (string: 'get' or 'post'), and <code>action</code> (function | null).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1obxMs" prefix="r4348" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5171184617610076947"],"question":[0,"Which HTML elements accept the `formAction` prop for Server Actions?"],"answer":[0,"`<button>`, `<input type=\"submit\">`, and `<input type=\"image\">` elements nested inside a `<form>` accept the formAction prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"which-html-elements-accept-the-formaction-prop-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-html-elements-accept-the-formaction-prop-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-html-elements-accept-the-formaction-prop-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTML elements accept the `formAction` prop for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code><button></code>, <code><input type="submit"></code>, and <code><input type="image"></code> elements nested inside a <code><form></code> accept the formAction prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="oluDC" prefix="r4349" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5262181715123462091"],"question":[0,"What was `useActionState` called in earlier React versions?"],"answer":[0,"In earlier React Canary versions, this API was part of React DOM and called `useFormState`."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-useactionstate-called-in-earlier-react-versions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-useactionstate-called-in-earlier-react-versions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-useactionstate-called-in-earlier-react-versions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was `useActionState` called in earlier React versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In earlier React Canary versions, this API was part of React DOM and called <code>useFormState</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHmmqV" prefix="r4350" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7680751172946907067"],"question":[0,"Can Server Actions be invoked using the `useEffect` hook?"],"answer":[0,"Yes, you can use the React useEffect hook to invoke a Server Action when the component mounts or a dependency changes. This is useful for mutations triggered automatically, like updating view counts or responding to global events."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-invoked-using-the-useeffect-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-invoked-using-the-useeffect-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-invoked-using-the-useeffect-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be invoked using the `useEffect` hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can use the React useEffect hook to invoke a Server Action when the component mounts or a dependency changes. This is useful for mutations triggered automatically, like updating view counts or responding to global events.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="U9VoP" prefix="r4351" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7687985023707166383"],"question":[0,"Can Client Components define Server Actions directly inline in the same file?"],"answer":[0,"No, Client Components can only import Server Actions from a file that uses the module-level \"use server\" directive at the top. They cannot define Server Actions inline."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-define-server-actions-directly-inline-in-the-same-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-define-server-actions-directly-inline-in-the-same-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-define-server-actions-directly-inline-in-the-same-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components define Server Actions directly inline in the same file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Client Components can only import Server Actions from a file that uses the module-level "use server" directive at the top. They cannot define Server Actions inline.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Pktyf" prefix="r4352" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7825676578926714484"],"question":[0,"Which \"use server\" directive options are available to Client Components?"],"answer":[0,"Client Components can only import actions that use the module-level \"use server\" directive. They cannot use inline function-level directives."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"which-use-server-directive-options-are-available-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-use-server-directive-options-are-available-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-use-server-directive-options-are-available-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which "use server" directive options are available to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Client Components can only import actions that use the module-level "use server" directive. They cannot use inline function-level directives.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BGCyG" prefix="r4353" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9260621484845563518"],"question":[0,"What React hook allows optimistic UI updates with Server Actions?"],"answer":[0,"The `useOptimistic` hook allows you to optimistically update the UI before the Server Action finishes executing, rather than waiting for the response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-hook-allows-optimistic-ui-updates-with-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-hook-allows-optimistic-ui-updates-with-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-hook-allows-optimistic-ui-updates-with-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React hook allows optimistic UI updates with Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>useOptimistic</code> hook allows you to optimistically update the UI before the Server Action finishes executing, rather than waiting for the response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsVNLv" prefix="r4354" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10001115839841619148"],"question":[0,"What configuration option controls which origins can invoke Server Actions?"],"answer":[0,"The `allowedOrigins` option in serverActions configuration. By default, only same-origin requests are permitted. You can specify additional safe domains, including wildcard patterns like `'*.my-proxy.com'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-controls-which-origins-can-invoke-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-controls-which-origins-can-invoke-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-controls-which-origins-can-invoke-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option controls which origins can invoke Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>allowedOrigins</code> option in serverActions configuration. By default, only same-origin requests are permitted. You can specify additional safe domains, including wildcard patterns like <code>'*.my-proxy.com'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cSDEF" prefix="r4355" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10034591279636530397"],"question":[0,"Can you have multiple Server Actions in a single form?"],"answer":[0,"Yes, you can call multiple Server Actions within a form using the `formAction` prop on elements like buttons, which overrides the form's default action."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-have-multiple-server-actions-in-a-single-form"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-have-multiple-server-actions-in-a-single-form" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-have-multiple-server-actions-in-a-single-form" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you have multiple Server Actions in a single form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can call multiple Server Actions within a form using the <code>formAction</code> prop on elements like buttons, which overrides the form's default action.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mpUP2" prefix="r4356" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10325285972543189644"],"question":[0,"Is the action returned from `useActionState` an awaitable Promise?"],"answer":[0,"No, the action returned from useActionState is not a Promise. It is designed as a trigger for form submissions rather than an awaitable promise."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/67124"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-action-returned-from-useactionstate-an-awaitable-promise"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-action-returned-from-useactionstate-an-awaitable-promise" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-action-returned-from-useactionstate-an-awaitable-promise" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the action returned from `useActionState` an awaitable Promise?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the action returned from useActionState is not a Promise. It is designed as a trigger for form submissions rather than an awaitable promise.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/67124" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ef0jU" prefix="r4357" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10812697640129545723"],"question":[0,"Do forms with Server Actions work when JavaScript is disabled in Server Components?"],"answer":[0,"Yes, Server Components support progressive enhancement by default, meaning forms will be submitted even if JavaScript hasn't loaded yet or is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"do-forms-with-server-actions-work-when-javascript-is-disabled-in-server-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-forms-with-server-actions-work-when-javascript-is-disabled-in-server-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-forms-with-server-actions-work-when-javascript-is-disabled-in-server-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do forms with Server Actions work when JavaScript is disabled in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Components support progressive enhancement by default, meaning forms will be submitted even if JavaScript hasn't loaded yet or is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZemXgw" prefix="r4358" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11310798928706700980"],"question":[0,"Can Server Components use both inline and module-level \"use server\" directives?"],"answer":[0,"Yes, Server Components can use either the inline function level or module level \"use server\" directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-components-use-both-inline-and-module-level-use-server-directives"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-components-use-both-inline-and-module-level-use-server-directives" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-components-use-both-inline-and-module-level-use-server-directives" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Components use both inline and module-level "use server" directives?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Components can use either the inline function level or module level "use server" directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vFNG1" prefix="r4359" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11313083194892912382"],"question":[0,"Where must the `useFormStatus` hook be called in relation to the form?"],"answer":[0,"useFormStatus must be called from a component that is rendered inside (as a child of) the `<form>` element. It will not return status information for a form rendered in the same component where the hook is called."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-useformstatus-hook-be-called-in-relation-to-the-form"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-useformstatus-hook-be-called-in-relation-to-the-form" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-useformstatus-hook-be-called-in-relation-to-the-form" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the `useFormStatus` hook be called in relation to the form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useFormStatus must be called from a component that is rendered inside (as a child of) the <code><form></code> element. It will not return status information for a form rendered in the same component where the hook is called.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mCa9X" prefix="r4360" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11653046935792228956"],"question":[0,"What are the three primary ways to invoke Server Actions in Next.js?"],"answer":[0,"1) Using the `action` prop on a `<form>` element, 2) Using the `formAction` prop on nested form elements like `<button>`, `<input type=\"submit\">`, and `<input type=\"image\">`, and 3) Custom invocation with `startTransition` from the useTransition hook."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-primary-ways-to-invoke-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-primary-ways-to-invoke-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-primary-ways-to-invoke-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three primary ways to invoke Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Using the <code>action</code> prop on a <code><form></code> element, 2) Using the <code>formAction</code> prop on nested form elements like <code><button></code>, <code><input type="submit"></code>, and <code><input type="image"></code>, and 3) Custom invocation with <code>startTransition</code> from the useTransition hook.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RcOKG" prefix="r4361" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11685802143296288489"],"question":[0,"What are the alternatives to using `bind()` for passing additional data to Server Actions?"],"answer":[0,"Hidden input fields (e.g., `<input type=\"hidden\" name=\"userId\" value={userId} />`). However, the value will be part of the rendered HTML and not encoded, so `bind()` is preferred for sensitive data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-alternatives-to-using-bind-for-passing-additional-data-to-server-ac"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-alternatives-to-using-bind-for-passing-additional-data-to-server-ac" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-alternatives-to-using-bind-for-passing-additional-data-to-server-ac" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the alternatives to using `bind()` for passing additional data to Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Hidden input fields (e.g., <code><input type="hidden" name="userId" value={userId} /></code>). However, the value will be part of the rendered HTML and not encoded, so <code>bind()</code> is preferred for sensitive data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z26RzLY" prefix="r4362" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11775597074911500655"],"question":[0,"How does `useActionState` change a Server Action's function signature?"],"answer":[0,"It adds an extra argument as the first parameter - the previous or initial state - before the FormData parameter. The signature changes from `async function(formData)` to `async function(previousState, formData)`."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-useactionstate-change-a-server-action-s-function-signature"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-useactionstate-change-a-server-action-s-function-signature" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-useactionstate-change-a-server-action-s-function-signature" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does `useActionState` change a Server Action's function signature?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It adds an extra argument as the first parameter - the previous or initial state - before the FormData parameter. The signature changes from <code>async function(formData)</code> to <code>async function(previousState, formData)</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1q9d79" prefix="r4363" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12492703342372788003"],"question":[0,"Can Server Actions be invoked from event handlers like `onClick` in Client Components?"],"answer":[0,"Yes, Server Actions can be invoked from event handlers such as onClick, onMouseOver, onMouseOut, etc. in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-invoked-from-event-handlers-like-onclick-in-client-compone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-invoked-from-event-handlers-like-onclick-in-client-compone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-invoked-from-event-handlers-like-onclick-in-client-compone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be invoked from event handlers like `onClick` in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Actions can be invoked from event handlers such as onClick, onMouseOver, onMouseOut, etc. in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7xnJG" prefix="r4364" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13387141858496567325"],"question":[0,"What functions can you call within Server Actions to revalidate cached data after mutations?"],"answer":[0,"You can call `revalidatePath()` to revalidate a specific route path, or `revalidateTag()` to revalidate cache entries with a specific tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-functions-can-you-call-within-server-actions-to-revalidate-cached-data-afte"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-functions-can-you-call-within-server-actions-to-revalidate-cached-data-afte" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-functions-can-you-call-within-server-actions-to-revalidate-cached-data-afte" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What functions can you call within Server Actions to revalidate cached data after mutations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can call <code>revalidatePath()</code> to revalidate a specific route path, or <code>revalidateTag()</code> to revalidate cache entries with a specific tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dFy1s" prefix="r4365" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14339618240364076066"],"question":[0,"How do you pass additional arguments to a Server Action beyond FormData?"],"answer":[0,"Use JavaScript's `bind()` method. For example: `const actionWithId = updateUser.bind(null, userId)` where the first argument to bind is the context (null if not changing it) and subsequent arguments are passed to the action."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-pass-additional-arguments-to-a-server-action-beyond-formdata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-pass-additional-arguments-to-a-server-action-beyond-formdata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-pass-additional-arguments-to-a-server-action-beyond-formdata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you pass additional arguments to a Server Action beyond FormData?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use JavaScript's <code>bind()</code> method. For example: <code>const actionWithId = updateUser.bind(null, userId)</code> where the first argument to bind is the context (null if not changing it) and subsequent arguments are passed to the action.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jku8B" prefix="r4366" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14946961308268850722"],"question":[0,"Does using `startTransition` to invoke Server Actions support Progressive Enhancement?"],"answer":[0,"No, using startTransition to invoke Server Actions disables Progressive Enhancement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using `startTransition` to invoke Server Actions support Progressive Enhancement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, using startTransition to invoke Server Actions disables Progressive Enhancement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="styling-external-integrations" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Styling > External Integrations</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="Zf3twg" prefix="r4367" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4845367781348600"],"question":[0,"What is the default value of the pure option in styled-components compiler configuration?"],"answer":[0,"The `pure` option is disabled by default. It enables tree-shaking optimization when set to true."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-pure-option-in-styled-components-compiler-confi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-pure-option-in-styled-components-compiler-confi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-pure-option-in-styled-components-compiler-confi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the pure option in styled-components compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>pure</code> option is disabled by default. It enables tree-shaking optimization when set to true.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kGyGr" prefix="r4368" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"352999955673122626"],"question":[0,"Can external stylesheets from npm packages be imported anywhere in the Next.js App Router?"],"answer":[0,"Yes, stylesheets published by external packages can be imported anywhere in the app directory, including colocated components. For example: `import 'bootstrap/dist/css/bootstrap.css'`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"can-external-stylesheets-from-npm-packages-be-imported-anywhere-in-the-next-js-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-external-stylesheets-from-npm-packages-be-imported-anywhere-in-the-next-js-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-external-stylesheets-from-npm-packages-be-imported-anywhere-in-the-next-js-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can external stylesheets from npm packages be imported anywhere in the Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, stylesheets published by external packages can be imported anywhere in the app directory, including colocated components. For example: <code>import 'bootstrap/dist/css/bootstrap.css'</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PUWx6" prefix="r4369" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"569140154987300374"],"question":[0,"What is the default value of the meaninglessFileNames option in the styled-components compiler configuration?"],"answer":[0,"The default value is `[\"index\"]`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-meaninglessfilenames-option-in-the-styled-compo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-meaninglessfilenames-option-in-the-styled-compo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-meaninglessfilenames-option-in-the-styled-compo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the meaninglessFileNames option in the styled-components compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>["index"]</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z102Klt" prefix="r4370" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1370478922197381931"],"question":[0,"What command generates both tailwind.config.js and postcss.config.js files?"],"answer":[0,"`npx tailwindcss init -p` generates both required configuration files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-both-tailwind-config-js-and-postcss-config-js-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-both-tailwind-config-js-and-postcss-config-js-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-both-tailwind-config-js-and-postcss-config-js-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates both tailwind.config.js and postcss.config.js files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>npx tailwindcss init -p</code> generates both required configuration files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z276lfE" prefix="r4371" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2185341432059696875"],"question":[0,"What happens to CSS files in Next.js production builds?"],"answer":[0,"In production (next build), all CSS files are automatically concatenated into many minified and code-split .css files, ensuring the minimal amount of CSS is loaded for a route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-css-files-in-next-js-production-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-css-files-in-next-js-production-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-css-files-in-next-js-production-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to CSS files in Next.js production builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In production (next build), all CSS files are automatically concatenated into many minified and code-split .css files, ensuring the minimal amount of CSS is loaded for a route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20XVEO" prefix="r4372" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2268973238703370102"],"question":[0,"What is the default Sass implementation used by Next.js?"],"answer":[0,"By default, Next.js uses the `sass` package as its Sass implementation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-sass-implementation-used-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-sass-implementation-used-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-sass-implementation-used-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Sass implementation used by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js uses the <code>sass</code> package as its Sass implementation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vFnfR" prefix="r4373" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3831031374827906833"],"question":[0,"What package must be installed to use Sass in Next.js?"],"answer":[0,"You must install the `sass` package as a development dependency: `npm install --save-dev sass`. Next.js has built-in support after this package is installed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/sass"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-must-be-installed-to-use-sass-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-must-be-installed-to-use-sass-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-must-be-installed-to-use-sass-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package must be installed to use Sass in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must install the <code>sass</code> package as a development dependency: <code>npm install --save-dev sass</code>. Next.js has built-in support after this package is installed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/sass" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Lqn00" prefix="r4374" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4725102203865328204"],"question":[0,"What three Tailwind directives must be included in the global CSS file?"],"answer":[0,"`@tailwind base;`, `@tailwind components;`, and `@tailwind utilities;` must be included in the global CSS file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-tailwind-directives-must-be-included-in-the-global-css-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-tailwind-directives-must-be-included-in-the-global-css-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-tailwind-directives-must-be-included-in-the-global-css-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three Tailwind directives must be included in the global CSS file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>@tailwind base;</code>, <code>@tailwind components;</code>, and <code>@tailwind utilities;</code> must be included in the global CSS file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="HBXgF" prefix="r4375" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4930420008465514639"],"question":[0,"How can you inject Sass code into all Sass files in Next.js?"],"answer":[0,"Use the `sassOptions.additionalData` property in next.config.js. Example: `sassOptions: { additionalData: '$var: red;' }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-inject-sass-code-into-all-sass-files-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-inject-sass-code-into-all-sass-files-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-inject-sass-code-into-all-sass-files-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you inject Sass code into all Sass files in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>sassOptions.additionalData</code> property in next.config.js. Example: <code>sassOptions: { additionalData: '$var: red;' }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nfIOd" prefix="r4376" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5330775690075660407"],"question":[0,"Is Emotion fully compatible with Next.js App Router Server Components?"],"answer":[0,"No, Emotion is currently working on support but is not yet fully compatible. It requires using Client Components with 'use client' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"is-emotion-fully-compatible-with-next-js-app-router-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-emotion-fully-compatible-with-next-js-app-router-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-emotion-fully-compatible-with-next-js-app-router-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Emotion fully compatible with Next.js App Router Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Emotion is currently working on support but is not yet fully compatible. It requires using Client Components with 'use client' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16xO3X" prefix="r4377" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5432643689087699343"],"question":[0,"Are the minify, transpileTemplateLiterals, and cssProp options enabled by default in the styled-components compiler configuration?"],"answer":[0,"Yes, `minify`, `transpileTemplateLiterals`, and `cssProp` are all enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"are-the-minify-transpiletemplateliterals-and-cssprop-options-enabled-by-default-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-the-minify-transpiletemplateliterals-and-cssprop-options-enabled-by-default-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-the-minify-transpiletemplateliterals-and-cssprop-options-enabled-by-default-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are the minify, transpileTemplateLiterals, and cssProp options enabled by default in the styled-components compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, <code>minify</code>, <code>transpileTemplateLiterals</code>, and <code>cssProp</code> are all enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28KYcA" prefix="r4378" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6690499773000899812"],"question":[0,"What compiler configuration is required in next.config.js for styled-components version 6+?"],"answer":[0,"You must add `compiler: { styledComponents: true }` in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-compiler-configuration-is-required-in-next-config-js-for-styled-components-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-compiler-configuration-is-required-in-next-config-js-for-styled-components-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-compiler-configuration-is-required-in-next-config-js-for-styled-components-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What compiler configuration is required in next.config.js for styled-components version 6+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must add <code>compiler: { styledComponents: true }</code> in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zuzthc" prefix="r4379" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7587763420570080858"],"question":[0,"What are the three required steps for configuring CSS-in-JS libraries in Next.js?"],"answer":[0,"1) A style registry to collect CSS rules during rendering, 2) The `useServerInsertedHTML` hook to inject styles before dependent content, 3) A Client Component wrapper in the root layout to apply the registry during initial server-side rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-required-steps-for-configuring-css-in-js-libraries-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-required-steps-for-configuring-css-in-js-libraries-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-required-steps-for-configuring-css-in-js-libraries-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three required steps for configuring CSS-in-JS libraries in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>A style registry to collect CSS rules during rendering, 2) The <code>useServerInsertedHTML</code> hook to inject styles before dependent content, 3) A Client Component wrapper in the root layout to apply the registry during initial server-side rendering.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1drxDX" prefix="r4380" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8828520123489616037"],"question":[0,"Do CSS updates apply instantly during Next.js development?"],"answer":[0,"Yes, in development (next dev), CSS updates apply instantly with Fast Refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"do-css-updates-apply-instantly-during-next-js-development"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-css-updates-apply-instantly-during-next-js-development" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-css-updates-apply-instantly-during-next-js-development" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do CSS updates apply instantly during Next.js development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, in development (next dev), CSS updates apply instantly with Fast Refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XRfu" prefix="r4381" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9371235893247861348"],"question":[0,"Are CSS Grid and Custom Properties compiled for IE11 by default in Next.js?"],"answer":[0,"No, CSS Grid and Custom Properties (CSS variables) are not compiled for IE11 support by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/post-css"]]],"topic":[0,"nextjs"],"slug":[0,"are-css-grid-and-custom-properties-compiled-for-ie11-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-css-grid-and-custom-properties-compiled-for-ie11-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-css-grid-and-custom-properties-compiled-for-ie11-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are CSS Grid and Custom Properties compiled for IE11 by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, CSS Grid and Custom Properties (CSS variables) are not compiled for IE11 support by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/post-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xLAAc" prefix="r4382" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9688810106527180914"],"question":[0,"What are the three peer dependencies required for Tailwind CSS in Next.js?"],"answer":[0,"`tailwindcss@^3`, `postcss`, and `autoprefixer` are the three required peer dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-peer-dependencies-required-for-tailwind-css-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-peer-dependencies-required-for-tailwind-css-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-peer-dependencies-required-for-tailwind-css-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three peer dependencies required for Tailwind CSS in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>tailwindcss@^3</code>, <code>postcss</code>, and <code>autoprefixer</code> are the three required peer dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kyBLP" prefix="r4383" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9720931843839560010"],"question":[0,"What are the two default PostCSS plugins that Next.js ships with?"],"answer":[0,"Next.js ships with `postcss-flexbugs-fixes` and `postcss-preset-env` as default PostCSS plugins."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/post-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-default-postcss-plugins-that-next-js-ships-with"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-default-postcss-plugins-that-next-js-ships-with" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-default-postcss-plugins-that-next-js-ships-with" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two default PostCSS plugins that Next.js ships with?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js ships with <code>postcss-flexbugs-fixes</code> and <code>postcss-preset-env</code> as default PostCSS plugins.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/post-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WeKiC" prefix="r4384" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11170634618181285961"],"question":[0,"What are the two ways external stylesheets must be provided in Next.js?"],"answer":[0,"External stylesheets must be directly imported from an npm package or downloaded and colocated with your codebase. You cannot use `<link rel=\"stylesheet\" />` in the App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-ways-external-stylesheets-must-be-provided-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-ways-external-stylesheets-must-be-provided-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-ways-external-stylesheets-must-be-provided-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two ways external stylesheets must be provided in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>External stylesheets must be directly imported from an npm package or downloaded and colocated with your codebase. You cannot use <code><link rel="stylesheet" /></code> in the App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="phhGl" prefix="r4385" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11632132438087160511"],"question":[0,"What is the recommended solution when a dependency has CSS files in node_modules that Next.js cannot import?"],"answer":[0,"Reach out to the maintainer and ask them to publish a compiled version of their dependency. The dependency should also provide instructions about what CSS needs to be imported by you in your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/css-npm"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-solution-when-a-dependency-has-css-files-in-node-modules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-solution-when-a-dependency-has-css-files-in-node-modules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-solution-when-a-dependency-has-css-files-in-node-modules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended solution when a dependency has CSS files in node_modules that Next.js cannot import?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Reach out to the maintainer and ask them to publish a compiled version of their dependency. The dependency should also provide instructions about what CSS needs to be imported by you in your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/css-npm" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="m42r" prefix="r4386" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11902615436266357310"],"question":[0,"What minimum version of styled-jsx is required for Next.js App Router Client Components?"],"answer":[0,"Version 5.1.0 or higher is required. Using styled-jsx in Client Components requires using v5.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-minimum-version-of-styled-jsx-is-required-for-next-js-app-router-client-com"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-minimum-version-of-styled-jsx-is-required-for-next-js-app-router-client-com" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-minimum-version-of-styled-jsx-is-required-for-next-js-app-router-client-com" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What minimum version of styled-jsx is required for Next.js App Router Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 5.1.0 or higher is required. Using styled-jsx in Client Components requires using v5.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14Mg2A" prefix="r4387" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12960743753822044490"],"question":[0,"What is the default value of the displayName option for styled-components in Next.js?"],"answer":[0,"It is enabled by default in development and disabled in production to reduce file size."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-displayname-option-for-styled-components-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-displayname-option-for-styled-components-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-displayname-option-for-styled-components-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the displayName option for styled-components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is enabled by default in development and disabled in production to reduce file size.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UwLjq" prefix="r4388" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12986422418290360750"],"question":[0,"How many CSS-in-JS libraries are officially listed as supported in Next.js App Router Client Components?"],"answer":[0,"13 libraries are officially supported: ant-design, chakra-ui, @fluentui/react-components, kuma-ui, @mui/material, @mui/joy, pandacss, styled-jsx, styled-components, stylex, tamagui, tss-react, and vanilla-extract."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-css-in-js-libraries-are-officially-listed-as-supported-in-next-js-app-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-css-in-js-libraries-are-officially-listed-as-supported-in-next-js-app-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-css-in-js-libraries-are-officially-listed-as-supported-in-next-js-app-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many CSS-in-JS libraries are officially listed as supported in Next.js App Router Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>13 libraries are officially supported: ant-design, chakra-ui, @fluentui/react-components, kuma-ui, @mui/material, @mui/joy, pandacss, styled-jsx, styled-components, stylex, tamagui, tss-react, and vanilla-extract.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YJY6l" prefix="r4389" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13077451141455399940"],"question":[0,"What are the two main required transforms for using styled-components in Next.js?"],"answer":[0,"The `ssr` and `displayName` transforms are the main requirements for using styled-components in Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-required-transforms-for-using-styled-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-required-transforms-for-using-styled-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-required-transforms-for-using-styled-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main required transforms for using styled-components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>ssr</code> and <code>displayName</code> transforms are the main requirements for using styled-components in Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24KpTh" prefix="r4390" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13149908870141282787"],"question":[0,"Can Next.js import CSS files from within node_modules?"],"answer":[0,"No, Next.js cannot support importing CSS files within node_modules because they cannot determine the correct behavior (whether files should be Global CSS or CSS Modules, injection order, and class names for Modules). External stylesheets must be directly imported from npm packages or colocated with your codebase."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/css-npm"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-import-css-files-from-within-node-modules"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-import-css-files-from-within-node-modules" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-import-css-files-from-within-node-modules" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js import CSS files from within node_modules?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Next.js cannot support importing CSS files within node_modules because they cannot determine the correct behavior (whether files should be Global CSS or CSS Modules, injection order, and class names for Modules). External stylesheets must be directly imported from npm packages or colocated with your codebase.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/css-npm" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2Xcio" prefix="r4391" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14332694805214489736"],"question":[0,"What minimum Next.js version is required for Tailwind CSS and PostCSS support with Turbopack?"],"answer":[0,"Next.js 13.1 or later is required. As of Next.js 13.1, Tailwind CSS and PostCSS are supported with Turbopack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/tailwind-v3-css"]]],"topic":[0,"nextjs"],"slug":[0,"what-minimum-next-js-version-is-required-for-tailwind-css-and-postcss-support-wi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-minimum-next-js-version-is-required-for-tailwind-css-and-postcss-support-wi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-minimum-next-js-version-is-required-for-tailwind-css-and-postcss-support-wi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What minimum Next.js version is required for Tailwind CSS and PostCSS support with Turbopack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.1 or later is required. As of Next.js 13.1, Tailwind CSS and PostCSS are supported with Turbopack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/tailwind-v3-css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14jzhS" prefix="r4392" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14562497135211376584"],"question":[0,"What file extensions does Next.js support for Sass?"],"answer":[0,"Next.js supports `.scss` and `.sass` extensions for global Sass files, and `.module.scss` and `.module.sass` for component-level CSS Modules."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/sass"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-does-next-js-support-for-sass"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-does-next-js-support-for-sass" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-does-next-js-support-for-sass" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions does Next.js support for Sass?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports <code>.scss</code> and <code>.sass</code> extensions for global Sass files, and <code>.module.scss</code> and <code>.module.sass</code> for component-level CSS Modules.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/sass" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="scripts" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Scripts</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZhKoJd" prefix="r4393" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"88653342660940257"],"question":[0,"Can afterInteractive scripts be placed in any page or layout?"],"answer":[0,"Yes, afterInteractive scripts can be placed inside of any page or layout and will only load and execute when that page (or group of pages) is opened in the browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"can-afterinteractive-scripts-be-placed-in-any-page-or-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-afterinteractive-scripts-be-placed-in-any-page-or-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-afterinteractive-scripts-be-placed-in-any-page-or-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can afterInteractive scripts be placed in any page or layout?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, afterInteractive scripts can be placed inside of any page or layout and will only load and execute when that page (or group of pages) is opened in the browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2huHh" prefix="r4394" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"412133946868823471"],"question":[0,"When does the onLoad event handler execute?"],"answer":[0,"onLoad executes code after the script has finished loading. This callback runs only once when the script initially loads."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-onload-event-handler-execute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-onload-event-handler-execute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-onload-event-handler-execute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the onLoad event handler execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onLoad executes code after the script has finished loading. This callback runs only once when the script initially loads.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="59PHQ" prefix="r4395" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"461873087671201896"],"question":[0,"Can the onLoad event handler be used with beforeInteractive strategy?"],"answer":[0,"No, onLoad cannot be used with beforeInteractive strategy. Use onReady instead for beforeInteractive scripts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-onload-event-handler-be-used-with-beforeinteractive-strategy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-onload-event-handler-be-used-with-beforeinteractive-strategy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-onload-event-handler-be-used-with-beforeinteractive-strategy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the onLoad event handler be used with beforeInteractive strategy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, onLoad cannot be used with beforeInteractive strategy. Use onReady instead for beforeInteractive scripts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2acRvz" prefix="r4396" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1090327419864137333"],"question":[0,"Can the Next.js Script component be used in Server Components without event handlers?"],"answer":[0,"Yes, the Script component can be used in Server Components when you don't need event handlers. You can import next/script and include it directly in layout components or root layouts without 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-next-js-script-component-be-used-in-server-components-without-event-hand"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-next-js-script-component-be-used-in-server-components-without-event-hand" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-next-js-script-component-be-used-in-server-components-without-event-hand" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the Next.js Script component be used in Server Components without event handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the Script component can be used in Server Components when you don't need event handlers. You can import next/script and include it directly in layout components or root layouts without 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11xKPY" prefix="r4397" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1222627866075672132"],"question":[0,"When do lazyOnload scripts load?"],"answer":[0,"Scripts that use the lazyOnload strategy are injected into the HTML client-side during browser idle time and will load after all resources on the page have been fetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"when-do-lazyonload-scripts-load"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-do-lazyonload-scripts-load" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-do-lazyonload-scripts-load" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When do lazyOnload scripts load?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Scripts that use the lazyOnload strategy are injected into the HTML client-side during browser idle time and will load after all resources on the page have been fetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkHlDt" prefix="r4398" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1621736969596535415"],"question":[0,"What are the two methods for writing inline scripts with the Next.js Script component?"],"answer":[0,"1) Using curly braces: <Script id=\"show-banner\">{`code here`}</Script>, or 2) Using dangerouslySetInnerHTML: <Script id=\"show-banner\" dangerouslySetInnerHTML={{ __html: `code here` }} />"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/scripts"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-methods-for-writing-inline-scripts-with-the-next-js-script-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-methods-for-writing-inline-scripts-with-the-next-js-script-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-methods-for-writing-inline-scripts-with-the-next-js-script-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two methods for writing inline scripts with the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Using curly braces: <Script id="show-banner">{<code>code here</code>}</Script>, or 2) Using dangerouslySetInnerHTML: <Script id="show-banner" dangerouslySetInnerHTML={{ __html: <code>code here</code> }} /></li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/scripts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="M8riW" prefix="r4399" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2251223856354480208"],"question":[0,"Where must beforeInteractive scripts be placed in the App Router?"],"answer":[0,"beforeInteractive scripts must be placed inside the root layout (app/layout.tsx)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-beforeinteractive-scripts-be-placed-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-beforeinteractive-scripts-be-placed-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-beforeinteractive-scripts-be-placed-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must beforeInteractive scripts be placed in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>beforeInteractive scripts must be placed inside the root layout (app/layout.tsx)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ahfsf" prefix="r4400" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4404293930110138018"],"question":[0,"What are the four available strategy values for the Next.js Script component?"],"answer":[0,"beforeInteractive, afterInteractive, lazyOnload, and worker (experimental)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-available-strategy-values-for-the-next-js-script-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-available-strategy-values-for-the-next-js-script-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-available-strategy-values-for-the-next-js-script-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four available strategy values for the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>beforeInteractive, afterInteractive, lazyOnload, and worker (experimental)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PSuMC" prefix="r4401" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4511525684677014620"],"question":[0,"What library does Next.js use to implement the worker strategy?"],"answer":[0,"Scripts that use the worker strategy are offloaded and executed in a web worker with Partytown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-library-does-next-js-use-to-implement-the-worker-strategy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-library-does-next-js-use-to-implement-the-worker-strategy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-library-does-next-js-use-to-implement-the-worker-strategy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What library does Next.js use to implement the worker strategy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Scripts that use the worker strategy are offloaded and executed in a web worker with Partytown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MTfyW" prefix="r4402" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4792660239687850306"],"question":[0,"Can the onError event handler be used with beforeInteractive strategy?"],"answer":[0,"No, onError cannot be used with beforeInteractive strategy."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-onerror-event-handler-be-used-with-beforeinteractive-strategy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-onerror-event-handler-be-used-with-beforeinteractive-strategy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-onerror-event-handler-be-used-with-beforeinteractive-strategy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the onError event handler be used with beforeInteractive strategy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, onError cannot be used with beforeInteractive strategy.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1N9tKU" prefix="r4403" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5075325840581297308"],"question":[0,"Where must beforeInteractive scripts be placed in the Pages Router?"],"answer":[0,"beforeInteractive scripts must be placed in pages/_document.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-beforeinteractive-scripts-be-placed-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-beforeinteractive-scripts-be-placed-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-beforeinteractive-scripts-be-placed-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must beforeInteractive scripts be placed in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>beforeInteractive scripts must be placed in pages/_document.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmOFxc" prefix="r4404" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5126473108125100967"],"question":[0,"When do afterInteractive scripts load in relation to hydration?"],"answer":[0,"Scripts that use the afterInteractive strategy are injected into the HTML client-side and will load after some (or all) hydration occurs on the page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"when-do-afterinteractive-scripts-load-in-relation-to-hydration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-do-afterinteractive-scripts-load-in-relation-to-hydration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-do-afterinteractive-scripts-load-in-relation-to-hydration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When do afterInteractive scripts load in relation to hydration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Scripts that use the afterInteractive strategy are injected into the HTML client-side and will load after some (or all) hydration occurs on the page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EWDwi" prefix="r4405" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5316634785067711135"],"question":[0,"What is a recommended use case for lazyOnload scripts?"],"answer":[0,"Chat support plugins and social media widgets that can wait to load during idle time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-recommended-use-case-for-lazyonload-scripts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-recommended-use-case-for-lazyonload-scripts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-recommended-use-case-for-lazyonload-scripts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a recommended use case for lazyOnload scripts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Chat support plugins and social media widgets that can wait to load during idle time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OV1KK" prefix="r4406" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5596577438655283847"],"question":[0,"In what order are beforeInteractive scripts executed?"],"answer":[0,"Scripts that load with the beforeInteractive strategy are injected into the initial HTML from the server, downloaded before any Next.js module, and executed in the order they are placed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-order-are-beforeinteractive-scripts-executed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-order-are-beforeinteractive-scripts-executed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-order-are-beforeinteractive-scripts-executed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what order are beforeInteractive scripts executed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Scripts that load with the beforeInteractive strategy are injected into the initial HTML from the server, downloaded before any Next.js module, and executed in the order they are placed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2h4tnT" prefix="r4407" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6652540191848898114"],"question":[0,"What is required when using inline scripts with the Next.js Script component?"],"answer":[0,"Inline scripts require an id attribute to be defined to track and optimize the script."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/inline-script-id"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-required-when-using-inline-scripts-with-the-next-js-script-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-required-when-using-inline-scripts-with-the-next-js-script-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-required-when-using-inline-scripts-with-the-next-js-script-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is required when using inline scripts with the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Inline scripts require an id attribute to be defined to track and optimize the script.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/inline-script-id" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2rctyI" prefix="r4408" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6919235115219182830"],"question":[0,"Do beforeInteractive scripts block page hydration?"],"answer":[0,"No, scripts with beforeInteractive strategy are preloaded and fetched before any first-party code, but their execution does not block page hydration from occurring."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"do-beforeinteractive-scripts-block-page-hydration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-beforeinteractive-scripts-block-page-hydration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-beforeinteractive-scripts-block-page-hydration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do beforeInteractive scripts block page hydration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, scripts with beforeInteractive strategy are preloaded and fetched before any first-party code, but their execution does not block page hydration from occurring.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xPDTD" prefix="r4409" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7928033132013481127"],"question":[0,"What is a recommended use case for beforeInteractive scripts?"],"answer":[0,"Bot detectors and cookie consent managers that are needed by the entire site."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-recommended-use-case-for-beforeinteractive-scripts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-recommended-use-case-for-beforeinteractive-scripts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-recommended-use-case-for-beforeinteractive-scripts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a recommended use case for beforeInteractive scripts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Bot detectors and cookie consent managers that are needed by the entire site.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGpt29" prefix="r4410" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7984006625866864091"],"question":[0,"What is the import path for the Next.js Script component?"],"answer":[0,"import Script from 'next/script'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-import-path-for-the-next-js-script-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-import-path-for-the-next-js-script-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-import-path-for-the-next-js-script-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the import path for the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import Script from 'next/script'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1J8mkI" prefix="r4411" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8340608303248876326"],"question":[0,"Where are beforeInteractive scripts injected in the HTML regardless of placement?"],"answer":[0,"Scripts with beforeInteractive are always injected inside the head of the HTML document regardless of where it's placed in the component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-beforeinteractive-scripts-injected-in-the-html-regardless-of-placement"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-beforeinteractive-scripts-injected-in-the-html-regardless-of-placement" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-beforeinteractive-scripts-injected-in-the-html-regardless-of-placement" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are beforeInteractive scripts injected in the HTML regardless of placement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Scripts with beforeInteractive are always injected inside the head of the HTML document regardless of where it's placed in the component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHyy2q" prefix="r4412" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8612781735580499147"],"question":[0,"Can additional HTML attributes be passed to the Next.js Script component?"],"answer":[0,"Yes, any additional attributes (like nonce, crossOrigin, referrerPolicy, etc.) are automatically forwarded to the final, optimized <script> element in the HTML."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"can-additional-html-attributes-be-passed-to-the-next-js-script-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-additional-html-attributes-be-passed-to-the-next-js-script-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-additional-html-attributes-be-passed-to-the-next-js-script-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can additional HTML attributes be passed to the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, any additional attributes (like nonce, crossOrigin, referrerPolicy, etc.) are automatically forwarded to the final, optimized <script> element in the HTML.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1cOIFe" prefix="r4413" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9116900334824349042"],"question":[0,"Is the src prop required for the Next.js Script component?"],"answer":[0,"The src property is required unless an inline script is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-src-prop-required-for-the-next-js-script-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-src-prop-required-for-the-next-js-script-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-src-prop-required-for-the-next-js-script-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the src prop required for the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The src property is required unless an inline script is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="AKr4z" prefix="r4414" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13051988844825770221"],"question":[0,"What is a recommended use case for afterInteractive scripts?"],"answer":[0,"Tag managers and analytics scripts that need to load as soon as possible but not before any first-party Next.js code."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-a-recommended-use-case-for-afterinteractive-scripts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-a-recommended-use-case-for-afterinteractive-scripts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-a-recommended-use-case-for-afterinteractive-scripts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is a recommended use case for afterInteractive scripts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Tag managers and analytics scripts that need to load as soon as possible but not before any first-party Next.js code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lMzBh" prefix="r4415" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13100114669268377439"],"question":[0,"Is the worker strategy guaranteed to support all third-party scripts?"],"answer":[0,"No, while the worker strategy can be used for any script, it is an advanced use case that is not guaranteed to support all third-party scripts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-worker-strategy-guaranteed-to-support-all-third-party-scripts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-worker-strategy-guaranteed-to-support-all-third-party-scripts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-worker-strategy-guaranteed-to-support-all-third-party-scripts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the worker strategy guaranteed to support all third-party scripts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, while the worker strategy can be used for any script, it is an advanced use case that is not guaranteed to support all third-party scripts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZA1WhR" prefix="r4416" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13288989865131036774"],"question":[0,"What configuration flag is required in next.config.js to use the worker strategy?"],"answer":[0,"To use worker as a strategy, the nextScriptWorkers flag must be enabled in next.config.js: experimental: { nextScriptWorkers: true }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-flag-is-required-in-next-config-js-to-use-the-worker-strategy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-flag-is-required-in-next-config-js-to-use-the-worker-strategy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-flag-is-required-in-next-config-js-to-use-the-worker-strategy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration flag is required in next.config.js to use the worker strategy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>To use worker as a strategy, the nextScriptWorkers flag must be enabled in next.config.js: experimental: { nextScriptWorkers: true }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1N6pIy" prefix="r4417" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14355027640277079523"],"question":[0,"What is the default value of the strategy prop for the Next.js Script component?"],"answer":[0,"afterInteractive"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-strategy-prop-for-the-next-js-script-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-strategy-prop-for-the-next-js-script-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-strategy-prop-for-the-next-js-script-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the strategy prop for the Next.js Script component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>afterInteractive</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xVCmc" prefix="r4418" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14582118238359933380"],"question":[0,"When does the onReady event handler execute?"],"answer":[0,"onReady executes code after the script's load event when it first loads and then after every subsequent component re-mount."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/script"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-onready-event-handler-execute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-onready-event-handler-execute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-onready-event-handler-execute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the onReady event handler execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onReady executes code after the script's load event when it first loads and then after every subsequent component re-mount.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/script" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="linking-and-navigating-navigation-mechanisms" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Linking and Navigating > Navigation Mechanisms</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZPAiMV" prefix="r4419" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"92948605060308929"],"question":[0,"What HTTP status code does the permanentRedirect() function return?"],"answer":[0,"The permanentRedirect() function returns a 308 (Permanent Redirect) status code by default. When used in a Server Action, it returns a 303 (See Other) status code."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/permanentRedirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-the-permanentredirect-function-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-the-permanentredirect-function-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-the-permanentredirect-function-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does the permanentRedirect() function return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The permanentRedirect() function returns a 308 (Permanent Redirect) status code by default. When used in a Server Action, it returns a 303 (See Other) status code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/permanentRedirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11zmv6" prefix="r4420" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"417315847881970114"],"question":[0,"What are the three primary ways to navigate between routes in Next.js App Router?"],"answer":[0,"The three ways are: 1) Using the <Link> Component (recommended), 2) Using the useRouter Hook for programmatic navigation, and 3) Using the native History API (window.history.pushState and window.history.replaceState)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-primary-ways-to-navigate-between-routes-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-primary-ways-to-navigate-between-routes-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-primary-ways-to-navigate-between-routes-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three primary ways to navigate between routes in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three ways are: 1) Using the <Link> Component (recommended), 2) Using the useRouter Hook for programmatic navigation, and 3) Using the native History API (window.history.pushState and window.history.replaceState).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21rmsd" prefix="r4421" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1046723928022254694"],"question":[0,"Does router.refresh() affect the Data Cache or Full Route Cache?"],"answer":[0,"No, router.refresh() completely clears the Router Cache and makes a new request to the server for the current route, but it does not affect the Data Cache or Full Route Cache. For complete data revalidation, you should use revalidatePath() or revalidateTag()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"does-router-refresh-affect-the-data-cache-or-full-route-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-router-refresh-affect-the-data-cache-or-full-route-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-router-refresh-affect-the-data-cache-or-full-route-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does router.refresh() affect the Data Cache or Full Route Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, router.refresh() completely clears the Router Cache and makes a new request to the server for the current route, but it does not affect the Data Cache or Full Route Cache. For complete data revalidation, you should use revalidatePath() or revalidateTag().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XLGAN" prefix="r4422" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1278652120887406985"],"question":[0,"What is the default value of the scroll prop on the Link component?"],"answer":[0,"The default value is true. When true, Next.js maintains scroll position if the Page is visible in the viewport, but scrolls to the top if the Page is not visible in the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-scroll-prop-on-the-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-scroll-prop-on-the-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-scroll-prop-on-the-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the scroll prop on the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is true. When true, Next.js maintains scroll position if the Page is visible in the viewport, but scrolls to the top if the Page is not visible in the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KYsuc" prefix="r4423" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1292732106821410654"],"question":[0,"What is the default value of the prefetch prop on the Link component in the App Router?"],"answer":[0,"The default value is null (or 'auto'), which means prefetch behavior depends on whether the route is static or dynamic. For static routes, the full route will be prefetched including all its data. For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-app-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-app-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-app-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the prefetch prop on the Link component in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is null (or 'auto'), which means prefetch behavior depends on whether the route is static or dynamic. For static routes, the full route will be prefetched including all its data. For dynamic routes, the partial route down to the nearest segment with a loading.js boundary will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2iUiei" prefix="r4424" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1509569459755340237"],"question":[0,"What error does invoking redirect() or permanentRedirect() throw?"],"answer":[0,"Both functions throw a NEXT_REDIRECT error, which terminates rendering of the route segment in which it was thrown. This is not a typical error but a deliberate signal to Next.js that a redirect has been initiated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-does-invoking-redirect-or-permanentredirect-throw"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-does-invoking-redirect-or-permanentredirect-throw" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-does-invoking-redirect-or-permanentredirect-throw" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error does invoking redirect() or permanentRedirect() throw?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both functions throw a NEXT_REDIRECT error, which terminates rendering of the route segment in which it was thrown. This is not a typical error but a deliberate signal to Next.js that a redirect has been initiated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ztr8n7" prefix="r4425" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1923564528930685799"],"question":[0,"What is the default value of the replace prop on the Link component?"],"answer":[0,"The default value is false. When true, the Link will replace the current history state instead of adding a new URL to the browser's history stack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-replace-prop-on-the-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-replace-prop-on-the-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-replace-prop-on-the-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the replace prop on the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false. When true, the Link will replace the current history state instead of adding a new URL to the browser's history stack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmI8vU" prefix="r4426" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1980078833483272759"],"question":[0,"Can redirect() and permanentRedirect() accept absolute URLs?"],"answer":[0,"Yes, both redirect() and permanentRedirect() accept absolute URLs and can be used to redirect to external links."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"can-redirect-and-permanentredirect-accept-absolute-urls"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-redirect-and-permanentredirect-accept-absolute-urls" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-redirect-and-permanentredirect-accept-absolute-urls" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can redirect() and permanentRedirect() accept absolute URLs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, both redirect() and permanentRedirect() accept absolute URLs and can be used to redirect to external links.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8GgJc" prefix="r4427" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2525149076256797224"],"question":[0,"Can the Link component accept absolute URLs and external links?"],"answer":[0,"Yes, the Link component can accept absolute URLs including external links. However, for external URLs, using a regular <a> tag is recommended since Link provides no performance benefits for external navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-link-component-accept-absolute-urls-and-external-links"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-link-component-accept-absolute-urls-and-external-links" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-link-component-accept-absolute-urls-and-external-links" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the Link component accept absolute URLs and external links?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the Link component can accept absolute URLs including external links. However, for external URLs, using a regular <a> tag is recommended since Link provides no performance benefits for external navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOFyse" prefix="r4428" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2668150380475465785"],"question":[0,"What is the default value of the shallow prop on the Link component in the Pages Router?"],"answer":[0,"The default value is false. When set to true, shallow routing updates the path of the current page without rerunning getStaticProps, getServerSideProps, or getInitialProps."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-shallow-prop-on-the-link-component-in-the-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-shallow-prop-on-the-link-component-in-the-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-shallow-prop-on-the-link-component-in-the-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the shallow prop on the Link component in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is false. When set to true, shallow routing updates the path of the current page without rerunning getStaticProps, getServerSideProps, or getInitialProps.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IV7SB" prefix="r4429" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3142009620799003758"],"question":[0,"Does prefetching work in development mode (npm run dev)?"],"answer":[0,"No, prefetching only works in production mode. It is disabled during development. To test prefetching, you must run npm run build and then npm run start."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"does-prefetching-work-in-development-mode-npm-run-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-prefetching-work-in-development-mode-npm-run-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-prefetching-work-in-development-mode-npm-run-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does prefetching work in development mode (npm run dev)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, prefetching only works in production mode. It is disabled during development. To test prefetching, you must run npm run build and then npm run start.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZyEFeI" prefix="r4430" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3783376558174870229"],"question":[0,"For dynamic routes with the default prefetch behavior, what determines how much of the route is prefetched?"],"answer":[0,"For dynamic routes with default prefetch behavior, the partial route down to the nearest segment with a loading.js boundary is prefetched. If there is no loading.js file, nothing will be prefetched for dynamic segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"for-dynamic-routes-with-the-default-prefetch-behavior-what-determines-how-much-o"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-dynamic-routes-with-the-default-prefetch-behavior-what-determines-how-much-o" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-dynamic-routes-with-the-default-prefetch-behavior-what-determines-how-much-o" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For dynamic routes with the default prefetch behavior, what determines how much of the route is prefetched?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For dynamic routes with default prefetch behavior, the partial route down to the nearest segment with a loading.js boundary is prefetched. If there is no loading.js file, nothing will be prefetched for dynamic segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zc2G2L" prefix="r4431" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4260410481867593183"],"question":[0,"What is recommended for navigation in Next.js unless there's a specific requirement?"],"answer":[0,"The Link component is the primary and recommended way to navigate between routes in Next.js. The useRouter hook should only be used when there is a specific requirement for programmatic navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-recommended-for-navigation-in-next-js-unless-there-s-a-specific-requirem"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-recommended-for-navigation-in-next-js-unless-there-s-a-specific-requirem" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-recommended-for-navigation-in-next-js-unless-there-s-a-specific-requirem" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is recommended for navigation in Next.js unless there's a specific requirement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Link component is the primary and recommended way to navigate between routes in Next.js. The useRouter hook should only be used when there is a specific requirement for programmatic navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="isURH" prefix="r4432" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5473750140756832483"],"question":[0,"In what contexts can permanentRedirect() be used?"],"answer":[0,"permanentRedirect() can be used in Server Components, Client Components (during rendering, not in event handlers), Route Handlers, and Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/permanentRedirect"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-contexts-can-permanentredirect-be-used"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-contexts-can-permanentredirect-be-used" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-contexts-can-permanentredirect-be-used" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what contexts can permanentRedirect() be used?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>permanentRedirect() can be used in Server Components, Client Components (during rendering, not in event handlers), Route Handlers, and Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/permanentRedirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QUsOG" prefix="r4433" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6017780676976181929"],"question":[0,"What is the default value of the prefetch prop on the Link component in the Pages Router?"],"answer":[0,"The default value is true, meaning the full route and its data will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-page"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-page" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-link-component-in-the-page" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the prefetch prop on the Link component in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is true, meaning the full route and its data will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmF9zy" prefix="r4434" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6523209188130935268"],"question":[0,"What methods are available on the useRouter hook for history navigation?"],"answer":[0,"The useRouter hook provides router.back() to navigate back to the previous route in the browser's history stack, and router.forward() to navigate forwards to the next page in the browser's history stack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-methods-are-available-on-the-userouter-hook-for-history-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-methods-are-available-on-the-userouter-hook-for-history-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-methods-are-available-on-the-userouter-hook-for-history-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What methods are available on the useRouter hook for history navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The useRouter hook provides router.back() to navigate back to the previous route in the browser's history stack, and router.forward() to navigate forwards to the next page in the browser's history stack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2p8w5i" prefix="r4435" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8422782467566139761"],"question":[0,"Do router.push() and router.replace() return Promises in the App Router?"],"answer":[0,"No, in the App Router (next/navigation), router.push() and router.replace() return void, not Promises. This is different from the Pages Router where these methods return Promises that can be awaited."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"do-router-push-and-router-replace-return-promises-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-router-push-and-router-replace-return-promises-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-router-push-and-router-replace-return-promises-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do router.push() and router.replace() return Promises in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, in the App Router (next/navigation), router.push() and router.replace() return void, not Promises. This is different from the Pages Router where these methods return Promises that can be awaited.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qNPES" prefix="r4436" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8710471567457097823"],"question":[0,"Which import path should be used for useRouter in the App Router?"],"answer":[0,"The useRouter hook should be imported from 'next/navigation' and not 'next/router' when using the App Router. The next/router package is for the Pages Router only."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"which-import-path-should-be-used-for-userouter-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-import-path-should-be-used-for-userouter-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-import-path-should-be-used-for-userouter-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which import path should be used for useRouter in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The useRouter hook should be imported from 'next/navigation' and not 'next/router' when using the App Router. The next/router package is for the Pages Router only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVSRXB" prefix="r4437" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9140230695221633031"],"question":[0,"When prefetch is set to true on a Link component, what gets prefetched for dynamic routes?"],"answer":[0,"When prefetch={true}, the full route will be prefetched for both static and dynamic routes, unlike the default behavior which only prefetches partial routes for dynamic segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-prefetch-is-set-to-true-on-a-link-component-what-gets-prefetched-for-dynami"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-prefetch-is-set-to-true-on-a-link-component-what-gets-prefetched-for-dynami" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-prefetch-is-set-to-true-on-a-link-component-what-gets-prefetched-for-dynami" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When prefetch is set to true on a Link component, what gets prefetched for dynamic routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When prefetch={true}, the full route will be prefetched for both static and dynamic routes, unlike the default behavior which only prefetches partial routes for dynamic segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1f14I6" prefix="r4438" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11120525447171612256"],"question":[0,"Does useParams update when using window.history.pushState or replaceState?"],"answer":[0,"No, useParams does not update when using manual history API calls (window.history.pushState or replaceState). Only usePathname and useSearchParams update with these native history methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/70779"]]],"topic":[0,"nextjs"],"slug":[0,"does-useparams-update-when-using-window-history-pushstate-or-replacestate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-useparams-update-when-using-window-history-pushstate-or-replacestate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-useparams-update-when-using-window-history-pushstate-or-replacestate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does useParams update when using window.history.pushState or replaceState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, useParams does not update when using manual history API calls (window.history.pushState or replaceState). Only usePathname and useSearchParams update with these native history methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/70779" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nMFVy" prefix="r4439" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11556679267012631094"],"question":[0,"What value should be set for the prefetch prop to completely disable prefetching?"],"answer":[0,"Set prefetch={false} to completely disable prefetching. Prefetching will not happen when entering the viewport or on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-should-be-set-for-the-prefetch-prop-to-completely-disable-prefetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-should-be-set-for-the-prefetch-prop-to-completely-disable-prefetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-should-be-set-for-the-prefetch-prop-to-completely-disable-prefetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value should be set for the prefetch prop to completely disable prefetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set prefetch={false} to completely disable prefetching. Prefetching will not happen when entering the viewport or on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEHf7u" prefix="r4440" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11960791444070394391"],"question":[0,"Does shallow routing work when navigating to a different page route?"],"answer":[0,"No, shallow routing only works for URL changes in the current page. It won't work when navigating to a completely different page route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"does-shallow-routing-work-when-navigating-to-a-different-page-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-shallow-routing-work-when-navigating-to-a-different-page-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-shallow-routing-work-when-navigating-to-a-different-page-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does shallow routing work when navigating to a different page route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, shallow routing only works for URL changes in the current page. It won't work when navigating to a completely different page route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVw8wQ" prefix="r4441" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12650741637419790457"],"question":[0,"Can the useRouter hook be used in Server Components?"],"answer":[0,"No, useRouter is a React hook and cannot be used in Server Components. To use useRouter, you must add the 'use client' directive at the top of your file to make it a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-userouter-hook-be-used-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-userouter-hook-be-used-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-userouter-hook-be-used-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the useRouter hook be used in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, useRouter is a React hook and cannot be used in Server Components. To use useRouter, you must add the 'use client' directive at the top of your file to make it a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2lsQqA" prefix="r4442" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13374601898440484037"],"question":[0,"What does the router.refresh() method do?"],"answer":[0,"router.refresh() refreshes the current route by making a new request to the server, re-fetching data requests, and re-rendering Server Components. The client merges the updated React Server Component payload without losing unaffected client-side React state (e.g. useState) or browser state (e.g. scroll position)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-router-refresh-method-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-router-refresh-method-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-router-refresh-method-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the router.refresh() method do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.refresh() refreshes the current route by making a new request to the server, re-fetching data requests, and re-rendering Server Components. The client merges the updated React Server Component payload without losing unaffected client-side React state (e.g. useState) or browser state (e.g. scroll position).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZaQ9yO" prefix="r4443" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14085435925381829285"],"question":[0,"What is the default scroll behavior when using router.push() or router.replace()?"],"answer":[0,"By default, Next.js will scroll to the top of the page when navigating to a new route. You can disable this by passing scroll: false as an option: router.push('/path', { scroll: false })."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-scroll-behavior-when-using-router-push-or-router-replace"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-scroll-behavior-when-using-router-push-or-router-replace" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-scroll-behavior-when-using-router-push-or-router-replace" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default scroll behavior when using router.push() or router.replace()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js will scroll to the top of the page when navigating to a new route. You can disable this by passing scroll: false as an option: router.push('/path', { scroll: false }).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vscum" prefix="r4444" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15079186992473662705"],"question":[0,"Can redirect() and permanentRedirect() be called inside a try block?"],"answer":[0,"No, redirect() and permanentRedirect() throw a NEXT_REDIRECT error and should be called outside the try block. If placed inside a try block, the catch statement will intercept the error and prevent the redirect from working properly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"can-redirect-and-permanentredirect-be-called-inside-a-try-block"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-redirect-and-permanentredirect-be-called-inside-a-try-block" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-redirect-and-permanentredirect-be-called-inside-a-try-block" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can redirect() and permanentRedirect() be called inside a try block?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, redirect() and permanentRedirect() throw a NEXT_REDIRECT error and should be called outside the try block. If placed inside a try block, the catch statement will intercept the error and prevent the redirect from working properly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="upgrading-react-integration-updates" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Upgrading > React Integration Updates</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="Zw9hPO" prefix="r4445" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"139065968970985874"],"question":[0,"What is the compilationMode value for React Compiler opt-in mode?"],"answer":[0,"annotation. Set compilationMode: 'annotation' to enable opt-in mode where only components with the 'use memo' directive are compiled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-compilationmode-value-for-react-compiler-opt-in-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-compilationmode-value-for-react-compiler-opt-in-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-compilationmode-value-for-react-compiler-opt-in-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the compilationMode value for React Compiler opt-in mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>annotation. Set compilationMode: 'annotation' to enable opt-in mode where only components with the 'use memo' directive are compiled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="daHj" prefix="r4446" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"892799134534194211"],"question":[0,"What command upgrades Next.js to the latest patch version?"],"answer":[0,"npx @next/codemod upgrade patch (e.g., 16.0.7 -> 16.0.8)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-upgrades-next-js-to-the-latest-patch-version"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-upgrades-next-js-to-the-latest-patch-version" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-upgrades-next-js-to-the-latest-patch-version" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command upgrades Next.js to the latest patch version?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod upgrade patch (e.g., 16.0.7 -> 16.0.8)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z4QYAS" prefix="r4447" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"896178434585963605"],"question":[0,"What does the npx @next/codemod upgrade command automatically update?"],"answer":[0,"It upgrades your Next.js application, automatically running codemods and updating Next.js, React, and React DOM."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-npx-next-codemod-upgrade-command-automatically-update"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-npx-next-codemod-upgrade-command-automatically-update" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-npx-next-codemod-upgrade-command-automatically-update" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the npx @next/codemod upgrade command automatically update?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It upgrades your Next.js application, automatically running codemods and updating Next.js, React, and React DOM.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ERE4y" prefix="r4448" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"907224846581530124"],"question":[0,"What is the minimum React version required for Next.js 12?"],"answer":[0,"17.0.2"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/version-12"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-react-version-required-for-next-js-12"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-react-version-required-for-next-js-12" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-react-version-required-for-next-js-12" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum React version required for Next.js 12?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>17.0.2</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/version-12" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kX8LC" prefix="r4449" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1679351156190737855"],"question":[0,"Is the View Transitions feature in Next.js recommended for production?"],"answer":[0,"No. It is currently experimental and not recommended for production use."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/viewTransition"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-view-transitions-feature-in-next-js-recommended-for-production"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-view-transitions-feature-in-next-js-recommended-for-production" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-view-transitions-feature-in-next-js-recommended-for-production" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the View Transitions feature in Next.js recommended for production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It is currently experimental and not recommended for production use.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/viewTransition" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NNyg" prefix="r4450" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2126684317731000713"],"question":[0,"Is the React Compiler enabled by default in Next.js?"],"answer":[0,"No. It is not enabled by default. You must explicitly enable it by setting reactCompiler: true in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-react-compiler-enabled-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-react-compiler-enabled-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-react-compiler-enabled-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the React Compiler enabled by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It is not enabled by default. You must explicitly enable it by setting reactCompiler: true in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dkuYV" prefix="r4451" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2944533256875996234"],"question":[0,"What install command is used to upgrade to Next.js 12 with React 17?"],"answer":[0,"npm i next@12 react@17 react-dom@17 eslint-config-next@12"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/version-12"]]],"topic":[0,"nextjs"],"slug":[0,"what-install-command-is-used-to-upgrade-to-next-js-12-with-react-17"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-install-command-is-used-to-upgrade-to-next-js-12-with-react-17" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-install-command-is-used-to-upgrade-to-next-js-12-with-react-17" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What install command is used to upgrade to Next.js 12 with React 17?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm i next@12 react@17 react-dom@17 eslint-config-next@12</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/version-12" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RixvN" prefix="r4452" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5928838904731534915"],"question":[0,"What codemod command migrates useFormState to useActionState?"],"answer":[0,"npx codemod react/19/replace-use-form-state --target <path>"],"confidence":[0,0.95],"sources":[1,[[0,"https://docs.codemod.com/guides/migrations/react-18-19"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-command-migrates-useformstate-to-useactionstate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-command-migrates-useformstate-to-useactionstate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-command-migrates-useformstate-to-useactionstate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod command migrates useFormState to useActionState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx codemod react/19/replace-use-form-state --target <path></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://docs.codemod.com/guides/migrations/react-18-19" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>docs.codemod.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aE6FP" prefix="r4453" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6132463607496886929"],"question":[0,"What React version does Next.js 16 use?"],"answer":[0,"React 19.2 from the latest React Canary release."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-version-does-next-js-16-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-version-does-next-js-16-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-version-does-next-js-16-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React version does Next.js 16 use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React 19.2 from the latest React Canary release.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZR13qA" prefix="r4454" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6909256908773776768"],"question":[0,"What directive opts a component into React Compiler compilation?"],"answer":[0,"\"use memo\""],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-opts-a-component-into-react-compiler-compilation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-opts-a-component-into-react-compiler-compilation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-opts-a-component-into-react-compiler-compilation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive opts a component into React Compiler compilation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"use memo"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkgcCt" prefix="r4455" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7247768978388469406"],"question":[0,"What React hook replaced useFormState in React 19?"],"answer":[0,"useActionState. While useFormState is still available in React 19, it is deprecated and will be removed in a future release."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-hook-replaced-useformstate-in-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-hook-replaced-useformstate-in-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-hook-replaced-useformstate-in-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React hook replaced useFormState in React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState. While useFormState is still available in React 19, it is deprecated and will be removed in a future release.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1a0g6T" prefix="r4456" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8972086156926129604"],"question":[0,"Does Next.js 15 and earlier support the upgrade command?"],"answer":[0,"No. Next.js 15 and earlier do not support the upgrade command and need to use a separate package instead using npx @next/codemod@canary upgrade latest."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-15-and-earlier-support-the-upgrade-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-15-and-earlier-support-the-upgrade-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-15-and-earlier-support-the-upgrade-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js 15 and earlier support the upgrade command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js 15 and earlier do not support the upgrade command and need to use a separate package instead using npx @next/codemod@canary upgrade latest.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z176RfX" prefix="r4457" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9138521591509630802"],"question":[0,"What is the React Compiler configuration property name in next.config.js?"],"answer":[0,"reactCompiler. In Next.js 16, it was promoted from experimental.reactCompiler to reactCompiler (stable)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-react-compiler-configuration-property-name-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-react-compiler-configuration-property-name-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-react-compiler-configuration-property-name-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the React Compiler configuration property name in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>reactCompiler. In Next.js 16, it was promoted from experimental.reactCompiler to reactCompiler (stable).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="yx3kc" prefix="r4458" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9448347189516860886"],"question":[0,"What is the performance impact of enabling the React Compiler in Next.js?"],"answer":[0,"Build times increase when enabled since the React Compiler relies on Babel processing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-performance-impact-of-enabling-the-react-compiler-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-performance-impact-of-enabling-the-react-compiler-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-performance-impact-of-enabling-the-react-compiler-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the performance impact of enabling the React Compiler in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Build times increase when enabled since the React Compiler relies on Babel processing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2uT2kv" prefix="r4459" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10455898082705001256"],"question":[0,"What is the default upgrade type when using npx @next/codemod upgrade without specifying a revision?"],"answer":[0,"minor. The default is minor for stable versions (e.g., 15.3.7 -> 15.4.8)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-upgrade-type-when-using-npx-next-codemod-upgrade-without-spe"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-upgrade-type-when-using-npx-next-codemod-upgrade-without-spe" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-upgrade-type-when-using-npx-next-codemod-upgrade-without-spe" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default upgrade type when using npx @next/codemod upgrade without specifying a revision?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>minor. The default is minor for stable versions (e.g., 15.3.7 -> 15.4.8).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHY0G9" prefix="r4460" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10608141392768538986"],"question":[0,"What directive opts a component out of React Compiler compilation?"],"answer":[0,"\"use no memo\""],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-opts-a-component-out-of-react-compiler-compilation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-opts-a-component-out-of-react-compiler-compilation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-opts-a-component-out-of-react-compiler-compilation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive opts a component out of React Compiler compilation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"use no memo"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sOqu" prefix="r4461" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10661459179067137899"],"question":[0,"Can Next.js 15 App Router use React 18?"],"answer":[0,"No. The Next.js 15 App Router cannot be used with React 18. The App Router uses React 19."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.wisp.blog/blog/can-nextjs-15-app-router-be-used-with-react-18"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-15-app-router-use-react-18"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-15-app-router-use-react-18" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-15-app-router-use-react-18" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js 15 App Router use React 18?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The Next.js 15 App Router cannot be used with React 18. The App Router uses React 19.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.wisp.blog/blog/can-nextjs-15-app-router-be-used-with-react-18" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>wisp.blog</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ybSdx" prefix="r4462" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10843046326805859113"],"question":[0,"What is the status of React Compiler support in Next.js 16?"],"answer":[0,"Stable. Built-in support for the React Compiler is now stable in Next.js 16 following the React Compiler's 1.0 release."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-status-of-react-compiler-support-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-status-of-react-compiler-support-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-status-of-react-compiler-support-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the status of React Compiler support in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Stable. Built-in support for the React Compiler is now stable in Next.js 16 following the React Compiler's 1.0 release.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Eukz6" prefix="r4463" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10843298329676230484"],"question":[0,"What command should you use to manually upgrade Next.js and React to their latest versions?"],"answer":[0,"npm install next@latest react@latest react-dom@latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-should-you-use-to-manually-upgrade-next-js-and-react-to-their-lates"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-should-you-use-to-manually-upgrade-next-js-and-react-to-their-lates" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-should-you-use-to-manually-upgrade-next-js-and-react-to-their-lates" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command should you use to manually upgrade Next.js and React to their latest versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm install next@latest react@latest react-dom@latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1fVSFX" prefix="r4464" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11114597268494054887"],"question":[0,"What is the minimum React version required for Next.js 13?"],"answer":[0,"18.2.0. The minimum React version was bumped from 17.0.2 to 18.2.0 in Next.js 13."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/version-13"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-react-version-required-for-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-react-version-required-for-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-react-version-required-for-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum React version required for Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>18.2.0. The minimum React version was bumped from 17.0.2 to 18.2.0 in Next.js 13.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/version-13" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17QLeJ" prefix="r4465" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12004701147685345108"],"question":[0,"What React version does the Next.js 15 App Router use?"],"answer":[0,"React 19 RC (Release Candidate). The App Router uses React 19 RC, with backwards compatibility for React 18 with the Pages Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-version-does-the-next-js-15-app-router-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-version-does-the-next-js-15-app-router-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-version-does-the-next-js-15-app-router-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React version does the Next.js 15 App Router use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React 19 RC (Release Candidate). The App Router uses React 19 RC, with backwards compatibility for React 18 with the Pages Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OAp1D" prefix="r4466" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12895457152127210879"],"question":[0,"Can Next.js 15 Pages Router use React 18?"],"answer":[0,"Yes. Next.js 15 maintains backward compatibility for the Pages Router with React 18, allowing users to continue using React 18 while benefiting from improvements in Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-15-pages-router-use-react-18"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-15-pages-router-use-react-18" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-15-pages-router-use-react-18" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js 15 Pages Router use React 18?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Next.js 15 maintains backward compatibility for the Pages Router with React 18, allowing users to continue using React 18 while benefiting from improvements in Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jc1JT" prefix="r4467" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13059127319770714199"],"question":[0,"What is the configuration property name to enable View Transitions in Next.js?"],"answer":[0,"experimental.viewTransition. Set experimental.viewTransition: true in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/viewTransition"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-configuration-property-name-to-enable-view-transitions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-configuration-property-name-to-enable-view-transitions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-configuration-property-name-to-enable-view-transitions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the configuration property name to enable View Transitions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>experimental.viewTransition. Set experimental.viewTransition: true in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/viewTransition" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16vNcA" prefix="r4468" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13761190985911720048"],"question":[0,"Which version of the codemod is recommended when upgrading Next.js?"],"answer":[0,"The canary version. The team recommends using the canary version of the codemod (npx @next/codemod@canary) even if you are upgrading to the latest Next.js version."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"which-version-of-the-codemod-is-recommended-when-upgrading-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-version-of-the-codemod-is-recommended-when-upgrading-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-version-of-the-codemod-is-recommended-when-upgrading-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which version of the codemod is recommended when upgrading Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The canary version. The team recommends using the canary version of the codemod (npx @next/codemod@canary) even if you are upgrading to the latest Next.js version.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HBGkT" prefix="r4469" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13960103732218419849"],"question":[0,"What React component is used for View Transitions?"],"answer":[0,"<ViewTransition> component, imported from 'react'. Example: import { ViewTransition } from 'react'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/viewTransition"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-component-is-used-for-view-transitions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-component-is-used-for-view-transitions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-component-is-used-for-view-transitions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React component is used for View Transitions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><ViewTransition> component, imported from 'react'. Example: import { ViewTransition } from 'react'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/viewTransition" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PJ5Mn" prefix="r4470" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14472724339044901795"],"question":[0,"What additional keys does useFormStatus include in React 19?"],"answer":[0,"In React 19, useFormStatus includes additional keys like data, method, and action. If you are not using React 19, only the pending key is available."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-additional-keys-does-useformstatus-include-in-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-additional-keys-does-useformstatus-include-in-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-additional-keys-does-useformstatus-include-in-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What additional keys does useFormStatus include in React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In React 19, useFormStatus includes additional keys like data, method, and action. If you are not using React 19, only the pending key is available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-segment-config-runtime-and-deployment" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Segment Config > Runtime and Deployment</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZVKopj" prefix="r4471" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"187162820160734804"],"question":[0,"In which Next.js version was runtime = 'experimental-edge' deprecated?"],"answer":[0,"Next.js 15.0.0-RC deprecated runtime = 'experimental-edge' (you should migrate to 'edge')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-runtime-experimental-edge-deprecated"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-runtime-experimental-edge-deprecated" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-runtime-experimental-edge-deprecated" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was runtime = 'experimental-edge' deprecated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15.0.0-RC deprecated runtime = 'experimental-edge' (you should migrate to 'edge').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RvFBP" prefix="r4472" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"272610552132297022"],"question":[0,"What is the default maxDuration for Vercel Hobby plan with Fluid Compute enabled?"],"answer":[0,"300 seconds default / 300 seconds maximum"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxduration-for-vercel-hobby-plan-with-fluid-compute-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxduration-for-vercel-hobby-plan-with-fluid-compute-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxduration-for-vercel-hobby-plan-with-fluid-compute-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxDuration for Vercel Hobby plan with Fluid Compute enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>300 seconds default / 300 seconds maximum</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDO6AJ" prefix="r4473" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"354374590471186221"],"question":[0,"What is the default value for the 'runtime' route segment config option?"],"answer":[0,"'nodejs' is the default runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'runtime' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' is the default runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="15IqOh" prefix="r4474" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"830099479485908652"],"question":[0,"Does preferredRegion support depend on the deployment platform?"],"answer":[0,"Yes. Support for preferredRegion, and regions supported, is dependent on your deployment platform."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"does-preferredregion-support-depend-on-the-deployment-platform"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-preferredregion-support-depend-on-the-deployment-platform" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-preferredregion-support-depend-on-the-deployment-platform" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does preferredRegion support depend on the deployment platform?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Support for preferredRegion, and regions supported, is dependent on your deployment platform.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="SFv8d" prefix="r4475" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"858356441812456817"],"question":[0,"What is the default value for the 'preferredRegion' route segment config option?"],"answer":[0,"'auto' (which inherits from the nearest parent layout; root layout defaults to all regions)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-preferredregion-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-preferredregion-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-preferredregion-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'preferredRegion' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' (which inherits from the nearest parent layout; root layout defaults to all regions)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="251U6u" prefix="r4476" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1477405622862520871"],"question":[0,"What is the default maxDuration for Vercel Pro plan without Fluid Compute?"],"answer":[0,"15 seconds default / 300 seconds maximum"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxduration-for-vercel-pro-plan-without-fluid-compute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxduration-for-vercel-pro-plan-without-fluid-compute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxduration-for-vercel-pro-plan-without-fluid-compute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxDuration for Vercel Pro plan without Fluid Compute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>15 seconds default / 300 seconds maximum</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NS4yQ" prefix="r4477" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2706615995877706375"],"question":[0,"Is there a codemod available to remove experimental_ppr when upgrading to Next.js 16?"],"answer":[0,"Yes. You can run: npx @next/codemod@latest remove-experimental-ppr ."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-codemod-available-to-remove-experimental-ppr-when-upgrading-to-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-codemod-available-to-remove-experimental-ppr-when-upgrading-to-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-codemod-available-to-remove-experimental-ppr-when-upgrading-to-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a codemod available to remove experimental_ppr when upgrading to Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can run: npx @next/codemod@latest remove-experimental-ppr .</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1quIPr" prefix="r4478" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3395857371296268710"],"question":[0,"How many compute-capable regions does Vercel have?"],"answer":[0,"Vercel has 19 compute-capable regions."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/regions"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-compute-capable-regions-does-vercel-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-compute-capable-regions-does-vercel-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-compute-capable-regions-does-vercel-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many compute-capable regions does Vercel have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Vercel has 19 compute-capable regions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/regions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Clzpi" prefix="r4479" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3526815589033778946"],"question":[0,"What is the default maxDuration for Vercel Enterprise plan with Fluid Compute enabled?"],"answer":[0,"300 seconds default / 800 seconds maximum"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxduration-for-vercel-enterprise-plan-with-fluid-compute-en"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxduration-for-vercel-enterprise-plan-with-fluid-compute-en" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxduration-for-vercel-enterprise-plan-with-fluid-compute-en" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxDuration for Vercel Enterprise plan with Fluid Compute enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>300 seconds default / 800 seconds maximum</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16vzMj" prefix="r4480" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3612518757505190938"],"question":[0,"What is Next.js's recommendation for configuring runtime on shared parent layouts?"],"answer":[0,"It is generally recommended to leave shared parent layouts as 'auto' and customize the options where child segments diverge."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-next-js-s-recommendation-for-configuring-runtime-on-shared-parent-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-next-js-s-recommendation-for-configuring-runtime-on-shared-parent-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-next-js-s-recommendation-for-configuring-runtime-on-shared-parent-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is Next.js's recommendation for configuring runtime on shared parent layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is generally recommended to leave shared parent layouts as 'auto' and customize the options where child segments diverge.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1b8ukF" prefix="r4481" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4980459657457505251"],"question":[0,"Can the runtime config option be used in Proxy files?"],"answer":[0,"No. The runtime config cannot be used in Proxy files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-runtime-config-option-be-used-in-proxy-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-runtime-config-option-be-used-in-proxy-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-runtime-config-option-be-used-in-proxy-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the runtime config option be used in Proxy files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The runtime config cannot be used in Proxy files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zIyXM" prefix="r4482" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5380873943440509516"],"question":[0,"What is the default Vercel region for functions when not configured?"],"answer":[0,"By default, Vercel Functions execute in Washington, D.C., USA (iad1) for all new projects."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/region"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-vercel-region-for-functions-when-not-configured"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-vercel-region-for-functions-when-not-configured" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-vercel-region-for-functions-when-not-configured" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Vercel region for functions when not configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Vercel Functions execute in Washington, D.C., USA (iad1) for all new projects.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/region" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wu1Rc" prefix="r4483" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5590778502926537123"],"question":[0,"What happens when a function exceeds its maxDuration on Vercel?"],"answer":[0,"Vercel will terminate the function."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-function-exceeds-its-maxduration-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-function-exceeds-its-maxduration-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-function-exceeds-its-maxduration-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a function exceeds its maxDuration on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Vercel will terminate the function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oADiI" prefix="r4484" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7588544628093379823"],"question":[0,"Can runtime: 'edge' be used with Cache Components?"],"answer":[0,"No. Using runtime: 'edge' is not supported for Cache Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-runtime-edge-be-used-with-cache-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-runtime-edge-be-used-with-cache-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-runtime-edge-be-used-with-cache-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can runtime: 'edge' be used with Cache Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Using runtime: 'edge' is not supported for Cache Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZU3Pmu" prefix="r4485" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8149453880270323530"],"question":[0,"What are the valid values for the 'preferredRegion' route segment config option?"],"answer":[0,"'auto' | 'global' | 'home' | string | string[] (e.g., ['iad1', 'sfo1'])"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-preferredregion-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-preferredregion-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-preferredregion-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'preferredRegion' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto' | 'global' | 'home' | string | string[] (e.g., ['iad1', 'sfo1'])</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24iDry" prefix="r4486" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8186349132465133816"],"question":[0,"What is the default maxDuration for Vercel Hobby plan without Fluid Compute?"],"answer":[0,"10 seconds default / 60 seconds maximum"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxduration-for-vercel-hobby-plan-without-fluid-compute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxduration-for-vercel-hobby-plan-without-fluid-compute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxduration-for-vercel-hobby-plan-without-fluid-compute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxDuration for Vercel Hobby plan without Fluid Compute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>10 seconds default / 60 seconds maximum</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Jo8hU" prefix="r4487" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8513553947657311661"],"question":[0,"What is the default maxDuration for Vercel Enterprise plan without Fluid Compute?"],"answer":[0,"15 seconds default / 900 seconds maximum"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxduration-for-vercel-enterprise-plan-without-fluid-compute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxduration-for-vercel-enterprise-plan-without-fluid-compute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxduration-for-vercel-enterprise-plan-without-fluid-compute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxDuration for Vercel Enterprise plan without Fluid Compute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>15 seconds default / 900 seconds maximum</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wMbgi" prefix="r4488" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8707819906456322469"],"question":[0,"Which runtime does Next.js recommend for rendering applications?"],"answer":[0,"Node.js is the recommended runtime for rendering applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"which-runtime-does-next-js-recommend-for-rendering-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-runtime-does-next-js-recommend-for-rendering-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-runtime-does-next-js-recommend-for-rendering-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which runtime does Next.js recommend for rendering applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Node.js is the recommended runtime for rendering applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zaw2EB" prefix="r4489" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9407570964414834253"],"question":[0,"What are the valid values for the 'runtime' route segment config option?"],"answer":[0,"'nodejs' | 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'runtime' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' | 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bKXOC" prefix="r4490" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9586015551839217086"],"question":[0,"How does setting maxDuration at the page level affect Server Actions?"],"answer":[0,"Setting maxDuration at the page level changes the default timeout of all Server Actions used on that page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-setting-maxduration-at-the-page-level-affect-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-setting-maxduration-at-the-page-level-affect-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-setting-maxduration-at-the-page-level-affect-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does setting maxDuration at the page level affect Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting maxDuration at the page level changes the default timeout of all Server Actions used on that page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2m4lYh" prefix="r4491" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9933175325453546418"],"question":[0,"What happens if preferredRegion is not specified in a route?"],"answer":[0,"If a preferredRegion is not specified, it will inherit the option of the nearest parent layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-preferredregion-is-not-specified-in-a-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-preferredregion-is-not-specified-in-a-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-preferredregion-is-not-specified-in-a-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if preferredRegion is not specified in a route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a preferredRegion is not specified, it will inherit the option of the nearest parent layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="h1s5s" prefix="r4492" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12319321961328584596"],"question":[0,"What is the default maxDuration for Vercel Pro plan with Fluid Compute enabled?"],"answer":[0,"300 seconds default / 800 seconds maximum"],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/duration"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maxduration-for-vercel-pro-plan-with-fluid-compute-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maxduration-for-vercel-pro-plan-with-fluid-compute-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maxduration-for-vercel-pro-plan-with-fluid-compute-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maxDuration for Vercel Pro plan with Fluid Compute enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>300 seconds default / 800 seconds maximum</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/duration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="eadOT" prefix="r4493" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12730356854659752417"],"question":[0,"Are native Node.js APIs supported in the Edge Runtime?"],"answer":[0,"No. Native Node.js APIs are not supported in the Edge Runtime, including filesystem operations and other server-specific functionality."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-native-node-js-apis-supported-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-native-node-js-apis-supported-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-native-node-js-apis-supported-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are native Node.js APIs supported in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Native Node.js APIs are not supported in the Edge Runtime, including filesystem operations and other server-specific functionality.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTAUch" prefix="r4494" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13702070153681868062"],"question":[0,"What is the default value for maxDuration set by Next.js?"],"answer":[0,"Next.js does not set a default limit; the default is set by the deployment platform."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-maxduration-set-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-maxduration-set-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-maxduration-set-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for maxDuration set by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js does not set a default limit; the default is set by the deployment platform.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NnRoF" prefix="r4495" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13930581313301096442"],"question":[0,"What is the minimum Next.js version required for the maxDuration route segment config option?"],"answer":[0,"Next.js 13.4.10 or higher is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-next-js-version-required-for-the-maxduration-route-segment-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-next-js-version-required-for-the-maxduration-route-segment-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-next-js-version-required-for-the-maxduration-route-segment-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Next.js version required for the maxDuration route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.4.10 or higher is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi1KsU" prefix="r4496" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14700665239572366246"],"question":[0,"How many regions can Vercel Pro users deploy functions to?"],"answer":[0,"Pro users can deploy to up to three regions."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/configuring-functions/region"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-regions-can-vercel-pro-users-deploy-functions-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-regions-can-vercel-pro-users-deploy-functions-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-regions-can-vercel-pro-users-deploy-functions-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many regions can Vercel Pro users deploy functions to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pro users can deploy to up to three regions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/configuring-functions/region" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-url-and-path-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > URL and Path Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1qKN8V" prefix="r4497" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"234895510968043777"],"question":[0,"What is the exact syntax for setting metadataBase?"],"answer":[0,"metadataBase is set using: export const metadata = { metadataBase: new URL('https://acme.com') }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-setting-metadatabase"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-setting-metadatabase" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-setting-metadatabase" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for setting metadataBase?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>metadataBase is set using: export const metadata = { metadataBase: new URL('<a href="https://acme.com">https://acme.com</a>') }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2i9h2T" prefix="r4498" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1752423543585531923"],"question":[0,"What is the exact syntax for configuring RSS feed URLs in Next.js metadata?"],"answer":[0,"Use: alternates: { types: { 'application/rss+xml': 'https://nextjs.org/rss' } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-configuring-rss-feed-urls-in-next-js-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-configuring-rss-feed-urls-in-next-js-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-configuring-rss-feed-urls-in-next-js-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for configuring RSS feed URLs in Next.js metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use: alternates: { types: { 'application/rss+xml': '<a href="https://nextjs.org/rss">https://nextjs.org/rss</a>' } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26oN0O" prefix="r4499" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1886419235698618905"],"question":[0,"Can metadataBase include a subdomain?"],"answer":[0,"Yes, metadataBase can include a subdomain, for example: https://app.acme.com"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-metadatabase-include-a-subdomain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-metadatabase-include-a-subdomain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-metadatabase-include-a-subdomain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can metadataBase include a subdomain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, metadataBase can include a subdomain, for example: <a href="https://app.acme.com">https://app.acme.com</a></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1PT0MB" prefix="r4500" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2063452872573260339"],"question":[0,"How do you create a dynamic canonical URL using generateMetadata with a slug parameter?"],"answer":[0,"Use: export async function generateMetadata({ params }) { return { alternates: { canonical: `https://example.com/${params.slug}` } } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/47627"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-dynamic-canonical-url-using-generatemetadata-with-a-slug-par"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-dynamic-canonical-url-using-generatemetadata-with-a-slug-par" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-dynamic-canonical-url-using-generatemetadata-with-a-slug-par" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a dynamic canonical URL using generateMetadata with a slug parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use: export async function generateMetadata({ params }) { return { alternates: { canonical: <code>https://example.com/${params.slug}</code> } } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/47627" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="12BQdl" prefix="r4501" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3168531584044519402"],"question":[0,"Given metadataBase 'https://acme.com', what does the metadata field './payments' resolve to?"],"answer":[0,"It resolves to 'https://acme.com/payments'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"given-metadatabase-https-acme-com-what-does-the-metadata-field-payments-resolve-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="given-metadatabase-https-acme-com-what-does-the-metadata-field-payments-resolve-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#given-metadatabase-https-acme-com-what-does-the-metadata-field-payments-resolve-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Given metadataBase 'https://acme.com', what does the metadata field './payments' resolve to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It resolves to '<a href="https://acme.com/payments">https://acme.com/payments</a>'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="M23hM" prefix="r4502" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3201411904817371607"],"question":[0,"How does Next.js evaluate and merge metadata from multiple segments in a route?"],"answer":[0,"Metadata is evaluated in order from the root segment down to the final page.js segment, and Metadata objects are shallowly merged together. Duplicate keys are replaced based on their ordering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/optimizing/metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-evaluate-and-merge-metadata-from-multiple-segments-in-a-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-evaluate-and-merge-metadata-from-multiple-segments-in-a-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-evaluate-and-merge-metadata-from-multiple-segments-in-a-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js evaluate and merge metadata from multiple segments in a route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Metadata is evaluated in order from the root segment down to the final page.js segment, and Metadata objects are shallowly merged together. Duplicate keys are replaced based on their ordering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/optimizing/metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vmKCf" prefix="r4503" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3313037442202860273"],"question":[0,"Given metadataBase 'https://acme.com', what does the metadata field '../payments' resolve to?"],"answer":[0,"It resolves to 'https://acme.com/payments'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"given-metadatabase-https-acme-com-what-does-the-metadata-field-payments-resolve-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="given-metadatabase-https-acme-com-what-does-the-metadata-field-payments-resolve-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#given-metadatabase-https-acme-com-what-does-the-metadata-field-payments-resolve-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Given metadataBase 'https://acme.com', what does the metadata field '../payments' resolve to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It resolves to '<a href="https://acme.com/payments">https://acme.com/payments</a>'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1udA0C" prefix="r4504" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4563758961993156658"],"question":[0,"What is the exact syntax for configuring media alternates in Next.js?"],"answer":[0,"Use: alternates: { media: { 'only screen and (max-width: 600px)': 'https://nextjs.org/mobile' } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-configuring-media-alternates-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-configuring-media-alternates-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-configuring-media-alternates-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for configuring media alternates in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use: alternates: { media: { 'only screen and (max-width: 600px)': '<a href="https://nextjs.org/mobile">https://nextjs.org/mobile</a>' } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eCbYA" prefix="r4505" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5100377158990280512"],"question":[0,"What is the limitation when defining multiple RSS feeds of the same type in alternates.types?"],"answer":[0,"There is currently no way to provide multiple RSS feeds of the same type because types uses a map value, not an array."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/62365"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-limitation-when-defining-multiple-rss-feeds-of-the-same-type-in-alte"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-limitation-when-defining-multiple-rss-feeds-of-the-same-type-in-alte" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-limitation-when-defining-multiple-rss-feeds-of-the-same-type-in-alte" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the limitation when defining multiple RSS feeds of the same type in alternates.types?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>There is currently no way to provide multiple RSS feeds of the same type because types uses a map value, not an array.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/62365" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1S2UMm" prefix="r4506" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5168300097761853553"],"question":[0,"Given metadataBase 'https://acme.com', what does the metadata field 'https://beta.acme.com/payments' resolve to?"],"answer":[0,"It resolves to 'https://beta.acme.com/payments' (absolute URLs bypass metadataBase entirely)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"given-metadatabase-https-acme-com-what-does-the-metadata-field-https-beta-acme-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="given-metadatabase-https-acme-com-what-does-the-metadata-field-https-beta-acme-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#given-metadatabase-https-acme-com-what-does-the-metadata-field-https-beta-acme-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Given metadataBase 'https://acme.com', what does the metadata field 'https://beta.acme.com/payments' resolve to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It resolves to '<a href="https://beta.acme.com/payments">https://beta.acme.com/payments</a>' (absolute URLs bypass metadataBase entirely)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3Fyfm" prefix="r4507" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6311815280009100695"],"question":[0,"Can you override metadataBase in nested layouts or pages?"],"answer":[0,"Yes, you can override metadataBase in nested layouts or pages by defining a new metadataBase value."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-override-metadatabase-in-nested-layouts-or-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-override-metadatabase-in-nested-layouts-or-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-override-metadatabase-in-nested-layouts-or-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you override metadataBase in nested layouts or pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can override metadataBase in nested layouts or pages by defining a new metadataBase value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1FdLpO" prefix="r4508" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6930979684520898976"],"question":[0,"What parameters does the generateMetadata function receive?"],"answer":[0,"generateMetadata receives params (an object containing dynamic route parameters from root to current segment) and searchParams."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-generatemetadata-function-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-generatemetadata-function-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-generatemetadata-function-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the generateMetadata function receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateMetadata receives params (an object containing dynamic route parameters from root to current segment) and searchParams.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2msGEz" prefix="r4509" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7007791904538508883"],"question":[0,"What are the four supported fields in the alternates configuration?"],"answer":[0,"The four supported fields are: canonical (primary URL version), languages (language-specific alternate URLs), media (media query-based alternates), and types (alternate content types like RSS feeds)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-supported-fields-in-the-alternates-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-supported-fields-in-the-alternates-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-supported-fields-in-the-alternates-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four supported fields in the alternates configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The four supported fields are: canonical (primary URL version), languages (language-specific alternate URLs), media (media query-based alternates), and types (alternate content types like RSS feeds).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="pL6r7" prefix="r4510" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7662064162867313195"],"question":[0,"How do you automatically populate the canonical URL with the current route's pathname?"],"answer":[0,"Set alternates.canonical to './' (not '/') - this requires metadataBase to be set and will automatically use the current route's pathname."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/49743"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-automatically-populate-the-canonical-url-with-the-current-route-s-pat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-automatically-populate-the-canonical-url-with-the-current-route-s-pat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-automatically-populate-the-canonical-url-with-the-current-route-s-pat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you automatically populate the canonical URL with the current route's pathname?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set alternates.canonical to './' (not '/') - this requires metadataBase to be set and will automatically use the current route's pathname.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/49743" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qOAGz" prefix="r4511" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8529101432199188768"],"question":[0,"What happens when a metadata field provides an absolute URL while metadataBase is configured?"],"answer":[0,"If a metadata field provides an absolute URL, metadataBase will be ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-metadata-field-provides-an-absolute-url-while-metadatabase-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-metadata-field-provides-an-absolute-url-while-metadatabase-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-metadata-field-provides-an-absolute-url-while-metadatabase-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a metadata field provides an absolute URL while metadataBase is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a metadata field provides an absolute URL, metadataBase will be ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z65TJl" prefix="r4512" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9362915627650154663"],"question":[0,"What is the exact syntax for configuring language alternates with hreflang?"],"answer":[0,"Use: alternates: { languages: { 'en-US': '/en-US', 'de-DE': '/de-DE' } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-configuring-language-alternates-with-hreflang"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-configuring-language-alternates-with-hreflang" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-configuring-language-alternates-with-hreflang" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for configuring language alternates with hreflang?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use: alternates: { languages: { 'en-US': '/en-US', 'de-DE': '/de-DE' } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tfmOI" prefix="r4513" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10756440398061404961"],"question":[0,"How does Next.js handle trailing slashes between metadataBase and metadata fields?"],"answer":[0,"Next.js normalizes trailing slashes between metadataBase and metadata fields to single slashes. For example, metadataBase 'https://acme.com/' combined with metadata field '/path' becomes 'https://acme.com/path'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-trailing-slashes-between-metadatabase-and-metadata-field"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-trailing-slashes-between-metadatabase-and-metadata-field" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-trailing-slashes-between-metadatabase-and-metadata-field" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle trailing slashes between metadataBase and metadata fields?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js normalizes trailing slashes between metadataBase and metadata fields to single slashes. For example, metadataBase '<a href="https://acme.com/">https://acme.com/</a>' combined with metadata field '/path' becomes '<a href="https://acme.com/path">https://acme.com/path</a>'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RvVVa" prefix="r4514" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10807053682051109301"],"question":[0,"What happens to nested metadata fields like openGraph when a child segment defines them?"],"answer":[0,"Nested fields like openGraph and robots that are defined in an earlier segment are completely overwritten by the last segment to define them. You cannot partially update nested objects - defining any property on a nested field replaces all properties from parent segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@davegray_86804/next-js-ordering-and-merging-metadata-df22c19d93f4"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-nested-metadata-fields-like-opengraph-when-a-child-segment-defin"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-nested-metadata-fields-like-opengraph-when-a-child-segment-defin" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-nested-metadata-fields-like-opengraph-when-a-child-segment-defin" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to nested metadata fields like openGraph when a child segment defines them?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Nested fields like openGraph and robots that are defined in an earlier segment are completely overwritten by the last segment to define them. You cannot partially update nested objects - defining any property on a nested field replaces all properties from parent segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@davegray_86804/next-js-ordering-and-merging-metadata-df22c19d93f4" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1PiiLb" prefix="r4515" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11071710200089786369"],"question":[0,"Where is metadataBase typically set in a Next.js application?"],"answer":[0,"metadataBase is typically set in root app/layout.js to apply to URL-based metadata fields across all routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"where-is-metadatabase-typically-set-in-a-next-js-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-is-metadatabase-typically-set-in-a-next-js-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-is-metadatabase-typically-set-in-a-next-js-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where is metadataBase typically set in a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>metadataBase is typically set in root app/layout.js to apply to URL-based metadata fields across all routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1e0QE5" prefix="r4516" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11462182486959527814"],"question":[0,"What happens if you use a relative path in a URL-based metadata field without configuring metadataBase?"],"answer":[0,"Using a relative path in a URL-based metadata field without configuring metadataBase will cause a build error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-use-a-relative-path-in-a-url-based-metadata-field-without-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-use-a-relative-path-in-a-url-based-metadata-field-without-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-use-a-relative-path-in-a-url-based-metadata-field-without-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you use a relative path in a URL-based metadata field without configuring metadataBase?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using a relative path in a URL-based metadata field without configuring metadataBase will cause a build error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z4jMcd" prefix="r4517" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12095048371681121213"],"question":[0,"How are absolute paths in metadata fields treated when metadataBase is set?"],"answer":[0,"An 'absolute' path in a metadata field (that typically would replace the whole URL path) is treated as a 'relative' path starting from the end of metadataBase."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-absolute-paths-in-metadata-fields-treated-when-metadatabase-is-set"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-absolute-paths-in-metadata-fields-treated-when-metadatabase-is-set" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-absolute-paths-in-metadata-fields-treated-when-metadatabase-is-set" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are absolute paths in metadata fields treated when metadataBase is set?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An 'absolute' path in a metadata field (that typically would replace the whole URL path) is treated as a 'relative' path starting from the end of metadataBase.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iNM8v" prefix="r4518" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12316670956224148186"],"question":[0,"Given metadataBase 'https://acme.com', what does the metadata field '/' resolve to?"],"answer":[0,"It resolves to 'https://acme.com'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"given-metadatabase-https-acme-com-what-does-the-metadata-field-resolve-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="given-metadatabase-https-acme-com-what-does-the-metadata-field-resolve-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#given-metadatabase-https-acme-com-what-does-the-metadata-field-resolve-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Given metadataBase 'https://acme.com', what does the metadata field '/' resolve to?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It resolves to '<a href="https://acme.com">https://acme.com</a>'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9GxWp" prefix="r4519" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13111852973522974260"],"question":[0,"Can metadataBase include a base path?"],"answer":[0,"Yes, metadataBase can include a base path, for example: https://acme.com/start/from/here"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-metadatabase-include-a-base-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-metadatabase-include-a-base-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-metadatabase-include-a-base-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can metadataBase include a base path?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, metadataBase can include a base path, for example: <a href="https://acme.com/start/from/here">https://acme.com/start/from/here</a></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWsAju" prefix="r4520" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13475495951861178379"],"question":[0,"Does Next.js respect custom port numbers for the default metadataBase in development mode?"],"answer":[0,"No, Next.js hardcodes 'http://localhost:3000' for metadataBase in development mode even if the dev server runs on a different port."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/54349"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-respect-custom-port-numbers-for-the-default-metadatabase-in-develop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-respect-custom-port-numbers-for-the-default-metadatabase-in-develop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-respect-custom-port-numbers-for-the-default-metadatabase-in-develop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js respect custom port numbers for the default metadataBase in development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Next.js hardcodes '<a href="http://localhost:3000">http://localhost:3000</a>' for metadataBase in development mode even if the dev server runs on a different port.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/54349" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1K2Ety" prefix="r4521" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14459214387537627154"],"question":[0,"What HTML tags does the alternates configuration generate?"],"answer":[0,"The alternates configuration generates <link rel=\"canonical\"> and <link rel=\"alternate\"> tags with appropriate hreflang and media attributes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-tags-does-the-alternates-configuration-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-tags-does-the-alternates-configuration-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-tags-does-the-alternates-configuration-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML tags does the alternates configuration generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The alternates configuration generates <link rel="canonical"> and <link rel="alternate"> tags with appropriate hreflang and media attributes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15Mazo" prefix="r4522" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14765813427276196158"],"question":[0,"What is the default fallback value for metadataBase on Vercel in production deployments?"],"answer":[0,"In production deployments on Vercel, metadataBase uses VERCEL_PROJECT_PRODUCTION_URL as the fallback."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/65089"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-fallback-value-for-metadatabase-on-vercel-in-production-depl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-fallback-value-for-metadatabase-on-vercel-in-production-depl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-fallback-value-for-metadatabase-on-vercel-in-production-depl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default fallback value for metadataBase on Vercel in production deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In production deployments on Vercel, metadataBase uses VERCEL_PROJECT_PRODUCTION_URL as the fallback.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/65089" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="typescript-ide-integration-and-tooling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">TypeScript > IDE Integration and Tooling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="1o7SAC" prefix="r4523" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"487801684653452148"],"question":[0,"Where does Next.js generate the link definition file for typed routes?"],"answer":[0,"Next.js generates a hidden .d.ts file in .next/types that contains information about all existing routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-next-js-generate-the-link-definition-file-for-typed-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-next-js-generate-the-link-definition-file-for-typed-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-next-js-generate-the-link-definition-file-for-typed-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does Next.js generate the link definition file for typed routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a hidden .d.ts file in .next/types that contains information about all existing routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2afNbR" prefix="r4524" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1054871967744525436"],"question":[0,"What is the default output directory for next dev when isolatedDevBuild is enabled?"],"answer":[0,".next/dev - this is the default behavior in Next.js 16, keeping development and production outputs separate to prevent conflicts when running next dev and next build concurrently."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-output-directory-for-next-dev-when-isolateddevbuild-is-enabl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-output-directory-for-next-dev-when-isolateddevbuild-is-enabl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-output-directory-for-next-dev-when-isolateddevbuild-is-enabl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default output directory for next dev when isolatedDevBuild is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.next/dev - this is the default behavior in Next.js 16, keeping development and production outputs separate to prevent conflicts when running next dev and next build concurrently.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mOlIk" prefix="r4525" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2019708418900183590"],"question":[0,"What file does Next.js automatically generate for TypeScript type definitions?"],"answer":[0,"Next.js generates a next-env.d.ts file in the project root during next dev, next build, or next typegen."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-automatically-generate-for-typescript-type-definitions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-automatically-generate-for-typescript-type-definitions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-automatically-generate-for-typescript-type-definitions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js automatically generate for TypeScript type definitions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a next-env.d.ts file in the project root during next dev, next build, or next typegen.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="13WsLX" prefix="r4526" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2589849293958053711"],"question":[0,"What experimental feature enables TypeScript IntelliSense for environment variables?"],"answer":[0,"experimental.typedEnv: true generates a .d.ts file in .next/types for environment variable IntelliSense based on development runtime variables."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-feature-enables-typescript-intellisense-for-environment-variab"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-feature-enables-typescript-intellisense-for-environment-variab" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-feature-enables-typescript-intellisense-for-environment-variab" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental feature enables TypeScript IntelliSense for environment variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>experimental.typedEnv: true generates a .d.ts file in .next/types for environment variable IntelliSense based on development runtime variables.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gc4C2" prefix="r4527" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3533233400183923112"],"question":[0,"What navigation methods does typedRoutes validate in the App Router?"],"answer":[0,"In the App Router, typedRoutes validates the href prop in next/link as well as next/navigation methods like push, replace, and prefetch."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"what-navigation-methods-does-typedroutes-validate-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-navigation-methods-does-typedroutes-validate-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-navigation-methods-does-typedroutes-validate-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What navigation methods does typedRoutes validate in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the App Router, typedRoutes validates the href prop in next/link as well as next/navigation methods like push, replace, and prefetch.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IROSS" prefix="r4528" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3755964235021193040"],"question":[0,"Where does next typegen write output files?"],"answer":[0,"Output files are written to <distDir>/types (typically .next/dev/types or .next/types, depending on isolatedDevBuild setting)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/next"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-next-typegen-write-output-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-next-typegen-write-output-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-next-typegen-write-output-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does next typegen write output files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Output files are written to <distDir>/types (typically .next/dev/types or .next/types, depending on isolatedDevBuild setting).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2o4FYK" prefix="r4529" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4064474031247006134"],"question":[0,"What file extension should CommonJS projects use for TypeScript Next.js config?"],"answer":[0,"CommonJS projects should use next.config.mts to explicitly indicate ESM modules, as Node.js assumes .ts files are CommonJS by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extension-should-commonjs-projects-use-for-typescript-next-js-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extension-should-commonjs-projects-use-for-typescript-next-js-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extension-should-commonjs-projects-use-for-typescript-next-js-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extension should CommonJS projects use for TypeScript Next.js config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CommonJS projects should use next.config.mts to explicitly indicate ESM modules, as Node.js assumes .ts files are CommonJS by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="snfRg" prefix="r4530" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4119028167194436578"],"question":[0,"What command do you use in VS Code to enable the Next.js custom TypeScript plugin?"],"answer":[0,"Open the command palette (Ctrl/⌘ + Shift + P), search for 'TypeScript: Select TypeScript Version', and select 'Use Workspace Version'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-do-you-use-in-vs-code-to-enable-the-next-js-custom-typescript-plugi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-do-you-use-in-vs-code-to-enable-the-next-js-custom-typescript-plugi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-do-you-use-in-vs-code-to-enable-the-next-js-custom-typescript-plugi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command do you use in VS Code to enable the Next.js custom TypeScript plugin?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Open the command palette (Ctrl/⌘ + Shift + P), search for 'TypeScript: Select TypeScript Version', and select 'Use Workspace Version'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Q5wPR" prefix="r4531" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4907085792709757397"],"question":[0,"What TypeScript cast is required for non-literal href strings when using typedRoutes?"],"answer":[0,"Non-literal strings require a cast with 'as Route', for example: ('/blog/' + slug) as Route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-cast-is-required-for-non-literal-href-strings-when-using-typedro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-cast-is-required-for-non-literal-href-strings-when-using-typedro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-cast-is-required-for-non-literal-href-strings-when-using-typedro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript cast is required for non-literal href strings when using typedRoutes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Non-literal strings require a cast with 'as Route', for example: ('/blog/' + slug) as Route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20slcy" prefix="r4532" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5604927378116471203"],"question":[0,"Can the typedRoutes feature be used in JavaScript-only projects?"],"answer":[0,"No, TypeScript is mandatory. The typedRoutes feature cannot be used in JavaScript-only projects."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-typedroutes-feature-be-used-in-javascript-only-projects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-typedroutes-feature-be-used-in-javascript-only-projects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-typedroutes-feature-be-used-in-javascript-only-projects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the typedRoutes feature be used in JavaScript-only projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, TypeScript is mandatory. The typedRoutes feature cannot be used in JavaScript-only projects.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SCaaj" prefix="r4533" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6019403976335180671"],"question":[0,"What is the default value of the typescript.ignoreBuildErrors option in next.config.js?"],"answer":[0,"false - by default, Next.js fails production builds when TypeScript errors exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typescript-ignorebuilderrors-option-in-next-con"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typescript-ignorebuilderrors-option-in-next-con" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typescript-ignorebuilderrors-option-in-next-con" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the typescript.ignoreBuildErrors option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - by default, Next.js fails production builds when TypeScript errors exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KT4ci" prefix="r4534" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6625397571388570272"],"question":[0,"What compiler replaced Babel for TypeScript compilation in Next.js 12.0.0?"],"answer":[0,"SWC (Rust-based compiler) became the default for compiling JavaScript/TypeScript, which is up to 17x faster than Babel for individual files and up to 5x faster for Fast Refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-compiler-replaced-babel-for-typescript-compilation-in-next-js-12-0-0"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-compiler-replaced-babel-for-typescript-compilation-in-next-js-12-0-0" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-compiler-replaced-babel-for-typescript-compilation-in-next-js-12-0-0" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What compiler replaced Babel for TypeScript compilation in Next.js 12.0.0?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>SWC (Rust-based compiler) became the default for compiling JavaScript/TypeScript, which is up to 17x faster than Babel for individual files and up to 5x faster for Fast Refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dv6if" prefix="r4535" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6751177896347790359"],"question":[0,"When does Next.js automatically install TypeScript dependencies?"],"answer":[0,"Next.js automatically installs the necessary dependencies (TypeScript, @types/react, @types/node) when you rename a file to .ts or .tsx and run next dev or next build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/installation"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-next-js-automatically-install-typescript-dependencies"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-next-js-automatically-install-typescript-dependencies" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-next-js-automatically-install-typescript-dependencies" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does Next.js automatically install TypeScript dependencies?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically installs the necessary dependencies (TypeScript, @types/react, @types/node) when you rename a file to .ts or .tsx and run next dev or next build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/installation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wXgbJ" prefix="r4536" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7250791155370949948"],"question":[0,"What TypeScript compiler does Next.js use when a custom Babel configuration exists?"],"answer":[0,"When an application has a custom Babel configuration, Next.js automatically opts out of using SWC and falls back to using Babel, the same as in Next.js 11."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-compiler-does-next-js-use-when-a-custom-babel-configuration-exis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-compiler-does-next-js-use-when-a-custom-babel-configuration-exis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-compiler-does-next-js-use-when-a-custom-babel-configuration-exis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript compiler does Next.js use when a custom Babel configuration exists?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When an application has a custom Babel configuration, Next.js automatically opts out of using SWC and falls back to using Babel, the same as in Next.js 11.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1obQis" prefix="r4537" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7462979312289542385"],"question":[0,"What CLI command generates TypeScript definitions without running a full build?"],"answer":[0,"next typegen [directory] - introduced in v15.5.0, it generates TypeScript definitions for routes without performing a full build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/cli/next"]]],"topic":[0,"nextjs"],"slug":[0,"what-cli-command-generates-typescript-definitions-without-running-a-full-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cli-command-generates-typescript-definitions-without-running-a-full-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cli-command-generates-typescript-definitions-without-running-a-full-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CLI command generates TypeScript definitions without running a full build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next typegen [directory] - introduced in v15.5.0, it generates TypeScript definitions for routes without performing a full build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/cli/next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tCTrY" prefix="r4538" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9047867723443580989"],"question":[0,"What is the minimum TypeScript version required for async Server Components?"],"answer":[0,"TypeScript 5.1.3 or higher is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-typescript-version-required-for-async-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-typescript-version-required-for-async-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-typescript-version-required-for-async-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum TypeScript version required for async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>TypeScript 5.1.3 or higher is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="207H4G" prefix="r4539" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9195023501429620115"],"question":[0,"When does the Next.js custom TypeScript plugin run for type checking?"],"answer":[0,"The custom plugin runs during file editing in the IDE, and the custom type checker runs during next build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-next-js-custom-typescript-plugin-run-for-type-checking"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-next-js-custom-typescript-plugin-run-for-type-checking" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-next-js-custom-typescript-plugin-run-for-type-checking" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the Next.js custom TypeScript plugin run for type checking?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The custom plugin runs during file editing in the IDE, and the custom type checker runs during next build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2b4FG" prefix="r4540" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10009142709046458023"],"question":[0,"What must be included in the tsconfig.json include array for Next.js TypeScript to work?"],"answer":[0,"The include array must contain 'next-env.d.ts' and '.next/types/**/*.ts' for proper TypeScript integration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-be-included-in-the-tsconfig-json-include-array-for-next-js-typescript-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-be-included-in-the-tsconfig-json-include-array-for-next-js-typescript-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-be-included-in-the-tsconfig-json-include-array-for-next-js-typescript-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must be included in the tsconfig.json include array for Next.js TypeScript to work?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The include array must contain 'next-env.d.ts' and '.next/types/**/*.ts' for proper TypeScript integration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQNGNP" prefix="r4541" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10724824356306373061"],"question":[0,"Since which Next.js version has incremental type checking been supported?"],"answer":[0,"Since v10.2.1, Next.js supports incremental type checking when enabled in tsconfig.json."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"since-which-next-js-version-has-incremental-type-checking-been-supported"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="since-which-next-js-version-has-incremental-type-checking-been-supported" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#since-which-next-js-version-has-incremental-type-checking-been-supported" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Since which Next.js version has incremental type checking been supported?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Since v10.2.1, Next.js supports incremental type checking when enabled in tsconfig.json.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kA804" prefix="r4542" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11315883687006370017"],"question":[0,"Should next-env.d.ts be committed to version control?"],"answer":[0,"No, next-env.d.ts should be added to .gitignore because it is automatically generated and any manual changes will be overwritten."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"should-next-env-d-ts-be-committed-to-version-control"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-next-env-d-ts-be-committed-to-version-control" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-next-env-d-ts-be-committed-to-version-control" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should next-env.d.ts be committed to version control?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, next-env.d.ts should be added to .gitignore because it is automatically generated and any manual changes will be overwritten.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21Luzn" prefix="r4543" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12351765949569089966"],"question":[0,"What three client-side validation features does the Next.js TypeScript plugin provide?"],"answer":[0,"1) Warning if invalid values for segment config options are passed, 2) Ensuring the 'use client' directive is used correctly, 3) Ensuring client hooks (like useState) are only used in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-client-side-validation-features-does-the-next-js-typescript-plugin-pr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-client-side-validation-features-does-the-next-js-typescript-plugin-pr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-client-side-validation-features-does-the-next-js-typescript-plugin-pr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three client-side validation features does the Next.js TypeScript plugin provide?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Warning if invalid values for segment config options are passed, 2) Ensuring the 'use client' directive is used correctly, 3) Ensuring client hooks (like useState) are only used in Client Components.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnDJc3" prefix="r4544" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12715748495074171933"],"question":[0,"What three route-aware type helpers does Next.js automatically generate?"],"answer":[0,"PageProps, LayoutProps, and RouteContext - these are globally available with full parameter typing and require no imports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-route-aware-type-helpers-does-next-js-automatically-generate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-route-aware-type-helpers-does-next-js-automatically-generate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-route-aware-type-helpers-does-next-js-automatically-generate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three route-aware type helpers does Next.js automatically generate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>PageProps, LayoutProps, and RouteContext - these are globally available with full parameter typing and require no imports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2u2HEq" prefix="r4545" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12979496039727419250"],"question":[0,"How does type checking behave during next dev?"],"answer":[0,"Type-checking happens in the background, allowing you to interact with your updated application in the browser instantly, with type errors propagating to the browser as they become available."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-type-checking-behave-during-next-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-type-checking-behave-during-next-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-type-checking-behave-during-next-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does type checking behave during next dev?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Type-checking happens in the background, allowing you to interact with your updated application in the browser instantly, with type errors propagating to the browser as they become available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14yv4V" prefix="r4546" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13992737027053687451"],"question":[0,"What is the minimum @types/react version required for async Server Components?"],"answer":[0,"@types/react 18.2.8 or higher is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-types-react-version-required-for-async-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-types-react-version-required-for-async-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-types-react-version-required-for-async-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum @types/react version required for async Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@types/react 18.2.8 or higher is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JMEnj" prefix="r4547" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14503651193258784467"],"question":[0,"What is the default value of the typescript.tsconfigPath option in next.config.js?"],"answer":[0,"The default value is 'tsconfig.json'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-typescript-tsconfigpath-option-in-next-config-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-typescript-tsconfigpath-option-in-next-config-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-typescript-tsconfigpath-option-in-next-config-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the typescript.tsconfigPath option in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 'tsconfig.json'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vONhS" prefix="r4548" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14898930671858278748"],"question":[0,"In which Node.js versions is process.features.typescript enabled by default?"],"answer":[0,"In Node.js v22.18.0+, process.features.typescript is enabled by default. For v22.10.0-22.17.x, opt in with NODE_OPTIONS=--experimental-transform-types."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-node-js-versions-is-process-features-typescript-enabled-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-node-js-versions-is-process-features-typescript-enabled-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-node-js-versions-is-process-features-typescript-enabled-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Node.js versions is process.features.typescript enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Node.js v22.18.0+, process.features.typescript is enabled by default. For v22.10.0-22.17.x, opt in with NODE_OPTIONS=--experimental-transform-types.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="project-structure-file-colocation-strategies" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Project Structure > File Colocation Strategies</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 26 questions </span> </div> <div class="space-y-4"> <astro-island uid="Rmpl2" prefix="r4549" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"503289379104946479"],"question":[0,"How do you create a URL segment that starts with an underscore (rather than a private folder)?"],"answer":[0,"Use the URL-encoded form by prefixing the folder name with %5F (the URL-encoded form of an underscore): %5FfolderName. This creates an actual route that appears as /_folderName in the URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-create-a-url-segment-that-starts-with-an-underscore-rather-than-a-pri"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-create-a-url-segment-that-starts-with-an-underscore-rather-than-a-pri" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-create-a-url-segment-that-starts-with-an-underscore-rather-than-a-pri" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you create a URL segment that starts with an underscore (rather than a private folder)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the URL-encoded form by prefixing the folder name with %5F (the URL-encoded form of an underscore): %5FfolderName. This creates an actual route that appears as /_folderName in the URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xVxmh" prefix="r4550" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1384475160103706906"],"question":[0,"Where must the middleware.ts file be placed in a Next.js project?"],"answer":[0,"The middleware.ts (or .js) file should be placed in the root of your project at the same level as pages or app, or inside src if using the src directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-middleware-ts-file-be-placed-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-middleware-ts-file-be-placed-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-middleware-ts-file-be-placed-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the middleware.ts file be placed in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware.ts (or .js) file should be placed in the root of your project at the same level as pages or app, or inside src if using the src directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18Floc" prefix="r4551" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1621941679147188386"],"question":[0,"What is the exact syntax for creating a private folder in Next.js?"],"answer":[0,"Private folders are created by prefixing a folder with an underscore: _folderName. This opts the folder and all its subfolders out of routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-creating-a-private-folder-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-creating-a-private-folder-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-creating-a-private-folder-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for creating a private folder in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Private folders are created by prefixing a folder with an underscore: _folderName. This opts the folder and all its subfolders out of routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="9Uatz" prefix="r4552" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1708351451205517050"],"question":[0,"Can you use the src directory in Next.js and is it required?"],"answer":[0,"Next.js supports storing application code (including app) inside an optional src directory. It is optional and separates application code from project configuration files which mostly live in the root of a project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-src-directory-in-next-js-and-is-it-required"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-src-directory-in-next-js-and-is-it-required" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-src-directory-in-next-js-and-is-it-required" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the src directory in Next.js and is it required?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports storing application code (including app) inside an optional src directory. It is optional and separates application code from project configuration files which mostly live in the root of a project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVp6VL" prefix="r4553" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2501724614751682948"],"question":[0,"What happens if both src/app and app exist in a Next.js project?"],"answer":[0,"src/app or src/pages will be ignored if app or pages are present in the root directory. Root-level routing takes priority over src-based routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-both-src-app-and-app-exist-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-both-src-app-and-app-exist-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-both-src-app-and-app-exist-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if both src/app and app exist in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>src/app or src/pages will be ignored if app or pages are present in the root directory. Root-level routing takes priority over src-based routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mnhoB" prefix="r4554" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2749271039049704384"],"question":[0,"When are assets in the public directory available to be served?"],"answer":[0,"Only assets that are in the public directory at build time will be served by Next.js. Files added at request time won't be available."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-assets-in-the-public-directory-available-to-be-served"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-assets-in-the-public-directory-available-to-be-served" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-assets-in-the-public-directory-available-to-be-served" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are assets in the public directory available to be served?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only assets that are in the public directory at build time will be served by Next.js. Files added at request time won't be available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MgOaY" prefix="r4555" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2858416869153450935"],"question":[0,"What error occurs if route groups create conflicting URL paths?"],"answer":[0,"Routes that include a route group should not resolve to the same URL path as other routes. For example, since route groups don't affect URL structure, (marketing)/about/page.js and (shop)/about/page.js would both resolve to /about and cause an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-occurs-if-route-groups-create-conflicting-url-paths"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-occurs-if-route-groups-create-conflicting-url-paths" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-occurs-if-route-groups-create-conflicting-url-paths" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error occurs if route groups create conflicting URL paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Routes that include a route group should not resolve to the same URL path as other routes. For example, since route groups don't affect URL structure, (marketing)/about/page.js and (shop)/about/page.js would both resolve to /about and cause an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wL3aw" prefix="r4556" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2887360861705120091"],"question":[0,"What error occurs if you have a static file in public with the same name as a file in the pages directory?"],"answer":[0,"Having a static file with the same name as a file in the pages/ directory will result in an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-occurs-if-you-have-a-static-file-in-public-with-the-same-name-as-a-fi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-occurs-if-you-have-a-static-file-in-public-with-the-same-name-as-a-fi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-occurs-if-you-have-a-static-file-in-public-with-the-same-name-as-a-fi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error occurs if you have a static file in public with the same name as a file in the pages directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Having a static file with the same name as a file in the pages/ directory will result in an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27wGw7" prefix="r4557" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4356845404494555178"],"question":[0,"When using multiple root layouts with route groups, where must the home page.js file be defined?"],"answer":[0,"If you use multiple root layouts without a top-level layout.js file, your home page.js file should be defined in one of the route groups, for example: app/(marketing)/page.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-multiple-root-layouts-with-route-groups-where-must-the-home-page-js-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-multiple-root-layouts-with-route-groups-where-must-the-home-page-js-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-multiple-root-layouts-with-route-groups-where-must-the-home-page-js-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using multiple root layouts with route groups, where must the home page.js file be defined?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you use multiple root layouts without a top-level layout.js file, your home page.js file should be defined in one of the route groups, for example: app/(marketing)/page.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsmOuh" prefix="r4558" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4483917736112224199"],"question":[0,"Which directories and files must remain in the project root even when using the src directory?"],"answer":[0,"The /public directory, configuration files (package.json, next.config.js, tsconfig.json), and environment files (.env.*) must remain in the root of your project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"which-directories-and-files-must-remain-in-the-project-root-even-when-using-the-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-directories-and-files-must-remain-in-the-project-root-even-when-using-the-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-directories-and-files-must-remain-in-the-project-root-even-when-using-the-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which directories and files must remain in the project root even when using the src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The /public directory, configuration files (package.json, next.config.js, tsconfig.json), and environment files (.env.*) must remain in the root of your project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jhS2C" prefix="r4559" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4727016287128935630"],"question":[0,"What configuration must be updated if you use the pageExtensions config option with instrumentation.ts?"],"answer":[0,"If you use the pageExtensions config option to add a suffix, you will also need to update the instrumentation filename to match."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-must-be-updated-if-you-use-the-pageextensions-config-option-w"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-must-be-updated-if-you-use-the-pageextensions-config-option-w" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-must-be-updated-if-you-use-the-pageextensions-config-option-w" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration must be updated if you use the pageExtensions config option with instrumentation.ts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you use the pageExtensions config option to add a suffix, you will also need to update the instrumentation filename to match.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Tbh9x" prefix="r4560" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5072832873019220758"],"question":[0,"What are the default file extensions supported by Next.js for special files?"],"answer":[0,"By default, Next.js accepts files with the following extensions: .tsx, .ts, .jsx, .js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-file-extensions-supported-by-next-js-for-special-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-file-extensions-supported-by-next-js-for-special-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-file-extensions-supported-by-next-js-for-special-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default file extensions supported by Next.js for special files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js accepts files with the following extensions: .tsx, .ts, .jsx, .js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RciBi" prefix="r4561" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5503177559259863122"],"question":[0,"How many middleware.ts files are supported per Next.js project?"],"answer":[0,"Only one middleware.ts file is supported per project."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-middleware-ts-files-are-supported-per-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-middleware-ts-files-are-supported-per-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-middleware-ts-files-are-supported-per-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many middleware.ts files are supported per Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only one middleware.ts file is supported per project.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yOCoF" prefix="r4562" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5840611847887578367"],"question":[0,"How does template.js differ from layout.js in terms of state persistence?"],"answer":[0,"Unlike layouts that persist across routes and maintain state, templates are given a unique key, meaning children Client Components reset their state on navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/template"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-template-js-differ-from-layout-js-in-terms-of-state-persistence"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-template-js-differ-from-layout-js-in-terms-of-state-persistence" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-template-js-differ-from-layout-js-in-terms-of-state-persistence" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does template.js differ from layout.js in terms of state persistence?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unlike layouts that persist across routes and maintain state, templates are given a unique key, meaning children Client Components reset their state on navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/template" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22GfdY" prefix="r4563" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6986934125667087913"],"question":[0,"In which Next.js version did instrumentation become stable?"],"answer":[0,"Instrumentation became stable in version 15.0.0. It was initially released experimentally in v13.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-instrumentation-become-stable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-instrumentation-become-stable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-instrumentation-become-stable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did instrumentation become stable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Instrumentation became stable in version 15.0.0. It was initially released experimentally in v13.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13y606" prefix="r4564" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8123803441872477743"],"question":[0,"Can you have both route.js and page.js in the same route segment?"],"answer":[0,"No. There cannot be a route.js file at the same route as page.js. Each route.js or page.js file takes over all HTTP verbs for that route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-have-both-route-js-and-page-js-in-the-same-route-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-have-both-route-js-and-page-js-in-the-same-route-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-have-both-route-js-and-page-js-in-the-same-route-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you have both route.js and page.js in the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. There cannot be a route.js file at the same route as page.js. Each route.js or page.js file takes over all HTTP verbs for that route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ePBkE" prefix="r4565" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8327520544480071408"],"question":[0,"What must the public directory be named and can it be changed?"],"answer":[0,"The directory must be named public. The name cannot be changed and it's the only directory used to serve static assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-the-public-directory-be-named-and-can-it-be-changed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-the-public-directory-be-named-and-can-it-be-changed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-the-public-directory-be-named-and-can-it-be-changed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must the public directory be named and can it be changed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The directory must be named public. The name cannot be changed and it's the only directory used to serve static assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OR0Lm" prefix="r4566" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9280225407626159002"],"question":[0,"What configuration must be updated in tsconfig.json when using the src directory?"],"answer":[0,"For path aliases like @/*, you should update the paths object in tsconfig.json to include src/."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-must-be-updated-in-tsconfig-json-when-using-the-src-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-must-be-updated-in-tsconfig-json-when-using-the-src-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-must-be-updated-in-tsconfig-json-when-using-the-src-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration must be updated in tsconfig.json when using the src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For path aliases like @/*, you should update the paths object in tsconfig.json to include src/.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bTYcT" prefix="r4567" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9288680525930469236"],"question":[0,"How do you reference files inside the public directory?"],"answer":[0,"Files inside public can be referenced by your code starting from the base URL (/). For example, public/avatars/me.png can be viewed by visiting the /avatars/me.png path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-reference-files-inside-the-public-directory"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-reference-files-inside-the-public-directory" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-reference-files-inside-the-public-directory" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you reference files inside the public directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Files inside public can be referenced by your code starting from the base URL (/). For example, public/avatars/me.png can be viewed by visiting the /avatars/me.png path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2vLI2H" prefix="r4568" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9729295615228035602"],"question":[0,"What is the exact syntax for creating a route group in Next.js?"],"answer":[0,"Route groups are created by wrapping a folder's name in parentheses: (folderName). This indicates the folder is for organizational purposes and should not be included in the route's URL path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-creating-a-route-group-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-creating-a-route-group-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-creating-a-route-group-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for creating a route group in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route groups are created by wrapping a folder's name in parentheses: (folderName). This indicates the folder is for organizational purposes and should not be included in the route's URL path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kc8Y6" prefix="r4569" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10625466849926054230"],"question":[0,"When is the default.js file used in Next.js?"],"answer":[0,"The default.js file is used to render a fallback within Parallel Routes when Next.js cannot recover a slot's active state after a full-page load."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-default-js-file-used-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-default-js-file-used-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-default-js-file-used-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the default.js file used in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default.js file is used to render a fallback within Parallel Routes when Next.js cannot recover a slot's active state after a full-page load.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RepJ9" prefix="r4570" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10661004442766018017"],"question":[0,"Where must the instrumentation.ts file be placed in a Next.js project?"],"answer":[0,"The instrumentation file should be in the root of your project and not inside the app or pages directory. If you're using the src folder, then place the file inside src alongside pages and app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-instrumentation-ts-file-be-placed-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-instrumentation-ts-file-be-placed-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-instrumentation-ts-file-be-placed-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the instrumentation.ts file be placed in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The instrumentation file should be in the root of your project and not inside the app or pages directory. If you're using the src folder, then place the file inside src alongside pages and app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/instrumentation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20d5P7" prefix="r4571" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11972727395836804768"],"question":[0,"What happens when you navigate between routes that use different root layouts in Next.js?"],"answer":[0,"Navigating across multiple root layouts will cause a full page load (as opposed to a client-side navigation). For example, navigating from /cart that uses app/(shop)/layout.js to /blog that uses app/(marketing)/layout.js will cause a full page reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-navigate-between-routes-that-use-different-root-layouts-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-navigate-between-routes-that-use-different-root-layouts-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-navigate-between-routes-that-use-different-root-layouts-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you navigate between routes that use different root layouts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Navigating across multiple root layouts will cause a full page load (as opposed to a client-side navigation). For example, navigating from /cart that uses app/(shop)/layout.js to /blog that uses app/(marketing)/layout.js will cause a full page reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpDs7W" prefix="r4572" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13033853730849482787"],"question":[0,"Are files safe to colocate inside route segments in the app directory by default?"],"answer":[0,"Yes. Project files can be safely colocated inside route segments in the app directory without accidentally being routable. A route is not publicly accessible until a page.js or route.js file is added to a route segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/project-structure"]]],"topic":[0,"nextjs"],"slug":[0,"are-files-safe-to-colocate-inside-route-segments-in-the-app-directory-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-files-safe-to-colocate-inside-route-segments-in-the-app-directory-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-files-safe-to-colocate-inside-route-segments-in-the-app-directory-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are files safe to colocate inside route segments in the app directory by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Project files can be safely colocated inside route segments in the app directory without accidentally being routable. A route is not publicly accessible until a page.js or route.js file is added to a route segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/project-structure" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jIlwL" prefix="r4573" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13367000301150697509"],"question":[0,"What configuration must be updated in tailwind.config.js when using the src directory?"],"answer":[0,"You'll need to add the /src prefix to the tailwind.config.js file in the content section."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/src-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-must-be-updated-in-tailwind-config-js-when-using-the-src-dire"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-must-be-updated-in-tailwind-config-js-when-using-the-src-dire" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-must-be-updated-in-tailwind-config-js-when-using-the-src-dire" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration must be updated in tailwind.config.js when using the src directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You'll need to add the /src prefix to the tailwind.config.js file in the content section.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/src-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zzqarp" prefix="r4574" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13779024486423495770"],"question":[0,"What must be added to each root layout when creating multiple root layouts?"],"answer":[0,"The <html> and <body> tags need to be added to each root layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-groups"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-be-added-to-each-root-layout-when-creating-multiple-root-layouts"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-be-added-to-each-root-layout-when-creating-multiple-root-layouts" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-be-added-to-each-root-layout-when-creating-multiple-root-layouts" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must be added to each root layout when creating multiple root layouts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <html> and <body> tags need to be added to each root layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-groups" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="layouts-and-pages-data-access-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Layouts and Pages > Data Access Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="1hIRyT" prefix="r4575" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"63208671940447462"],"question":[0,"Do layouts and pages render in parallel or sequentially in Next.js App Router?"],"answer":[0,"Layouts and pages render in parallel by default. Each segment initiates data requests as soon as possible, allowing data fetching to happen concurrently."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"do-layouts-and-pages-render-in-parallel-or-sequentially-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-layouts-and-pages-render-in-parallel-or-sequentially-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-layouts-and-pages-render-in-parallel-or-sequentially-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do layouts and pages render in parallel or sequentially in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layouts and pages render in parallel by default. Each segment initiates data requests as soon as possible, allowing data fetching to happen concurrently.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dgHfF" prefix="r4576" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"386967476140306166"],"question":[0,"What fetch cache option should you use to enable persistent caching across requests?"],"answer":[0,"Use { cache: 'force-cache' }. This tells Next.js to look for a matching request in its Data Cache and update the cache with downloaded resources. Without this, fetch requests are not cached by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-fetch-cache-option-should-you-use-to-enable-persistent-caching-across-reque"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-fetch-cache-option-should-you-use-to-enable-persistent-caching-across-reque" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-fetch-cache-option-should-you-use-to-enable-persistent-caching-across-reque" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What fetch cache option should you use to enable persistent caching across requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use { cache: 'force-cache' }. This tells Next.js to look for a matching request in its Data Cache and update the cache with downloaded resources. Without this, fetch requests are not cached by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LRn1K" prefix="r4577" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1849570961005751951"],"question":[0,"What parameters does a loading.js component accept?"],"answer":[0,"Loading UI components do not accept any parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-a-loading-js-component-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-a-loading-js-component-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-a-loading-js-component-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does a loading.js component accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Loading UI components do not accept any parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ns4Dr" prefix="r4578" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4075419331892225320"],"question":[0,"How do you prevent duplicate database queries when fetching the same data in multiple components?"],"answer":[0,"Use React's cache function to wrap your data access. The cache function deduplicates requests so only one query is made, even when the same function is called multiple times during rendering. Example: export const getPost = cache(async (id: string) => { /* db query */ })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-prevent-duplicate-database-queries-when-fetching-the-same-data-in-mul"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-prevent-duplicate-database-queries-when-fetching-the-same-data-in-mul" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-prevent-duplicate-database-queries-when-fetching-the-same-data-in-mul" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you prevent duplicate database queries when fetching the same data in multiple components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use React's cache function to wrap your data access. The cache function deduplicates requests so only one query is made, even when the same function is called multiple times during rendering. Example: export const getPost = cache(async (id: string) => { /* db query */ })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CQybV" prefix="r4579" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4145039855035470865"],"question":[0,"Is loading.js a Server Component or Client Component by default?"],"answer":[0,"By default, loading.js is a Server Component, but it can be converted to a Client Component using the 'use client' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-loading-js-a-server-component-or-client-component-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-loading-js-a-server-component-or-client-component-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-loading-js-a-server-component-or-client-component-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is loading.js a Server Component or Client Component by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, loading.js is a Server Component, but it can be converted to a Client Component using the 'use client' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LAOE" prefix="r4580" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4700201755865039668"],"question":[0,"Where does loading.js get nested in the component hierarchy?"],"answer":[0,"In the same folder, loading.js will be nested inside layout.js. It will automatically wrap the page.js file and any children below in a <Suspense> boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-loading-js-get-nested-in-the-component-hierarchy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-loading-js-get-nested-in-the-component-hierarchy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-loading-js-get-nested-in-the-component-hierarchy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does loading.js get nested in the component hierarchy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the same folder, loading.js will be nested inside layout.js. It will automatically wrap the page.js file and any children below in a <Suspense> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQgbEG" prefix="r4581" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4853295790577309847"],"question":[0,"How many levels down does useSelectedLayoutSegment read from the layout?"],"answer":[0,"It reads exactly one level down. It only returns the segment one level below the Layout it is called from, not deeper nested segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-levels-down-does-useselectedlayoutsegment-read-from-the-layout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-levels-down-does-useselectedlayoutsegment-read-from-the-layout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-levels-down-does-useselectedlayoutsegment-read-from-the-layout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many levels down does useSelectedLayoutSegment read from the layout?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It reads exactly one level down. It only returns the segment one level below the Layout it is called from, not deeper nested segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ix1GG" prefix="r4582" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5000814630062012130"],"question":[0,"What type is the params prop in Next.js 15 layouts and pages?"],"answer":[0,"In Next.js 15, the params prop is a Promise that must be awaited. For example, params has type Promise<{ slug: string }> instead of { slug: string }. You must use async/await or React's use() hook to access the values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-params-prop-in-next-js-15-layouts-and-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-params-prop-in-next-js-15-layouts-and-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-params-prop-in-next-js-15-layouts-and-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the params prop in Next.js 15 layouts and pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, the params prop is a Promise that must be awaited. For example, params has type Promise<{ slug: string }> instead of { slug: string }. You must use async/await or React's use() hook to access the values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ikd4N" prefix="r4583" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5863909458281033712"],"question":[0,"Can you access searchParams in a layout component?"],"answer":[0,"No. Layouts cannot access searchParams because they don't re-render on navigation. Use the Page component's searchParams prop instead, or use the useSearchParams hook in a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-access-searchparams-in-a-layout-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-access-searchparams-in-a-layout-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-access-searchparams-in-a-layout-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you access searchParams in a layout component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Layouts cannot access searchParams because they don't re-render on navigation. Use the Page component's searchParams prop instead, or use the useSearchParams hook in a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2m3Abt" prefix="r4584" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6414158698277272327"],"question":[0,"Are useSelectedLayoutSegment and useSelectedLayoutSegments Client Component or Server Component hooks?"],"answer":[0,"Both are Client Component hooks. Since Layouts are Server Components by default, these hooks are usually called via a Client Component that is imported into a Layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment"]]],"topic":[0,"nextjs"],"slug":[0,"are-useselectedlayoutsegment-and-useselectedlayoutsegments-client-component-or-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-useselectedlayoutsegment-and-useselectedlayoutsegments-client-component-or-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-useselectedlayoutsegment-and-useselectedlayoutsegments-client-component-or-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are useSelectedLayoutSegment and useSelectedLayoutSegments Client Component or Server Component hooks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Both are Client Component hooks. Since Layouts are Server Components by default, these hooks are usually called via a Client Component that is imported into a Layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KD6tL" prefix="r4585" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7067220903969084466"],"question":[0,"What is the default caching behavior for fetch requests in Next.js App Router?"],"answer":[0,"By default, fetch requests are not cached. Next.js uses 'auto no cache' behavior, meaning it fetches from the remote server on every request in development, but will fetch once during next build when routes are statically prerendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-caching-behavior-for-fetch-requests-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default caching behavior for fetch requests in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, fetch requests are not cached. Next.js uses 'auto no cache' behavior, meaning it fetches from the remote server on every request in development, but will fetch once during next build when routes are statically prerendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Znrp6S" prefix="r4586" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7347027104825949102"],"question":[0,"In Next.js 15, how do you access params in a synchronous Client Component that cannot be async?"],"answer":[0,"Use React's use() hook to unwrap the promise: import { use } from 'react'; const params = use(props.params); const slug = params.slug;"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-how-do-you-access-params-in-a-synchronous-client-component-that-ca"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-how-do-you-access-params-in-a-synchronous-client-component-that-ca" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-how-do-you-access-params-in-a-synchronous-client-component-that-ca" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, how do you access params in a synchronous Client Component that cannot be async?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use React's use() hook to unwrap the promise: import { use } from 'react'; const params = use(props.params); const slug = params.slug;</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAsWaH" prefix="r4587" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7431782678190261016"],"question":[0,"Do layouts have access to route segments below themselves in Next.js App Router?"],"answer":[0,"No. Layouts do not have access to the route segments below itself. To access child route segments, you must use the useSelectedLayoutSegment or useSelectedLayoutSegments hooks in a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"do-layouts-have-access-to-route-segments-below-themselves-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-layouts-have-access-to-route-segments-below-themselves-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-layouts-have-access-to-route-segments-below-themselves-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do layouts have access to route segments below themselves in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Layouts do not have access to the route segments below itself. To access child route segments, you must use the useSelectedLayoutSegment or useSelectedLayoutSegments hooks in a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZUgbh8" prefix="r4588" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7923256761947580758"],"question":[0,"What fetch cache option opts into dynamic rendering and bypasses caching?"],"answer":[0,"Use { cache: 'no-store' }. This tells Next.js to fetch the resource from the remote server on every request, even if Dynamic APIs are not detected on the route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-fetch-cache-option-opts-into-dynamic-rendering-and-bypasses-caching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-fetch-cache-option-opts-into-dynamic-rendering-and-bypasses-caching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-fetch-cache-option-opts-into-dynamic-rendering-and-bypasses-caching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What fetch cache option opts into dynamic rendering and bypasses caching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use { cache: 'no-store' }. This tells Next.js to fetch the resource from the remote server on every request, even if Dynamic APIs are not detected on the route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2l5azA" prefix="r4589" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8163819977333476186"],"question":[0,"How can layouts access the current pathname in Next.js?"],"answer":[0,"Layouts cannot directly access the pathname because they don't re-render on navigation. Use the usePathname hook in a Client Component imported into the layout."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-layouts-access-the-current-pathname-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-layouts-access-the-current-pathname-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-layouts-access-the-current-pathname-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can layouts access the current pathname in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Layouts cannot directly access the pathname because they don't re-render on navigation. Use the usePathname hook in a Client Component imported into the layout.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkKTJf" prefix="r4590" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8621952308272256892"],"question":[0,"What package ensures data fetching functions only execute on the server in Next.js?"],"answer":[0,"The 'server-only' package. You can import it at the top of your data fetching utility file (import 'server-only') to guarantee that the code never executes on the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-ensures-data-fetching-functions-only-execute-on-the-server-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-ensures-data-fetching-functions-only-execute-on-the-server-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-ensures-data-fetching-functions-only-execute-on-the-server-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package ensures data fetching functions only execute on the server in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'server-only' package. You can import it at the top of your data fetching utility file (import 'server-only') to guarantee that the code never executes on the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mxbcj" prefix="r4591" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8721157118088558037"],"question":[0,"What is the preload pattern in Next.js data fetching?"],"answer":[0,"The preload pattern involves creating a utility function that eagerly calls data-fetching functions before rendering dependent components. It typically uses void to trigger loading without blocking execution: export const preload = (id: string) => { void getItem(id) }. This can be combined with React's cache function and the server-only package."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-preload-pattern-in-next-js-data-fetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-preload-pattern-in-next-js-data-fetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-preload-pattern-in-next-js-data-fetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the preload pattern in Next.js data fetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The preload pattern involves creating a utility function that eagerly calls data-fetching functions before rendering dependent components. It typically uses void to trigger loading without blocking execution: export const preload = (id: string) => { void getItem(id) }. This can be combined with React's cache function and the server-only package.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gIKtD" prefix="r4592" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10638411698061651657"],"question":[0,"Can you use getStaticProps or getServerSideProps in layout files in the Pages Router?"],"answer":[0,"No. You cannot use getStaticProps or getServerSideProps in layout files in the Pages Router. Inside layouts, you must fetch data on the client-side using useEffect or a library like SWR."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-getstaticprops-or-getserversideprops-in-layout-files-in-the-pages-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-getstaticprops-or-getserversideprops-in-layout-files-in-the-pages-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-getstaticprops-or-getserversideprops-in-layout-files-in-the-pages-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use getStaticProps or getServerSideProps in layout files in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot use getStaticProps or getServerSideProps in layout files in the Pages Router. Inside layouts, you must fetch data on the client-side using useEffect or a library like SWR.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtkyQy" prefix="r4593" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11294043807257368877"],"question":[0,"If you have multiple await statements within a single component, do they execute in parallel?"],"answer":[0,"No. Multiple async/await statements within a component execute sequentially, blocking each other. To execute them in parallel, you must initiate all requests before awaiting them, then use Promise.all() to wait for them together."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"if-you-have-multiple-await-statements-within-a-single-component-do-they-execute-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="if-you-have-multiple-await-statements-within-a-single-component-do-they-execute-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#if-you-have-multiple-await-statements-within-a-single-component-do-they-execute-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">If you have multiple await statements within a single component, do they execute in parallel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Multiple async/await statements within a component execute sequentially, blocking each other. To execute them in parallel, you must initiate all requests before awaiting them, then use Promise.all() to wait for them together.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mGVKf" prefix="r4594" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11457652778840609682"],"question":[0,"What HTTP status code is returned when streaming occurs in Next.js?"],"answer":[0,"A 200 status code is returned, even if errors are communicated within the streamed content itself."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-is-returned-when-streaming-occurs-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-is-returned-when-streaming-occurs-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-is-returned-when-streaming-occurs-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code is returned when streaming occurs in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A 200 status code is returned, even if errors are communicated within the streamed content itself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2IaUs" prefix="r4595" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12968789870899517581"],"question":[0,"What JavaScript functions can you use to initiate parallel data requests in Next.js?"],"answer":[0,"You can use Promise.all() or Promise.allSettled() to initiate all promises at the same time. Promise.all() will fail if any request fails, while Promise.allSettled() allows you to handle failures individually."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-javascript-functions-can-you-use-to-initiate-parallel-data-requests-in-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-javascript-functions-can-you-use-to-initiate-parallel-data-requests-in-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-javascript-functions-can-you-use-to-initiate-parallel-data-requests-in-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What JavaScript functions can you use to initiate parallel data requests in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use Promise.all() or Promise.allSettled() to initiate all promises at the same time. Promise.all() will fail if any request fails, while Promise.allSettled() allows you to handle failures individually.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eirom" prefix="r4596" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13675798786631515572"],"question":[0,"What is the scope of Next.js fetch request memoization?"],"answer":[0,"Request memoization is scoped to a single render pass of the React component tree. It only applies during rendering and does not persist across separate server requests. The cache lasts only until the React component tree has finished rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/caching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-scope-of-next-js-fetch-request-memoization"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-scope-of-next-js-fetch-request-memoization" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-scope-of-next-js-fetch-request-memoization" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the scope of Next.js fetch request memoization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Request memoization is scoped to a single render pass of the React component tree. It only applies during rendering and does not persist across separate server requests. The cache lasts only until the React component tree has finished rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="160TnE" prefix="r4597" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14011587640010742172"],"question":[0,"Do Route Groups appear in the array returned by useSelectedLayoutSegments?"],"answer":[0,"Yes. The returned segments include Route Groups (folder names in brackets), which may need to be filtered out using the filter() array method if unwanted in your UI."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments"]]],"topic":[0,"nextjs"],"slug":[0,"do-route-groups-appear-in-the-array-returned-by-useselectedlayoutsegments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-route-groups-appear-in-the-array-returned-by-useselectedlayoutsegments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-route-groups-appear-in-the-array-returned-by-useselectedlayoutsegments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Route Groups appear in the array returned by useSelectedLayoutSegments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The returned segments include Route Groups (folder names in brackets), which may need to be filtered out using the filter() array method if unwanted in your UI.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YAWja" prefix="r4598" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14571210646261304927"],"question":[0,"Which HTTP methods are automatically deduplicated by Next.js fetch?"],"answer":[0,"Only GET and HEAD methods are automatically deduplicated. Other methods like POST and DELETE are not automatically memoized. Fetch requests using GET or HEAD with the same URL and options in a single render pass are combined into one request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"which-http-methods-are-automatically-deduplicated-by-next-js-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-http-methods-are-automatically-deduplicated-by-next-js-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-http-methods-are-automatically-deduplicated-by-next-js-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTTP methods are automatically deduplicated by Next.js fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only GET and HEAD methods are automatically deduplicated. Other methods like POST and DELETE are not automatically memoized. Fetch requests using GET or HEAD with the same URL and options in a single render pass are combined into one request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UMh8p" prefix="r4599" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15070496885849337106"],"question":[0,"Does Next.js fetch request memoization apply to Route Handlers?"],"answer":[0,"No. Request memoization applies to fetch requests in generateMetadata, generateStaticParams, Layouts, Pages, and other Server Components, but it does not apply to fetch requests in Route Handlers as they are not part of the React component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-fetch-request-memoization-apply-to-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-fetch-request-memoization-apply-to-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-fetch-request-memoization-apply-to-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js fetch request memoization apply to Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Request memoization applies to fetch requests in generateMetadata, generateStaticParams, Layouts, Pages, and other Server Components, but it does not apply to fetch requests in Route Handlers as they are not part of the React component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="forms-and-mutations-definition-and-setup-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Forms and Mutations > Definition and Setup Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="1VhL3Y" prefix="r4600" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"176666368166963943"],"question":[0,"Can Server Components use both inline and file-level 'use server' directives?"],"answer":[0,"Yes. Server Components can use either the inline function-level 'use server' directive or the module-level 'use server' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-components-use-both-inline-and-file-level-use-server-directives"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-components-use-both-inline-and-file-level-use-server-directives" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-components-use-both-inline-and-file-level-use-server-directives" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Components use both inline and file-level 'use server' directives?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Components can use either the inline function-level 'use server' directive or the module-level 'use server' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xSgzT" prefix="r4601" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"386269927274674046"],"question":[0,"What benefit does Next.js provide when Server Actions are invoked?"],"answer":[0,"When an action is invoked, Next.js can return both the updated UI and new data in a single server roundtrip, integrating with the Next.js caching and revalidation architecture."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-benefit-does-next-js-provide-when-server-actions-are-invoked"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-benefit-does-next-js-provide-when-server-actions-are-invoked" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-benefit-does-next-js-provide-when-server-actions-are-invoked" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What benefit does Next.js provide when Server Actions are invoked?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When an action is invoked, Next.js can return both the updated UI and new data in a single server roundtrip, integrating with the Next.js caching and revalidation architecture.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ovKlq" prefix="r4602" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"819343641553405546"],"question":[0,"How is the JavaScript bind() method used with Server Actions?"],"answer":[0,"You can use bind(null, arg1, arg2, ...) to pass additional arguments to a Server Action. The first argument is null (no context needed), and subsequent arguments are prepended to the Server Action's parameters. For example: updateUser.bind(null, userId) creates a new function with userId as the first parameter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-is-the-javascript-bind-method-used-with-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-is-the-javascript-bind-method-used-with-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-is-the-javascript-bind-method-used-with-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How is the JavaScript bind() method used with Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use bind(null, arg1, arg2, ...) to pass additional arguments to a Server Action. The first argument is null (no context needed), and subsequent arguments are prepended to the Server Action's parameters. For example: updateUser.bind(null, userId) creates a new function with userId as the first parameter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpmBmF" prefix="r4603" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"917788212949231185"],"question":[0,"What four properties does useFormStatus return in React 19?"],"answer":[0,"In React 19, useFormStatus returns an object with four properties: pending (boolean), data (FormData object or null), method (string: 'get' or 'post'), and action (reference to the action function or null)."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-four-properties-does-useformstatus-return-in-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-four-properties-does-useformstatus-return-in-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-four-properties-does-useformstatus-return-in-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What four properties does useFormStatus return in React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In React 19, useFormStatus returns an object with four properties: pending (boolean), data (FormData object or null), method (string: 'get' or 'post'), and action (reference to the action function or null).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1cWI0b" prefix="r4604" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1023760193997895246"],"question":[0,"What is the placement requirement for using useFormStatus?"],"answer":[0,"useFormStatus must be called from a component that is rendered inside a <form> element. It cannot track forms rendered in the same component that calls the hook—only parent forms."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-placement-requirement-for-using-useformstatus"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-placement-requirement-for-using-useformstatus" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-placement-requirement-for-using-useformstatus" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the placement requirement for using useFormStatus?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useFormStatus must be called from a component that is rendered inside a <form> element. It cannot track forms rendered in the same component that calls the hook—only parent forms.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KUMdJ" prefix="r4605" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1381646281841924536"],"question":[0,"Can Client Components define inline Server Actions with 'use server'?"],"answer":[0,"No. Client Components can only import actions that use the module-level 'use server' directive. It is not allowed to define inline 'use server' annotated Server Actions in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-define-inline-server-actions-with-use-server"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-define-inline-server-actions-with-use-server" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-define-inline-server-actions-with-use-server" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components define inline Server Actions with 'use server'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Client Components can only import actions that use the module-level 'use server' directive. It is not allowed to define inline 'use server' annotated Server Actions in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28hT3u" prefix="r4606" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1696076996325303646"],"question":[0,"What configuration option allows Server Actions from different origins?"],"answer":[0,"Use the serverActions.allowedOrigins option in next.config.js, which accepts an array of strings specifying safe origins (e.g., ['website.com', '*.domain.com', 'localhost:3000'])."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-allows-server-actions-from-different-origins"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-allows-server-actions-from-different-origins" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-allows-server-actions-from-different-origins" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option allows Server Actions from different origins?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the serverActions.allowedOrigins option in next.config.js, which accepts an array of strings specifying safe origins (e.g., ['website.com', '*.domain.com', 'localhost:3000']).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6EHpn" prefix="r4607" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2162633008565592885"],"question":[0,"What HTTP method do Server Actions use, and can other methods be used?"],"answer":[0,"Behind the scenes, Server Actions use the POST method, and only this HTTP method can invoke them. No other HTTP methods are allowed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-do-server-actions-use-and-can-other-methods-be-used"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-do-server-actions-use-and-can-other-methods-be-used" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-do-server-actions-use-and-can-other-methods-be-used" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method do Server Actions use, and can other methods be used?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Behind the scenes, Server Actions use the POST method, and only this HTTP method can invoke them. No other HTTP methods are allowed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6YwTk" prefix="r4608" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4941830820662444203"],"question":[0,"What is the purpose of the optional permalink parameter in useActionState?"],"answer":[0,"The permalink parameter is a string containing the unique page URL that the form modifies. If the form submits before JavaScript loads, the browser navigates to this URL instead of the current page. The same form component must render on the destination page so React can pass state through. Once hydration completes, this parameter has no effect."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-optional-permalink-parameter-in-useactionstate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-optional-permalink-parameter-in-useactionstate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-optional-permalink-parameter-in-useactionstate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the optional permalink parameter in useActionState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The permalink parameter is a string containing the unique page URL that the form modifies. If the form submits before JavaScript loads, the browser navigates to this URL instead of the current page. The same form component must render on the destination page so React can pass state through. Once hydration completes, this parameter has no effect.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aloyb" prefix="r4609" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5659637121625183930"],"question":[0,"What is the exact function signature for a Server Action when used with useActionState?"],"answer":[0,"async function action(prevState: StateType, formData: FormData): Promise<StateType>. The first parameter is the previous state (or initialState on first call), and the second parameter is the FormData."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-function-signature-for-a-server-action-when-used-with-useactio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-function-signature-for-a-server-action-when-used-with-useactio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-function-signature-for-a-server-action-when-used-with-useactio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact function signature for a Server Action when used with useActionState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>async function action(prevState: StateType, formData: FormData): Promise<StateType>. The first parameter is the previous state (or initialState on first call), and the second parameter is the FormData.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tkP1z" prefix="r4610" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5867231437577130480"],"question":[0,"What is the progressive enhancement behavior for forms in Server Components?"],"answer":[0,"Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-progressive-enhancement-behavior-for-forms-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-progressive-enhancement-behavior-for-forms-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-progressive-enhancement-behavior-for-forms-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the progressive enhancement behavior for forms in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vP147" prefix="r4611" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6257637295420709787"],"question":[0,"What is the difference between file-level and function-level 'use server' directive placement?"],"answer":[0,"File-level (at the top of a file): All functions in the file are executed on the server. Function-level (at the top of a function body): Only that specific function is marked as a Server Function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-file-level-and-function-level-use-server-directiv"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-file-level-and-function-level-use-server-directiv" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-file-level-and-function-level-use-server-directiv" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between file-level and function-level 'use server' directive placement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>File-level (at the top of a file): All functions in the file are executed on the server. Function-level (at the top of a function body): Only that specific function is marked as a Server Function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ok67A" prefix="r4612" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6352069591355827677"],"question":[0,"Do Server Actions automatically use startTransition when used in forms?"],"answer":[0,"Yes. Server Actions automatically use startTransition when passed to a <form> using the action prop or to a <button> using the formAction prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-actions-automatically-use-starttransition-when-used-in-forms"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-actions-automatically-use-starttransition-when-used-in-forms" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-actions-automatically-use-starttransition-when-used-in-forms" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Actions automatically use startTransition when used in forms?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Actions automatically use startTransition when passed to a <form> using the action prop or to a <button> using the formAction prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mmSdk" prefix="r4613" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6567278722513905362"],"question":[0,"What parameter does a Server Action automatically receive when invoked from a form?"],"answer":[0,"When used in a form, the Server Action automatically receives the FormData object containing form field data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameter-does-a-server-action-automatically-receive-when-invoked-from-a-fo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameter-does-a-server-action-automatically-receive-when-invoked-from-a-fo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameter-does-a-server-action-automatically-receive-when-invoked-from-a-fo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameter does a Server Action automatically receive when invoked from a form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When used in a form, the Server Action automatically receives the FormData object containing form field data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16enPK" prefix="r4614" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6806426306510734809"],"question":[0,"What does the isPending value from useActionState indicate?"],"answer":[0,"The isPending boolean flag indicates whether there is a pending Transition, allowing UI updates (like showing 'Loading...') while the action processes."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-ispending-value-from-useactionstate-indicate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-ispending-value-from-useactionstate-indicate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-ispending-value-from-useactionstate-indicate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the isPending value from useActionState indicate?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The isPending boolean flag indicates whether there is a pending Transition, allowing UI updates (like showing 'Loading...') while the action processes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1k8hd2" prefix="r4615" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8052878183667253494"],"question":[0,"What HTML attributes can be used on form elements to invoke different Server Actions?"],"answer":[0,"Use the action prop on <form> elements, or the formAction prop on nested elements like <button>, <input type=\"submit\">, and <input type=\"image\">. This allows multiple Server Actions within a single form."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-attributes-can-be-used-on-form-elements-to-invoke-different-server-act"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-attributes-can-be-used-on-form-elements-to-invoke-different-server-act" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-attributes-can-be-used-on-form-elements-to-invoke-different-server-act" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML attributes can be used on form elements to invoke different Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the action prop on <form> elements, or the formAction prop on nested elements like <button>, <input type="submit">, and <input type="image">. This allows multiple Server Actions within a single form.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQDiIf" prefix="r4616" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8083280828737992048"],"question":[0,"What happens to the prevState parameter in useActionState on the first submission?"],"answer":[0,"On the first submission, prevState equals the initialState value provided to useActionState. On subsequent submissions, it equals the previous action's return value."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-prevstate-parameter-in-useactionstate-on-the-first-submissio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-prevstate-parameter-in-useactionstate-on-the-first-submissio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-prevstate-parameter-in-useactionstate-on-the-first-submissio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the prevState parameter in useActionState on the first submission?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On the first submission, prevState equals the initialState value provided to useActionState. On subsequent submissions, it equals the previous action's return value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zo5pdU" prefix="r4617" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8522084045307874384"],"question":[0,"What does useActionState return?"],"answer":[0,"useActionState returns an array with exactly three elements: [state, formAction, isPending]. state is the current form state, formAction is the new action to pass to the form, and isPending is a boolean indicating whether a transition is pending."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useactionstate-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useactionstate-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useactionstate-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useActionState return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState returns an array with exactly three elements: [state, formAction, isPending]. state is the current form state, formAction is the new action to pass to the form, and isPending is a boolean indicating whether a transition is pending.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zuerfe" prefix="r4618" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8535825598086493131"],"question":[0,"How can Client Components use Server Actions if they cannot define them inline?"],"answer":[0,"Client Components can import Server Actions from files marked with file-level 'use server', or receive them as props from Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-client-components-use-server-actions-if-they-cannot-define-them-inline"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-client-components-use-server-actions-if-they-cannot-define-them-inline" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-client-components-use-server-actions-if-they-cannot-define-them-inline" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can Client Components use Server Actions if they cannot define them inline?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Client Components can import Server Actions from files marked with file-level 'use server', or receive them as props from Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1D5QBN" prefix="r4619" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8625723526365823338"],"question":[0,"How do you extract a single field value from FormData in a Server Action?"],"answer":[0,"Use formData.get('fieldName') where 'fieldName' is the name attribute of the input field. This returns the first value associated with that key."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-extract-a-single-field-value-from-formdata-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-extract-a-single-field-value-from-formdata-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-extract-a-single-field-value-from-formdata-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you extract a single field value from FormData in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use formData.get('fieldName') where 'fieldName' is the name attribute of the input field. This returns the first value associated with that key.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bevtb" prefix="r4620" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8630285868741087217"],"question":[0,"What directive must be used to define a Server Action in Next.js?"],"answer":[0,"The 'use server' directive must be used. It can be placed at the top of an async function body (function-level) or at the top of a file before imports (file-level)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-must-be-used-to-define-a-server-action-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-must-be-used-to-define-a-server-action-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-must-be-used-to-define-a-server-action-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive must be used to define a Server Action in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use server' directive must be used. It can be placed at the top of an async function body (function-level) or at the top of a file before imports (file-level).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vTIKB" prefix="r4621" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9049996994806025757"],"question":[0,"Does useFormStatus require the 'use client' directive?"],"answer":[0,"Yes. useFormStatus only works in Client Components and requires the 'use client' directive at the top of the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"does-useformstatus-require-the-use-client-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-useformstatus-require-the-use-client-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-useformstatus-require-the-use-client-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does useFormStatus require the 'use client' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. useFormStatus only works in Client Components and requires the 'use client' directive at the top of the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmGn5R" prefix="r4622" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9939144240670741401"],"question":[0,"What security check does Next.js perform on Server Action requests?"],"answer":[0,"Next.js compares the Origin header to the Host header (or X-Forwarded-Host). If they don't match, the request will be aborted. Server Actions can only be invoked on the same host as the page that hosts it."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-check-does-next-js-perform-on-server-action-requests"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-check-does-next-js-perform-on-server-action-requests" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-check-does-next-js-perform-on-server-action-requests" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security check does Next.js perform on Server Action requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js compares the Origin header to the Host header (or X-Forwarded-Host). If they don't match, the request will be aborted. Server Actions can only be invoked on the same host as the page that hosts it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZyrPc3" prefix="r4623" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10264015644456084658"],"question":[0,"What are the two possible values for the method property returned by useFormStatus?"],"answer":[0,"The method property can be either 'get' or 'post', representing the HTTP method used for form submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-possible-values-for-the-method-property-returned-by-useformstat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-possible-values-for-the-method-property-returned-by-useformstat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-possible-values-for-the-method-property-returned-by-useformstat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two possible values for the method property returned by useFormStatus?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The method property can be either 'get' or 'post', representing the HTTP method used for form submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UIdUA" prefix="r4624" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10936158693485726009"],"question":[0,"What was useActionState previously called?"],"answer":[0,"useActionState was previously part of React DOM and called useFormState in earlier Canary versions before being moved to the main React package."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-useactionstate-previously-called"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-useactionstate-previously-called" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-useactionstate-previously-called" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was useActionState previously called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState was previously part of React DOM and called useFormState in earlier Canary versions before being moved to the main React package.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="content-security-policy" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Content Security Policy</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z23Ayqw" prefix="r4625" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"179333939718845307"],"question":[0,"What pattern does Next.js use to automatically extract nonces from the CSP header?"],"answer":[0,"'nonce-{value}'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-pattern-does-next-js-use-to-automatically-extract-nonces-from-the-csp-heade"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-pattern-does-next-js-use-to-automatically-extract-nonces-from-the-csp-heade" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-pattern-does-next-js-use-to-automatically-extract-nonces-from-the-csp-heade" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What pattern does Next.js use to automatically extract nonces from the CSP header?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nonce-{value}'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23gpxB" prefix="r4626" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"403337034333252812"],"question":[0,"In Next.js development mode, what CSP directive must be added to script-src?"],"answer":[0,"'unsafe-eval'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-development-mode-what-csp-directive-must-be-added-to-script-src"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-development-mode-what-csp-directive-must-be-added-to-script-src" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-development-mode-what-csp-directive-must-be-added-to-script-src" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js development mode, what CSP directive must be added to script-src?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'unsafe-eval'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1iGsb7" prefix="r4627" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"604761760831407689"],"question":[0,"How do you read the nonce value in a Next.js Server Component?"],"answer":[0,"const nonce = (await headers()).get('x-nonce')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-read-the-nonce-value-in-a-next-js-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-read-the-nonce-value-in-a-next-js-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-read-the-nonce-value-in-a-next-js-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you read the nonce value in a Next.js Server Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>const nonce = (await headers()).get('x-nonce')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OCljT" prefix="r4628" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1700718970547270469"],"question":[0,"What is the purpose of 'strict-dynamic' in Next.js CSP script-src?"],"answer":[0,"It allows scripts loaded by trusted scripts to execute via transitive trust propagation, and causes browsers to ignore 'self' when supported"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-strict-dynamic-in-next-js-csp-script-src"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-strict-dynamic-in-next-js-csp-script-src" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-strict-dynamic-in-next-js-csp-script-src" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of 'strict-dynamic' in Next.js CSP script-src?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It allows scripts loaded by trusted scripts to execute via transitive trust propagation, and causes browsers to ignore 'self' when supported</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1y5dXl" prefix="r4629" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1887130965681535112"],"question":[0,"Can Next.js pages be cached by CDNs when using nonce-based CSP?"],"answer":[0,"No, pages cannot be cached by CDNs without additional configuration when using nonce-based CSP"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-pages-be-cached-by-cdns-when-using-nonce-based-csp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-pages-be-cached-by-cdns-when-using-nonce-based-csp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-pages-be-cached-by-cdns-when-using-nonce-based-csp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js pages be cached by CDNs when using nonce-based CSP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, pages cannot be cached by CDNs without additional configuration when using nonce-based CSP</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ufvEc" prefix="r4630" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1944780323796042819"],"question":[0,"Which bundler is required for Next.js experimental SRI support?"],"answer":[0,"Webpack only (not Turbopack)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"which-bundler-is-required-for-next-js-experimental-sri-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-bundler-is-required-for-next-js-experimental-sri-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-bundler-is-required-for-next-js-experimental-sri-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which bundler is required for Next.js experimental SRI support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Webpack only (not Turbopack)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1AN7X7" prefix="r4631" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3798607241572711882"],"question":[0,"What header must be set in the response to enable CSP in Next.js?"],"answer":[0,"Content-Security-Policy (or Content-Security-Policy-Report-Only for testing)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-header-must-be-set-in-the-response-to-enable-csp-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-header-must-be-set-in-the-response-to-enable-csp-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-header-must-be-set-in-the-response-to-enable-csp-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What header must be set in the response to enable CSP in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Content-Security-Policy (or Content-Security-Policy-Report-Only for testing)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAFrCy" prefix="r4632" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4022709524394974173"],"question":[0,"In which Next.js version was experimental SRI (Subresource Integrity) support introduced?"],"answer":[0,"v14.0.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-experimental-sri-subresource-integrity-support-intr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-experimental-sri-subresource-integrity-support-intr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-experimental-sri-subresource-integrity-support-intr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was experimental SRI (Subresource Integrity) support introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v14.0.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hzws6" prefix="r4633" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4091808235963429233"],"question":[0,"What CSP directive syntax does Next.js recommend for style-src with nonces?"],"answer":[0,"style-src 'self' 'nonce-${nonce}'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-csp-directive-syntax-does-next-js-recommend-for-style-src-with-nonces"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-csp-directive-syntax-does-next-js-recommend-for-style-src-with-nonces" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-csp-directive-syntax-does-next-js-recommend-for-style-src-with-nonces" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSP directive syntax does Next.js recommend for style-src with nonces?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>style-src 'self' 'nonce-${nonce}'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yCq6k" prefix="r4634" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4410931727012674315"],"question":[0,"What CSP directives are commonly included in a strict Next.js CSP policy?"],"answer":[0,"default-src 'self'; script-src 'self' 'nonce-${nonce}' 'strict-dynamic'; style-src 'self' 'nonce-${nonce}'; img-src 'self' blob: data:; font-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests;"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-csp-directives-are-commonly-included-in-a-strict-next-js-csp-policy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-csp-directives-are-commonly-included-in-a-strict-next-js-csp-policy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-csp-directives-are-commonly-included-in-a-strict-next-js-csp-policy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSP directives are commonly included in a strict Next.js CSP policy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>default-src 'self'; script-src 'self' 'nonce-${nonce}' 'strict-dynamic'; style-src 'self' 'nonce-${nonce}'; img-src 'self' blob: data:; font-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests;</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sNSgg" prefix="r4635" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5363284439042349489"],"question":[0,"What is the exact syntax for generating a nonce in Next.js middleware for CSP?"],"answer":[0,"Buffer.from(crypto.randomUUID()).toString('base64')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-for-generating-a-nonce-in-next-js-middleware-for-csp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-for-generating-a-nonce-in-next-js-middleware-for-csp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-for-generating-a-nonce-in-next-js-middleware-for-csp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax for generating a nonce in Next.js middleware for CSP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Buffer.from(crypto.randomUUID()).toString('base64')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HoRp6" prefix="r4636" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5761941181414348511"],"question":[0,"What CSP directive syntax does Next.js recommend for script-src with nonces?"],"answer":[0,"script-src 'self' 'nonce-${nonce}' 'strict-dynamic'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-csp-directive-syntax-does-next-js-recommend-for-script-src-with-nonces"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-csp-directive-syntax-does-next-js-recommend-for-script-src-with-nonces" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-csp-directive-syntax-does-next-js-recommend-for-script-src-with-nonces" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What CSP directive syntax does Next.js recommend for script-src with nonces?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>script-src 'self' 'nonce-${nonce}' 'strict-dynamic'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZbNP7k" prefix="r4637" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6547927337033112787"],"question":[0,"What is the async function name in next.config.js used to set CSP headers without nonces?"],"answer":[0,"headers()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-async-function-name-in-next-config-js-used-to-set-csp-headers-withou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-async-function-name-in-next-config-js-used-to-set-csp-headers-withou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-async-function-name-in-next-config-js-used-to-set-csp-headers-withou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the async function name in next.config.js used to set CSP headers without nonces?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>headers()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iiaoM" prefix="r4638" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7447600739642640737"],"question":[0,"Where should the proxy.ts or middleware.ts file be located in a Next.js project?"],"answer":[0,"In the project root or inside src/ at the same level as pages or app directory"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-proxy-ts-or-middleware-ts-file-be-located-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-proxy-ts-or-middleware-ts-file-be-located-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-proxy-ts-or-middleware-ts-file-be-located-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the proxy.ts or middleware.ts file be located in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the project root or inside src/ at the same level as pages or app directory</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2h1GNg" prefix="r4639" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7454265746997060360"],"question":[0,"What file name should be used for middleware in Next.js 16+?"],"answer":[0,"proxy.ts or proxy.js (middleware.ts/js is deprecated in Next.js 16)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-name-should-be-used-for-middleware-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-name-should-be-used-for-middleware-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-name-should-be-used-for-middleware-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file name should be used for middleware in Next.js 16+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>proxy.ts or proxy.js (middleware.ts/js is deprecated in Next.js 16)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEUqNS" prefix="r4640" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11063415023570469102"],"question":[0,"What header keys are checked in the 'missing' array of the middleware matcher to filter out prefetch requests?"],"answer":[0,"next-router-prefetch and purpose (with value 'prefetch')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-header-keys-are-checked-in-the-missing-array-of-the-middleware-matcher-to-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-header-keys-are-checked-in-the-missing-array-of-the-middleware-matcher-to-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-header-keys-are-checked-in-the-missing-array-of-the-middleware-matcher-to-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What header keys are checked in the 'missing' array of the middleware matcher to filter out prefetch requests?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next-router-prefetch and purpose (with value 'prefetch')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zti6NR" prefix="r4641" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11097308923306277344"],"question":[0,"Can Next.js Partial Prerendering (PPR) be used with nonce-based CSP?"],"answer":[0,"No, PPR is incompatible with nonce-based CSP"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-partial-prerendering-ppr-be-used-with-nonce-based-csp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-partial-prerendering-ppr-be-used-with-nonce-based-csp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-partial-prerendering-ppr-be-used-with-nonce-based-csp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js Partial Prerendering (PPR) be used with nonce-based CSP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, PPR is incompatible with nonce-based CSP</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z94HXh" prefix="r4642" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11463426630554805347"],"question":[0,"What rendering mode is required when using nonces in Next.js CSP?"],"answer":[0,"Dynamic rendering - all pages must be dynamically rendered"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-rendering-mode-is-required-when-using-nonces-in-next-js-csp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-rendering-mode-is-required-when-using-nonces-in-next-js-csp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-rendering-mode-is-required-when-using-nonces-in-next-js-csp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What rendering mode is required when using nonces in Next.js CSP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic rendering - all pages must be dynamically rendered</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zch8tB" prefix="r4643" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12001904512268600445"],"question":[0,"What hash algorithms are supported for Next.js experimental SRI?"],"answer":[0,"sha256, sha384, sha512"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-hash-algorithms-are-supported-for-next-js-experimental-sri"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-hash-algorithms-are-supported-for-next-js-experimental-sri" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-hash-algorithms-are-supported-for-next-js-experimental-sri" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What hash algorithms are supported for Next.js experimental SRI?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>sha256, sha384, sha512</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEK194" prefix="r4644" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12152217758713254848"],"question":[0,"How does Next.js handle backward compatibility with 'unsafe-inline' when using nonces?"],"answer":[0,"Modern browsers that support nonces will ignore 'unsafe-inline', while older browsers will fall back to it"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-backward-compatibility-with-unsafe-inline-when-using-non"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-backward-compatibility-with-unsafe-inline-when-using-non" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-backward-compatibility-with-unsafe-inline-when-using-non" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle backward compatibility with 'unsafe-inline' when using nonces?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Modern browsers that support nonces will ignore 'unsafe-inline', while older browsers will fall back to it</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="QUmYF" prefix="r4645" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13068502486576886034"],"question":[0,"What is the syntax for setting CSP in next.config.js headers function?"],"answer":[0,"Return an array with objects containing 'source' and 'headers' properties, where headers has 'key' (Content-Security-Policy) and 'value' (CSP directives)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/headers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-setting-csp-in-next-config-js-headers-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-setting-csp-in-next-config-js-headers-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-setting-csp-in-next-config-js-headers-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for setting CSP in next.config.js headers function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Return an array with objects containing 'source' and 'headers' properties, where headers has 'key' (Content-Security-Policy) and 'value' (CSP directives)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/headers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kCemY" prefix="r4646" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13160234060550952572"],"question":[0,"Can Next.js ISR (Incremental Static Regeneration) be used with nonce-based CSP?"],"answer":[0,"No, ISR is incompatible with nonce-based CSP because nonces require dynamic rendering"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-js-isr-incremental-static-regeneration-be-used-with-nonce-based-csp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-js-isr-incremental-static-regeneration-be-used-with-nonce-based-csp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-js-isr-incremental-static-regeneration-be-used-with-nonce-based-csp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Next.js ISR (Incremental Static Regeneration) be used with nonce-based CSP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, ISR is incompatible with nonce-based CSP because nonces require dynamic rendering</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z133Q42" prefix="r4647" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13347897719894426388"],"question":[0,"What benefit does experimental SRI provide for Next.js CSP?"],"answer":[0,"Enables static generation with strict CSP through build-time hash generation"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-benefit-does-experimental-sri-provide-for-next-js-csp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-benefit-does-experimental-sri-provide-for-next-js-csp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-benefit-does-experimental-sri-provide-for-next-js-csp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What benefit does experimental SRI provide for Next.js CSP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Enables static generation with strict CSP through build-time hash generation</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mh71n" prefix="r4648" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14353199296021521456"],"question":[0,"What paths does the Next.js CSP middleware matcher exclude by default?"],"answer":[0,"api, _next/static, _next/image, favicon.ico"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/content-security-policy"]]],"topic":[0,"nextjs"],"slug":[0,"what-paths-does-the-next-js-csp-middleware-matcher-exclude-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-paths-does-the-next-js-csp-middleware-matcher-exclude-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-paths-does-the-next-js-csp-middleware-matcher-exclude-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What paths does the Next.js CSP middleware matcher exclude by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>api, _next/static, _next/image, favicon.ico</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/content-security-policy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="uSrek" prefix="r4649" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14451385767792798937"],"question":[0,"How many proxy/middleware files are supported per Next.js project?"],"answer":[0,"Only one proxy file per project is supported"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-proxy-middleware-files-are-supported-per-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-proxy-middleware-files-are-supported-per-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-proxy-middleware-files-are-supported-per-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many proxy/middleware files are supported per Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only one proxy file per project is supported</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="edge-runtime-api-compatibility" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Edge Runtime > API Compatibility</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZddlCr" prefix="r4650" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"209703755981989546"],"question":[0,"What is the typical maximum execution time for Next.js Edge Functions?"],"answer":[0,"Edge functions have a very short maximum execution time, typically under 5 seconds on Vercel (more specifically around 2-3 seconds)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-maximum-execution-time-for-next-js-edge-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-maximum-execution-time-for-next-js-edge-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-maximum-execution-time-for-next-js-edge-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical maximum execution time for Next.js Edge Functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge functions have a very short maximum execution time, typically under 5 seconds on Vercel (more specifically around 2-3 seconds).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1km9rM" prefix="r4651" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"221861717499309824"],"question":[0,"Which Web Standard APIs for abort handling are supported in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime supports AbortController and AbortSignal."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-web-standard-apis-for-abort-handling-are-supported-in-the-next-js-edge-run"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-web-standard-apis-for-abort-handling-are-supported-in-the-next-js-edge-run" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-web-standard-apis-for-abort-handling-are-supported-in-the-next-js-edge-run" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Web Standard APIs for abort handling are supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports AbortController and AbortSignal.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NqVDq" prefix="r4652" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"511141960310699012"],"question":[0,"Can you use the Node.js crypto module in Next.js Edge Runtime?"],"answer":[0,"No. Native Node.js APIs including the crypto module are not supported. You must use the Web Crypto API (crypto.subtle) instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/node-module-in-edge-runtime"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-node-js-crypto-module-in-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-node-js-crypto-module-in-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-node-js-crypto-module-in-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the Node.js crypto module in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Native Node.js APIs including the crypto module are not supported. You must use the Web Crypto API (crypto.subtle) instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/node-module-in-edge-runtime" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19j5Kx" prefix="r4653" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3990837192129806781"],"question":[0,"Which network APIs are supported in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime supports: Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, and WebSocket."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-network-apis-are-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-network-apis-are-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-network-apis-are-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which network APIs are supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports: Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, and WebSocket.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lyCae" prefix="r4654" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4136093281098966681"],"question":[0,"What is the typical code size limit for Next.js Edge Functions and Middleware?"],"answer":[0,"Edge Functions and Middleware have a strict size limit for the final bundled code, typically 1MB. On Vercel, code executed in the Edge Runtime cannot exceed between 1 MB and 4 MB, with the exact limit varying depending on deployment infrastructure."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/32907"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-code-size-limit-for-next-js-edge-functions-and-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-code-size-limit-for-next-js-edge-functions-and-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-code-size-limit-for-next-js-edge-functions-and-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical code size limit for Next.js Edge Functions and Middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Functions and Middleware have a strict size limit for the final bundled code, typically 1MB. On Vercel, code executed in the Edge Runtime cannot exceed between 1 MB and 4 MB, with the exact limit varying depending on deployment infrastructure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/32907" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zlh5QB" prefix="r4655" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5168893168647757800"],"question":[0,"What prefix is required for environment variables to be available in Edge Runtime when deployed to Vercel?"],"answer":[0,"When deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their name is prefixed with NEXT_PUBLIC_. Next.js treats edge targeted bundles the same as client bundles: it only includes variables prefixed with NEXT_PUBLIC_."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/44628"]]],"topic":[0,"nextjs"],"slug":[0,"what-prefix-is-required-for-environment-variables-to-be-available-in-edge-runtim"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prefix-is-required-for-environment-variables-to-be-available-in-edge-runtim" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prefix-is-required-for-environment-variables-to-be-available-in-edge-runtim" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prefix is required for environment variables to be available in Edge Runtime when deployed to Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their name is prefixed with NEXT_PUBLIC_. Next.js treats edge targeted bundles the same as client bundles: it only includes variables prefixed with NEXT_PUBLIC_.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/44628" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HAYpe" prefix="r4656" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6411036050797951550"],"question":[0,"Do environment variables change at runtime in Next.js Edge Runtime after the build?"],"answer":[0,"No. After being built, your app will no longer respond to changes to these environment variables. Next.js will replace all references to process.env during the next build process and inline the values into the final build artifacts."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/44628"]]],"topic":[0,"nextjs"],"slug":[0,"do-environment-variables-change-at-runtime-in-next-js-edge-runtime-after-the-bui"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-environment-variables-change-at-runtime-in-next-js-edge-runtime-after-the-bui" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-environment-variables-change-at-runtime-in-next-js-edge-runtime-after-the-bui" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do environment variables change at runtime in Next.js Edge Runtime after the build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. After being built, your app will no longer respond to changes to these environment variables. Next.js will replace all references to process.env during the next build process and inline the values into the final build artifacts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/44628" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Bnylh" prefix="r4657" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6618125334723955543"],"question":[0,"How do you configure a Next.js route or API route to use the Edge Runtime?"],"answer":[0,"Export a runtime constant with the value 'edge' from your route file. Example: export const runtime = 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-next-js-route-or-api-route-to-use-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-next-js-route-or-api-route-to-use-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-next-js-route-or-api-route-to-use-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a Next.js route or API route to use the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a runtime constant with the value 'edge' from your route file. Example: export const runtime = 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1v2Fw6" prefix="r4658" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6806690382927113861"],"question":[0,"Is URLPattern supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. URLPattern is supported in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-urlpattern-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-urlpattern-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-urlpattern-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is URLPattern supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. URLPattern is supported in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zp8b7t" prefix="r4659" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7081871864080645532"],"question":[0,"Which encoding APIs are supported in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime supports: atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, and TextEncoderStream."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-encoding-apis-are-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-encoding-apis-are-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-encoding-apis-are-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which encoding APIs are supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports: atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, and TextEncoderStream.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuKdrH" prefix="r4660" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7092596809929000518"],"question":[0,"Is AsyncLocalStorage supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. AsyncLocalStorage is supported as a Next.js polyfill in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-asynclocalstorage-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-asynclocalstorage-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-asynclocalstorage-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is AsyncLocalStorage supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. AsyncLocalStorage is supported as a Next.js polyfill in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1x3FRj" prefix="r4661" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7278831212589673900"],"question":[0,"Can you access environment variables using process.env in the Next.js Edge Runtime?"],"answer":[0,"Yes. You can use process.env to access Environment Variables during both next dev and next build in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-access-environment-variables-using-process-env-in-the-next-js-edge-runti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-access-environment-variables-using-process-env-in-the-next-js-edge-runti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-access-environment-variables-using-process-env-in-the-next-js-edge-runti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you access environment variables using process.env in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can use process.env to access Environment Variables during both next dev and next build in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FSm1B" prefix="r4662" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8122775256534503509"],"question":[0,"Does AsyncLocalStorage context propagate correctly across all execution boundaries in Next.js Edge Runtime?"],"answer":[0,"No. AsyncLocalStorage context passing can fail when deployed to Cloudflare Workers/Vercel Edge runtime if the call to getStore() is nested within a thenable that isn't a native Promise. Context does not propagate between Middleware, API handlers, and server-rendered pages in Next.js 14."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/52774"]]],"topic":[0,"nextjs"],"slug":[0,"does-asynclocalstorage-context-propagate-correctly-across-all-execution-boundari"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-asynclocalstorage-context-propagate-correctly-across-all-execution-boundari" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-asynclocalstorage-context-propagate-correctly-across-all-execution-boundari" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does AsyncLocalStorage context propagate correctly across all execution boundaries in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. AsyncLocalStorage context passing can fail when deployed to Cloudflare Workers/Vercel Edge runtime if the call to getStore() is nested within a thenable that isn't a native Promise. Context does not propagate between Middleware, API handlers, and server-rendered pages in Next.js 14.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/52774" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hOEQJ" prefix="r4663" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8492378715228064828"],"question":[0,"Is the DOMException API supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. DOMException is supported in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-domexception-api-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-domexception-api-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-domexception-api-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the DOMException API supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. DOMException is supported in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2k2e9t" prefix="r4664" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8999191118710596252"],"question":[0,"What is the unstable_allowDynamic configuration option used for in Next.js Edge Runtime?"],"answer":[0,"unstable_allowDynamic is a glob or array of globs that relaxes dynamic code evaluation restrictions for specific files. Example: export const config = { unstable_allowDynamic: ['/lib/utilities.js', '**/node_modules/function-bind/**'] }. The globs are relative to your application root folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-unstable-allowdynamic-configuration-option-used-for-in-next-js-edge-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-unstable-allowdynamic-configuration-option-used-for-in-next-js-edge-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-unstable-allowdynamic-configuration-option-used-for-in-next-js-edge-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the unstable_allowDynamic configuration option used for in Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>unstable_allowDynamic is a glob or array of globs that relaxes dynamic code evaluation restrictions for specific files. Example: export const config = { unstable_allowDynamic: ['/lib/utilities.js', '<strong>/node_modules/function-bind/</strong>'] }. The globs are relative to your application root folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14YnBy" prefix="r4665" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9237604014582762306"],"question":[0,"Can you use require() to import modules in the Next.js Edge Runtime?"],"answer":[0,"No. Calling require directly is not allowed in the Edge Runtime. You must use ES Modules instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-to-import-modules-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-to-import-modules-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-to-import-modules-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use require() to import modules in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Calling require directly is not allowed in the Edge Runtime. You must use ES Modules instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Cg2KM" prefix="r4666" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9571535767756438741"],"question":[0,"Are console methods like console.log supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. The Edge Runtime supports standard console methods including console.log(), console.error(), console.warn(), console.info(), and console.debug()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-console-methods-like-console-log-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-console-methods-like-console-log-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-console-methods-like-console-log-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are console methods like console.log supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The Edge Runtime supports standard console methods including console.log(), console.error(), console.warn(), console.info(), and console.debug().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kmibl" prefix="r4667" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9600820716409110644"],"question":[0,"Which Stream APIs are supported in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime supports: ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, and WritableStreamDefaultWriter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-stream-apis-are-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-stream-apis-are-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-stream-apis-are-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Stream APIs are supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports: ReadableStream, ReadableStreamBYOBReader, ReadableStreamDefaultReader, TransformStream, WritableStream, and WritableStreamDefaultWriter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZywglR" prefix="r4668" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9942809226219523130"],"question":[0,"Can node_modules be used in the Next.js Edge Runtime?"],"answer":[0,"Yes, but only if they implement ES Modules and do not use any native Node.js APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-node-modules-be-used-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-node-modules-be-used-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-node-modules-be-used-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can node_modules be used in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but only if they implement ES Modules and do not use any native Node.js APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="58LX4" prefix="r4669" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10390099129628418935"],"question":[0,"Are WebAssembly.compile() and WebAssembly.instantiate() supported in the Next.js Edge Runtime?"],"answer":[0,"No. WebAssembly.compile and WebAssembly.instantiate are blocked in the Edge Runtime. However, you can import WASM with the ?module suffix and use await WebAssembly.instantiate(squareWasm) pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-webassembly-compile-and-webassembly-instantiate-supported-in-the-next-js-edg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-webassembly-compile-and-webassembly-instantiate-supported-in-the-next-js-edg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-webassembly-compile-and-webassembly-instantiate-supported-in-the-next-js-edg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are WebAssembly.compile() and WebAssembly.instantiate() supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. WebAssembly.compile and WebAssembly.instantiate are blocked in the Edge Runtime. However, you can import WASM with the ?module suffix and use await WebAssembly.instantiate(squareWasm) pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="218HbX" prefix="r4670" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10656977803691403054"],"question":[0,"Which SubtleCrypto methods are supported in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime's SubtleCrypto interface supports: encrypt(), decrypt(), sign(), verify(), digest(), generateKey(), deriveBits(), deriveKey(), importKey(), exportKey(), wrapKey(), and unwrapKey()."],"confidence":[0,0.95],"sources":[1,[[0,"https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto"]]],"topic":[0,"nextjs"],"slug":[0,"which-subtlecrypto-methods-are-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-subtlecrypto-methods-are-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-subtlecrypto-methods-are-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which SubtleCrypto methods are supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime's SubtleCrypto interface supports: encrypt(), decrypt(), sign(), verify(), digest(), generateKey(), deriveBits(), deriveKey(), importKey(), exportKey(), wrapKey(), and unwrapKey().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developer.mozilla.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hmF9A" prefix="r4671" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10694395802769497306"],"question":[0,"Which Crypto APIs are supported in the Next.js Edge Runtime?"],"answer":[0,"The Edge Runtime supports: crypto, CryptoKey, and SubtleCrypto."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"which-crypto-apis-are-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-crypto-apis-are-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-crypto-apis-are-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Crypto APIs are supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports: crypto, CryptoKey, and SubtleCrypto.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1OUBcB" prefix="r4672" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11400152785474720394"],"question":[0,"Are timer functions like setTimeout and setInterval supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. The Edge Runtime supports setTimeout, setInterval, clearTimeout, and clearInterval."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-timer-functions-like-settimeout-and-setinterval-supported-in-the-next-js-edg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-timer-functions-like-settimeout-and-setinterval-supported-in-the-next-js-edg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-timer-functions-like-settimeout-and-setinterval-supported-in-the-next-js-edg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are timer functions like setTimeout and setInterval supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The Edge Runtime supports setTimeout, setInterval, clearTimeout, and clearInterval.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kLELy" prefix="r4673" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13696116491601839352"],"question":[0,"Is the Intl object for internationalization supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. The Intl object is supported in the Edge Runtime, including Intl.Collator, Intl.DateTimeFormat, Intl.DisplayNames, Intl.DurationFormat, Intl.ListFormat, Intl.Locale, Intl.NumberFormat, Intl.PluralRules, and Intl.RelativeTimeFormat."],"confidence":[0,0.95],"sources":[1,[[0,"https://edge-runtime.vercel.app/features/available-apis"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-intl-object-for-internationalization-supported-in-the-next-js-edge-runtim"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-intl-object-for-internationalization-supported-in-the-next-js-edge-runtim" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-intl-object-for-internationalization-supported-in-the-next-js-edge-runtim" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the Intl object for internationalization supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The Intl object is supported in the Edge Runtime, including Intl.Collator, Intl.DateTimeFormat, Intl.DisplayNames, Intl.DurationFormat, Intl.ListFormat, Intl.Locale, Intl.NumberFormat, Intl.PluralRules, and Intl.RelativeTimeFormat.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://edge-runtime.vercel.app/features/available-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>edge-runtime.vercel.app</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="133tS9" prefix="r4674" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14150035092063230764"],"question":[0,"Is structuredClone() supported in the Next.js Edge Runtime?"],"answer":[0,"Yes. structuredClone is supported in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-structuredclone-supported-in-the-next-js-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-structuredclone-supported-in-the-next-js-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-structuredclone-supported-in-the-next-js-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is structuredClone() supported in the Next.js Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. structuredClone is supported in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="error-handling-server-side-error-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Error Handling > Server-Side Error Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2mVyLx" prefix="r4675" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"290299728955660600"],"question":[0,"Can redirect() be used in event handlers within Client Components?"],"answer":[0,"No, redirect cannot be used in event handlers within Client Components. Use the useRouter hook instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"can-redirect-be-used-in-event-handlers-within-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-redirect-be-used-in-event-handlers-within-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-redirect-be-used-in-event-handlers-within-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can redirect() be used in event handlers within Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, redirect cannot be used in event handlers within Client Components. Use the useRouter hook instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hzVEM" prefix="r4676" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"379534877650077154"],"question":[0,"How should errors in event handlers be handled in Next.js?"],"answer":[0,"Catch the error manually using try/catch and store it using useState or useReducer, then update the UI to inform the user."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-errors-in-event-handlers-be-handled-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-errors-in-event-handlers-be-handled-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-errors-in-event-handlers-be-handled-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should errors in event handlers be handled in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Catch the error manually using try/catch and store it using useState or useReducer, then update the UI to inform the user.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yXPUg" prefix="r4677" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"638920338724102977"],"question":[0,"What HTML tags must global-error.js define that regular error.js files don't need?"],"answer":[0,"Global error UI must define its own <html> and <body> tags since it replaces the root layout when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-tags-must-global-error-js-define-that-regular-error-js-files-don-t-nee"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-tags-must-global-error-js-define-that-regular-error-js-files-don-t-nee" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-tags-must-global-error-js-define-that-regular-error-js-files-don-t-nee" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML tags must global-error.js define that regular error.js files don't need?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Global error UI must define its own <html> and <body> tags since it replaces the root layout when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CxsVK" prefix="r4678" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2958189847730837150"],"question":[0,"In production, what does error.message contain for errors thrown in Server Components?"],"answer":[0,"A generic message with an identifier. Errors forwarded from Server Components will be stripped of specific error details to avoid leaking sensitive information."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-production-what-does-error-message-contain-for-errors-thrown-in-server-compon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-production-what-does-error-message-contain-for-errors-thrown-in-server-compon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-production-what-does-error-message-contain-for-errors-thrown-in-server-compon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In production, what does error.message contain for errors thrown in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A generic message with an identifier. Errors forwarded from Server Components will be stripped of specific error details to avoid leaking sensitive information.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5m6n" prefix="r4679" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3578073776040521145"],"question":[0,"How should expected errors like form validation failures be handled in Server Actions?"],"answer":[0,"Expected errors should be modeled as return values, not thrown. Use the useActionState hook with Server Functions to handle these gracefully."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-expected-errors-like-form-validation-failures-be-handled-in-server-ac"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-expected-errors-like-form-validation-failures-be-handled-in-server-ac" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-expected-errors-like-form-validation-failures-be-handled-in-server-ac" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should expected errors like form validation failures be handled in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Expected errors should be modeled as return values, not thrown. Use the useActionState hook with Server Functions to handle these gracefully.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nfhK1" prefix="r4680" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3892651210037562355"],"question":[0,"Which takes precedence: notFound() or error.tsx?"],"answer":[0,"notFound will take precedence over error.tsx, so you can use it when you want to handle more specific errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"which-takes-precedence-notfound-or-error-tsx"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-takes-precedence-notfound-or-error-tsx" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-takes-precedence-notfound-or-error-tsx" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which takes precedence: notFound() or error.tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>notFound will take precedence over error.tsx, so you can use it when you want to handle more specific errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UaJRV" prefix="r4681" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4063414334176959133"],"question":[0,"Do errors inside startTransition bubble to error boundaries?"],"answer":[0,"Yes, unhandled errors inside startTransition from useTransition will bubble up to the nearest error boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-errors-inside-starttransition-bubble-to-error-boundaries"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-errors-inside-starttransition-bubble-to-error-boundaries" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-errors-inside-starttransition-bubble-to-error-boundaries" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do errors inside startTransition bubble to error boundaries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, unhandled errors inside startTransition from useTransition will bubble up to the nearest error boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z12dKQg" prefix="r4682" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4435323320409418866"],"question":[0,"What file should be used to catch errors in the root app/layout.js file?"],"answer":[0,"global-error.js located in the root app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-should-be-used-to-catch-errors-in-the-root-app-layout-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-should-be-used-to-catch-errors-in-the-root-app-layout-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-should-be-used-to-catch-errors-in-the-root-app-layout-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file should be used to catch errors in the root app/layout.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js located in the root app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1q2FlV" prefix="r4683" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4443991866923132917"],"question":[0,"What is the exact TypeScript type signature for the error prop in error.js?"],"answer":[0,"Error & { digest?: string }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-typescript-type-signature-for-the-error-prop-in-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-typescript-type-signature-for-the-error-prop-in-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-typescript-type-signature-for-the-error-prop-in-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact TypeScript type signature for the error prop in error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error & { digest?: string }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XCBPQ" prefix="r4684" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4458846060059453542"],"question":[0,"Are metadata or generateMetadata exports supported in global-error.js?"],"answer":[0,"No, error boundaries must be Client Components, which means that metadata and generateMetadata exports are not supported in global-error.jsx."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"are-metadata-or-generatemetadata-exports-supported-in-global-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-metadata-or-generatemetadata-exports-supported-in-global-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-metadata-or-generatemetadata-exports-supported-in-global-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are metadata or generateMetadata exports supported in global-error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, error boundaries must be Client Components, which means that metadata and generateMetadata exports are not supported in global-error.jsx.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ymkl" prefix="r4685" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5056555356339355336"],"question":[0,"Where should redirect() be called when using try/catch blocks?"],"answer":[0,"redirect should be called outside of the try/catch block. This is because redirect works by throwing an error, which would be caught by the catch block."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-redirect-be-called-when-using-try-catch-blocks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-redirect-be-called-when-using-try-catch-blocks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-redirect-be-called-when-using-try-catch-blocks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should redirect() be called when using try/catch blocks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect should be called outside of the try/catch block. This is because redirect works by throwing an error, which would be caught by the catch block.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3rQdR" prefix="r4686" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5174779352089293520"],"question":[0,"In development, how is the Error object serialized when forwarded to the client?"],"answer":[0,"During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-development-how-is-the-error-object-serialized-when-forwarded-to-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-development-how-is-the-error-object-serialized-when-forwarded-to-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-development-how-is-the-error-object-serialized-when-forwarded-to-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In development, how is the Error object serialized when forwarded to the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lWrRT" prefix="r4687" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5442354486898943464"],"question":[0,"How do errors propagate between error boundaries in Next.js?"],"answer":[0,"Errors bubble up to the nearest parent error boundary. An error.js file catches issues from all nested child segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-errors-propagate-between-error-boundaries-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-errors-propagate-between-error-boundaries-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-errors-propagate-between-error-boundaries-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do errors propagate between error boundaries in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Errors bubble up to the nearest parent error boundary. An error.js file catches issues from all nested child segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6UPir" prefix="r4688" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5727795050460700760"],"question":[0,"What meta tag does notFound() automatically inject?"],"answer":[0,"<meta name=\"robots\" content=\"noindex\" /> tag to prevent search engine indexing of 404 pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-meta-tag-does-notfound-automatically-inject"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-meta-tag-does-notfound-automatically-inject" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-meta-tag-does-notfound-automatically-inject" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What meta tag does notFound() automatically inject?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><meta name="robots" content="noindex" /> tag to prevent search engine indexing of 404 pages.</div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1s2G64" prefix="r4689" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5789221364173861827"],"question":[0,"What is the exact function signature for the reset prop in error.js?"],"answer":[0,"() => void"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-function-signature-for-the-reset-prop-in-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-function-signature-for-the-reset-prop-in-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-function-signature-for-the-reset-prop-in-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact function signature for the reset prop in error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>() => void</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EsIXB" prefix="r4690" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7199540969970752961"],"question":[0,"Does calling redirect() or notFound() require a return statement?"],"answer":[0,"No, neither requires you to use return redirect() or return notFound() due to using the TypeScript never type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"does-calling-redirect-or-notfound-require-a-return-statement"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-calling-redirect-or-notfound-require-a-return-statement" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-calling-redirect-or-notfound-require-a-return-statement" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does calling redirect() or notFound() require a return statement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, neither requires you to use return redirect() or return notFound() due to using the TypeScript never type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPMdUO" prefix="r4691" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8200997552501147864"],"question":[0,"What is the purpose of the error.digest property?"],"answer":[0,"An automatically generated hash of the error that can be used to match the corresponding error in server-side logs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-error-digest-property"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-error-digest-property" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-error-digest-property" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the error.digest property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An automatically generated hash of the error that can be used to match the corresponding error in server-side logs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mS37h" prefix="r4692" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8652408849563040728"],"question":[0,"What directive must be included at the top of an error.js file?"],"answer":[0,"Error boundaries must include 'use client' directive since error boundaries must be Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-must-be-included-at-the-top-of-an-error-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-must-be-included-at-the-top-of-an-error-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-must-be-included-at-the-top-of-an-error-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive must be included at the top of an error.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error boundaries must include 'use client' directive since error boundaries must be Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EGng1" prefix="r4693" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9984687259635370045"],"question":[0,"When the fallback error component is active in error.js, do layouts above the error boundary maintain their state?"],"answer":[0,"Yes, when the fallback error component is active, layouts above the error boundary maintain their state and remain interactive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"when-the-fallback-error-component-is-active-in-error-js-do-layouts-above-the-err"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-the-fallback-error-component-is-active-in-error-js-do-layouts-above-the-err" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-the-fallback-error-component-is-active-in-error-js-do-layouts-above-the-err" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When the fallback error component is active in error.js, do layouts above the error boundary maintain their state?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, when the fallback error component is active, layouts above the error boundary maintain their state and remain interactive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQODv5" prefix="r4694" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10214959342322489517"],"question":[0,"What HTTP status code does Next.js return for streamed responses when using not-found.tsx?"],"answer":[0,"200 HTTP status code for streamed responses, and 404 for non-streamed responses."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-return-for-streamed-responses-when-using-not-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-return-for-streamed-responses-when-using-not-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-return-for-streamed-responses-when-using-not-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js return for streamed responses when using not-found.tsx?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>200 HTTP status code for streamed responses, and 404 for non-streamed responses.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11S83O" prefix="r4695" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10588854022666074851"],"question":[0,"Can error boundaries catch errors inside event handlers?"],"answer":[0,"No, error boundaries don't catch errors inside event handlers. They're designed to catch errors during rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"can-error-boundaries-catch-errors-inside-event-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-error-boundaries-catch-errors-inside-event-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-error-boundaries-catch-errors-inside-event-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can error boundaries catch errors inside event handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, error boundaries don't catch errors inside event handlers. They're designed to catch errors during rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="10FSKx" prefix="r4696" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11376043103480885695"],"question":[0,"What error type does redirect() throw?"],"answer":[0,"NEXT_REDIRECT error that terminates rendering of the route segment in which it was thrown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-type-does-redirect-throw"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-type-does-redirect-throw" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-type-does-redirect-throw" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error type does redirect() throw?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_REDIRECT error that terminates rendering of the route segment in which it was thrown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZvkfJN" prefix="r4697" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12030914061671839397"],"question":[0,"What error type does notFound() throw?"],"answer":[0,"NEXT_HTTP_ERROR_FALLBACK;404 error that terminates rendering of the route segment in which it was thrown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-type-does-notfound-throw"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-type-does-notfound-throw" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-type-does-notfound-throw" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error type does notFound() throw?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_HTTP_ERROR_FALLBACK;404 error that terminates rendering of the route segment in which it was thrown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2saKfB" prefix="r4698" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13252049257072976544"],"question":[0,"What does the reset() function do in error.js?"],"answer":[0,"It will try to re-render the Error boundary's contents. If successful, the fallback error component is replaced with the result of the re-render."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-reset-function-do-in-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-reset-function-do-in-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-reset-function-do-in-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the reset() function do in error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It will try to re-render the Error boundary's contents. If successful, the fallback error component is replaced with the result of the re-render.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="105TBV" prefix="r4699" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14892481243489014068"],"question":[0,"In production, what does error.message contain for errors thrown in Client Components?"],"answer":[0,"Errors forwarded from Client Components show the original Error message."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"in-production-what-does-error-message-contain-for-errors-thrown-in-client-compon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-production-what-does-error-message-contain-for-errors-thrown-in-client-compon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-production-what-does-error-message-contain-for-errors-thrown-in-client-compon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In production, what does error.message contain for errors thrown in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Errors forwarded from Client Components show the original Error message.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-third-party-integration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Third-Party Integration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z23Sscj" prefix="r4700" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"461791985634349600"],"question":[0,"Why might some bundlers strip out the 'use client' directive, and where can library authors find configuration examples to prevent this?"],"answer":[0,"Some bundlers might strip out 'use client' directives during the build process. Configuration examples for esbuild to preserve the directive can be found in the React Wrap Balancer and Vercel Analytics repositories."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"why-might-some-bundlers-strip-out-the-use-client-directive-and-where-can-library"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-might-some-bundlers-strip-out-the-use-client-directive-and-where-can-library" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-might-some-bundlers-strip-out-the-use-client-directive-and-where-can-library" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why might some bundlers strip out the 'use client' directive, and where can library authors find configuration examples to prevent this?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some bundlers might strip out 'use client' directives during the build process. Configuration examples for esbuild to preserve the directive can be found in the React Wrap Balancer and Vercel Analytics repositories.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kmYdm" prefix="r4701" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"770703571059276971"],"question":[0,"What is the syntax for configuring serverExternalPackages in next.config.js?"],"answer":[0,"const nextConfig = {\n serverExternalPackages: ['@acme/ui'],\n}\nmodule.exports = nextConfig"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-configuring-serverexternalpackages-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-configuring-serverexternalpackages-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-configuring-serverexternalpackages-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for configuring serverExternalPackages in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>const nextConfig = {<br> serverExternalPackages: ['@acme/ui'],<br>}<br>module.exports = nextConfig</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QiVyk" prefix="r4702" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1002463132920887709"],"question":[0,"Does the 'use client' directive need to be defined in every file that uses client features?"],"answer":[0,"No - the 'use client' directive does not need to be defined in every file. The Client module boundary only needs to be defined once, at the 'entry point', for all modules imported into it to be considered a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-use-client-directive-need-to-be-defined-in-every-file-that-uses-client-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-use-client-directive-need-to-be-defined-in-every-file-that-uses-client-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-use-client-directive-need-to-be-defined-in-every-file-that-uses-client-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the 'use client' directive need to be defined in every file that uses client features?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No - the 'use client' directive does not need to be defined in every file. The Client module boundary only needs to be defined once, at the 'entry point', for all modules imported into it to be considered a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tgsqw" prefix="r4703" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1683453300449735165"],"question":[0,"What components are available from @next/third-parties/google?"],"answer":[0,"GoogleTagManager, GoogleAnalytics, GoogleMapsEmbed, and YouTubeEmbed"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-components-are-available-from-next-third-parties-google"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-components-are-available-from-next-third-parties-google" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-components-are-available-from-next-third-parties-google" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What components are available from @next/third-parties/google?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>GoogleTagManager, GoogleAnalytics, GoogleMapsEmbed, and YouTubeEmbed</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="69sDe" prefix="r4704" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2086338857937955297"],"question":[0,"Which database client packages are automatically included in Next.js's default serverExternalPackages list?"],"answer":[0,"@prisma/client, mongodb, mongoose, pg, and sqlite3"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-database-client-packages-are-automatically-included-in-next-js-s-default-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-database-client-packages-are-automatically-included-in-next-js-s-default-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-database-client-packages-are-automatically-included-in-next-js-s-default-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which database client packages are automatically included in Next.js's default serverExternalPackages list?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@prisma/client, mongodb, mongoose, pg, and sqlite3</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mDKjo" prefix="r4705" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2216220237392121122"],"question":[0,"Where should the GoogleTagManager component be placed for it to work with sendGTMEvent?"],"answer":[0,"The <GoogleTagManager /> component must be included in either a parent layout, page, or component, or directly in the same file where sendGTMEvent is used."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-googletagmanager-component-be-placed-for-it-to-work-with-sendgt"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-googletagmanager-component-be-placed-for-it-to-work-with-sendgt" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-googletagmanager-component-be-placed-for-it-to-work-with-sendgt" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the GoogleTagManager component be placed for it to work with sendGTMEvent?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <GoogleTagManager /> component must be included in either a parent layout, page, or component, or directly in the same file where sendGTMEvent is used.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z20aAjB" prefix="r4706" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4627150345880824472"],"question":[0,"What should you do if Google Tag Manager is already included in your application and you want to add Google Analytics?"],"answer":[0,"You can configure Google Analytics directly using Google Tag Manager, rather than including Google Analytics as a separate component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-do-if-google-tag-manager-is-already-included-in-your-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-do-if-google-tag-manager-is-already-included-in-your-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-do-if-google-tag-manager-is-already-included-in-your-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you do if Google Tag Manager is already included in your application and you want to add Google Analytics?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can configure Google Analytics directly using Google Tag Manager, rather than including Google Analytics as a separate component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xh3CJ" prefix="r4707" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5825413771868604199"],"question":[0,"According to Next.js documentation, which type of third-party components is the main exception that typically needs wrapping in 'use client'?"],"answer":[0,"Providers (context providers) - the documentation states 'We don't expect you to need to wrap most third-party components since it's likely you'll be using them within Client Components. However, one exception is providers, since they rely on React state and context, and are typically needed at the root of an application.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"according-to-next-js-documentation-which-type-of-third-party-components-is-the-m"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="according-to-next-js-documentation-which-type-of-third-party-components-is-the-m" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#according-to-next-js-documentation-which-type-of-third-party-components-is-the-m" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">According to Next.js documentation, which type of third-party components is the main exception that typically needs wrapping in 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Providers (context providers) - the documentation states 'We don't expect you to need to wrap most third-party components since it's likely you'll be using them within Client Components. However, one exception is providers, since they rely on React state and context, and are typically needed at the root of an application.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1H7YPp" prefix="r4708" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6184034076211083622"],"question":[0,"What should component library authors do to make their components compatible with Next.js Server Components?"],"answer":[0,"Add the 'use client' directive to entry points that rely on client-only features, enabling users to import components into Server Components without needing to create wrappers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-component-library-authors-do-to-make-their-components-compatible-wit"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-component-library-authors-do-to-make-their-components-compatible-wit" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-component-library-authors-do-to-make-their-components-compatible-wit" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should component library authors do to make their components compatible with Next.js Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add the 'use client' directive to entry points that rely on client-only features, enabling users to import components into Server Components without needing to create wrappers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nSfW2" prefix="r4709" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6336814970555457672"],"question":[0,"What is the current stability status of the @next/third-parties package?"],"answer":[0,"It is currently an experimental library under active development."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-current-stability-status-of-the-next-third-parties-package"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-current-stability-status-of-the-next-third-parties-package" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-current-stability-status-of-the-next-third-parties-package" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the current stability status of the @next/third-parties package?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is currently an experimental library under active development.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hfypG" prefix="r4710" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7010100046007825537"],"question":[0,"Which AWS SDK packages are automatically excluded from bundling in Next.js Server Components by default?"],"answer":[0,"@aws-sdk/client-s3 and aws-crt"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-aws-sdk-packages-are-automatically-excluded-from-bundling-in-next-js-serve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-aws-sdk-packages-are-automatically-excluded-from-bundling-in-next-js-serve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-aws-sdk-packages-are-automatically-excluded-from-bundling-in-next-js-serve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which AWS SDK packages are automatically excluded from bundling in Next.js Server Components by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@aws-sdk/client-s3 and aws-crt</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24WBnq" prefix="r4711" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7375384350371819114"],"question":[0,"What approximate performance improvement does lite-youtube-embed (used by YouTubeEmbed) provide over standard YouTube embeds?"],"answer":[0,"The lite-youtube custom element renders approximately 224× faster than the standard YouTube embed."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/@next/third-parties"]]],"topic":[0,"nextjs"],"slug":[0,"what-approximate-performance-improvement-does-lite-youtube-embed-used-by-youtube"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-approximate-performance-improvement-does-lite-youtube-embed-used-by-youtube" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-approximate-performance-improvement-does-lite-youtube-embed-used-by-youtube" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What approximate performance improvement does lite-youtube-embed (used by YouTubeEmbed) provide over standard YouTube embeds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The lite-youtube custom element renders approximately 224× faster than the standard YouTube embed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/@next/third-parties" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XtixA" prefix="r4712" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7744863212062313760"],"question":[0,"What error message does Next.js show when using 'export *' syntax in a file with the 'use client' directive in a third-party library?"],"answer":[0,"\"It's currently unsupported to use 'export *' in a client boundary. Please use named exports instead.\""],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/49324"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-message-does-next-js-show-when-using-export-syntax-in-a-file-with-the"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-message-does-next-js-show-when-using-export-syntax-in-a-file-with-the" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-message-does-next-js-show-when-using-export-syntax-in-a-file-with-the" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error message does Next.js show when using 'export *' syntax in a file with the 'use client' directive in a third-party library?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"It's currently unsupported to use 'export *' in a client boundary. Please use named exports instead."</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/49324" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ko3J1" prefix="r4713" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7771604980329800283"],"question":[0,"What directive must be added to wrap a third-party component that uses client-only features like useState but lacks the 'use client' directive?"],"answer":[0,"You must create a wrapper file with 'use client' at the top that imports and re-exports the third-party component. For example: 'use client'\nimport { Carousel } from 'acme-carousel'\nexport default Carousel"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-must-be-added-to-wrap-a-third-party-component-that-uses-client-on"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-must-be-added-to-wrap-a-third-party-component-that-uses-client-on" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-must-be-added-to-wrap-a-third-party-component-that-uses-client-on" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive must be added to wrap a third-party component that uses client-only features like useState but lacks the 'use client' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must create a wrapper file with 'use client' at the top that imports and re-exports the third-party component. For example: 'use client'<br>import { Carousel } from 'acme-carousel'<br>export default Carousel</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1T3xO2" prefix="r4714" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7918415279020768333"],"question":[0,"What is the exact import statement for sendGTMEvent from @next/third-parties?"],"answer":[0,"import { sendGTMEvent } from '@next/third-parties/google'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-import-statement-for-sendgtmevent-from-next-third-parties"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-import-statement-for-sendgtmevent-from-next-third-parties" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-import-statement-for-sendgtmevent-from-next-third-parties" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact import statement for sendGTMEvent from @next/third-parties?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import { sendGTMEvent } from '@next/third-parties/google'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="128GDQ" prefix="r4715" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8025440920105429284"],"question":[0,"What underlying library does the YouTubeEmbed component from @next/third-parties use for performance optimization?"],"answer":[0,"lite-youtube-embed"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-underlying-library-does-the-youtubeembed-component-from-next-third-parties-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-underlying-library-does-the-youtubeembed-component-from-next-third-parties-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-underlying-library-does-the-youtubeembed-component-from-next-third-parties-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What underlying library does the YouTubeEmbed component from @next/third-parties use for performance optimization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>lite-youtube-embed</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21SsL7" prefix="r4716" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8189380155047735409"],"question":[0,"Which development tools are included in Next.js's default serverExternalPackages list?"],"answer":[0,"typescript, webpack, eslint, and playwright"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-development-tools-are-included-in-next-js-s-default-serverexternalpackages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-development-tools-are-included-in-next-js-s-default-serverexternalpackages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-development-tools-are-included-in-next-js-s-default-serverexternalpackages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which development tools are included in Next.js's default serverExternalPackages list?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>typescript, webpack, eslint, and playwright</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1nLK9z" prefix="r4717" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8624334402878013578"],"question":[0,"What is the recommended practice regarding how deep in the component tree providers should be rendered in Next.js?"],"answer":[0,"You should render providers as deep as possible in the tree (not at the <html> document level), as this makes it easier for Next.js to optimize the static parts of your Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-practice-regarding-how-deep-in-the-component-tree-provid"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-practice-regarding-how-deep-in-the-component-tree-provid" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-practice-regarding-how-deep-in-the-component-tree-provid" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended practice regarding how deep in the component tree providers should be rendered in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should render providers as deep as possible in the tree (not at the <html> document level), as this makes it easier for Next.js to optimize the static parts of your Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HQqT1" prefix="r4718" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9481242332989226311"],"question":[0,"What is the purpose of the serverExternalPackages configuration in Next.js?"],"answer":[0,"It allows developers to exclude specific dependencies from Next.js's automatic bundling process in Server Components and Route Handlers, enabling the use of native Node.js require for packages that use Node.js specific features."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-serverexternalpackages-configuration-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-serverexternalpackages-configuration-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-serverexternalpackages-configuration-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the serverExternalPackages configuration in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It allows developers to exclude specific dependencies from Next.js's automatic bundling process in Server Components and Route Handlers, enabling the use of native Node.js require for packages that use Node.js specific features.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pzbs0" prefix="r4719" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9624749623785976110"],"question":[0,"What is the exact import statement for the GoogleAnalytics component from @next/third-parties?"],"answer":[0,"import { GoogleAnalytics } from '@next/third-parties/google'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-import-statement-for-the-googleanalytics-component-from-next-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-import-statement-for-the-googleanalytics-component-from-next-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-import-statement-for-the-googleanalytics-component-from-next-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact import statement for the GoogleAnalytics component from @next/third-parties?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import { GoogleAnalytics } from '@next/third-parties/google'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2188NT" prefix="r4720" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11840614536435689978"],"question":[0,"In which Next.js version did serverExternalPackages become stable and get renamed from serverComponentsExternalPackages?"],"answer":[0,"Version 15.0.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-serverexternalpackages-become-stable-and-get-rename"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-serverexternalpackages-become-stable-and-get-rename" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-serverexternalpackages-become-stable-and-get-rename" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did serverExternalPackages become stable and get renamed from serverComponentsExternalPackages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Version 15.0.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSSmqD" prefix="r4721" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11927510914638819095"],"question":[0,"What default loading behavior does GoogleMapsEmbed from @next/third-parties have?"],"answer":[0,"By default, it uses the loading attribute to lazy-load the embed below the fold."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-default-loading-behavior-does-googlemapsembed-from-next-third-parties-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-default-loading-behavior-does-googlemapsembed-from-next-third-parties-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-default-loading-behavior-does-googlemapsembed-from-next-third-parties-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What default loading behavior does GoogleMapsEmbed from @next/third-parties have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, it uses the loading attribute to lazy-load the embed below the fold.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2idvtU" prefix="r4722" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12533957920786202457"],"question":[0,"What is the configuration option name for excluding packages from Server Components bundling in Next.js 15?"],"answer":[0,"serverExternalPackages (it was renamed from experimental.serverComponentsExternalPackages)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-configuration-option-name-for-excluding-packages-from-server-compone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-configuration-option-name-for-excluding-packages-from-server-compone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-configuration-option-name-for-excluding-packages-from-server-compone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the configuration option name for excluding packages from Server Components bundling in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>serverExternalPackages (it was renamed from experimental.serverComponentsExternalPackages)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CRe0r" prefix="r4723" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14159233330759944023"],"question":[0,"What is the package name for Next.js's official third-party integration library?"],"answer":[0,"@next/third-parties"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/third-party-libraries"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-package-name-for-next-js-s-official-third-party-integration-library"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-package-name-for-next-js-s-official-third-party-integration-library" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-package-name-for-next-js-s-official-third-party-integration-library" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the package name for Next.js's official third-party integration library?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@next/third-parties</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/third-party-libraries" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11BxzV" prefix="r4724" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14810518117881161045"],"question":[0,"Which machine learning frameworks are in Next.js's default serverExternalPackages list?"],"answer":[0,"@xenova/transformers and @huggingface/transformers"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages"]]],"topic":[0,"nextjs"],"slug":[0,"which-machine-learning-frameworks-are-in-next-js-s-default-serverexternalpackage"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-machine-learning-frameworks-are-in-next-js-s-default-serverexternalpackage" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-machine-learning-frameworks-are-in-next-js-s-default-serverexternalpackage" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which machine learning frameworks are in Next.js's default serverExternalPackages list?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@xenova/transformers and @huggingface/transformers</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverExternalPackages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="linking-and-navigating-navigation-behavior-control" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Linking and Navigating > Navigation Behavior Control</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 25 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1gwgUL" prefix="r4725" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1482402643309726703"],"question":[0,"What is the default value of the `replace` prop on the Next.js Link component?"],"answer":[0,"false - By default, Link pushes a new URL into the browser's history stack instead of replacing the current history state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-replace-prop-on-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-replace-prop-on-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-replace-prop-on-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `replace` prop on the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - By default, Link pushes a new URL into the browser's history stack instead of replacing the current history state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1iVJ1o" prefix="r4726" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1518207970075990065"],"question":[0,"In which Next.js version was the `onNavigate` prop introduced for the Link component?"],"answer":[0,"v15.3.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-onnavigate-prop-introduced-for-the-link-compone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-onnavigate-prop-introduced-for-the-link-compone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-onnavigate-prop-introduced-for-the-link-compone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the `onNavigate` prop introduced for the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v15.3.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEow7A" prefix="r4727" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1976983877876018344"],"question":[0,"In which Next.js version was the experimental staleTimes feature introduced?"],"answer":[0,"v14.2.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-experimental-staletimes-feature-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-experimental-staletimes-feature-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-experimental-staletimes-feature-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the experimental staleTimes feature introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v14.2.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zyerz" prefix="r4728" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2282061160127143056"],"question":[0,"What is the default value of the `dynamic` property in the experimental staleTimes configuration in Next.js 15.0.0+?"],"answer":[0,"0 seconds (not cached)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamic-property-in-the-experimental-staletimes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamic-property-in-the-experimental-staletimes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamic-property-in-the-experimental-staletimes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `dynamic` property in the experimental staleTimes configuration in Next.js 15.0.0+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>0 seconds (not cached)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2n0MFb" prefix="r4729" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2898051022219635423"],"question":[0,"What is the default cache duration for static routes with default prefetching in the App Router?"],"answer":[0,"5 minutes (300 seconds)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-duration-for-static-routes-with-default-prefetching-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-duration-for-static-routes-with-default-prefetching-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-duration-for-static-routes-with-default-prefetching-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default cache duration for static routes with default prefetching in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes (300 seconds)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ppYq" prefix="r4730" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3981442043899034066"],"question":[0,"What happens when `prefetch={false}` is set on a Link component in the Pages Router?"],"answer":[0,"Prefetching will not happen when entering the viewport, but will happen on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-prefetch-false-is-set-on-a-link-component-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-prefetch-false-is-set-on-a-link-component-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-prefetch-false-is-set-on-a-link-component-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when `prefetch={false}` is set on a Link component in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching will not happen when entering the viewport, but will happen on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1L4zs5" prefix="r4731" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4424770127685928133"],"question":[0,"What is the default value of the `prefetch` prop on the Next.js Pages Router Link component?"],"answer":[0,"true (enabled in production only) - The full route and its data will be prefetched."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-pages-router-link-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-pages-router-link-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-pages-router-link-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `prefetch` prop on the Next.js Pages Router Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true (enabled in production only) - The full route and its data will be prefetched.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhwsNK" prefix="r4732" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5089076350231573347"],"question":[0,"What is the default value of the `scroll` parameter for router.push() in the App Router?"],"answer":[0,"true - By default, router.push() scrolls to the top of the page after navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-scroll-parameter-for-router-push-in-the-app-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-scroll-parameter-for-router-push-in-the-app-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-scroll-parameter-for-router-push-in-the-app-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `scroll` parameter for router.push() in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true - By default, router.push() scrolls to the top of the page after navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1o4vtV" prefix="r4733" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5129447620588037531"],"question":[0,"What is the critical limitation of shallow routing in the Pages Router?"],"answer":[0,"Shallow routing only works for URL changes in the current page. If you navigate to a different page, it will unload the current page, load the new one, and wait for data fetching even though you asked to do shallow routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-critical-limitation-of-shallow-routing-in-the-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-critical-limitation-of-shallow-routing-in-the-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-critical-limitation-of-shallow-routing-in-the-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the critical limitation of shallow routing in the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Shallow routing only works for URL changes in the current page. If you navigate to a different page, it will unload the current page, load the new one, and wait for data fetching even though you asked to do shallow routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8Pibm" prefix="r4734" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5337764823754669546"],"question":[0,"Can you pass JavaScript protocol URLs to router.push or router.replace methods?"],"answer":[0,"No - You should not pass untrusted URLs to push or replace methods, as this can open your site to cross-site scripting (XSS) vulnerabilities. JavaScript protocol URLs will execute within page context."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-javascript-protocol-urls-to-router-push-or-router-replace-methods"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-javascript-protocol-urls-to-router-push-or-router-replace-methods" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-javascript-protocol-urls-to-router-push-or-router-replace-methods" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass JavaScript protocol URLs to router.push or router.replace methods?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No - You should not pass untrusted URLs to push or replace methods, as this can open your site to cross-site scripting (XSS) vulnerabilities. JavaScript protocol URLs will execute within page context.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sUJyE" prefix="r4735" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5562043944945235526"],"question":[0,"When does the `onNavigate` event handler fire compared to `onClick` on a Link component?"],"answer":[0,"onNavigate fires only during client-side navigation, while onClick fires for all clicks. onNavigate does not execute for modifier key clicks (Ctrl/Cmd + Click) or external URLs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-onnavigate-event-handler-fire-compared-to-onclick-on-a-link-compon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-onnavigate-event-handler-fire-compared-to-onclick-on-a-link-compon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-onnavigate-event-handler-fire-compared-to-onclick-on-a-link-compon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the `onNavigate` event handler fire compared to `onClick` on a Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onNavigate fires only during client-side navigation, while onClick fires for all clicks. onNavigate does not execute for modifier key clicks (Ctrl/Cmd + Click) or external URLs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1uOJow" prefix="r4736" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6038129570738585268"],"question":[0,"What is the default value of the `shallow` prop on the Next.js Pages Router Link component?"],"answer":[0,"false - By default, shallow routing is not enabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-shallow-prop-on-the-next-js-pages-router-link-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-shallow-prop-on-the-next-js-pages-router-link-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-shallow-prop-on-the-next-js-pages-router-link-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `shallow` prop on the Next.js Pages Router Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false - By default, shallow routing is not enabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5j9oM" prefix="r4737" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6511811391648048468"],"question":[0,"Does the App Router perform partial rendering during soft navigation?"],"answer":[0,"Yes - only the route segments that have changed are re-rendered on the client, and any shared segments are preserved. This enables client React state to be preserved during navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-app-router-perform-partial-rendering-during-soft-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-app-router-perform-partial-rendering-during-soft-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-app-router-perform-partial-rendering-during-soft-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the App Router perform partial rendering during soft navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes - only the route segments that have changed are re-rendered on the client, and any shared segments are preserved. This enables client React state to be preserved during navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2g1GF1" prefix="r4738" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8272907566159787361"],"question":[0,"What is the default value of the `prefetch` prop on the Next.js App Router Link component?"],"answer":[0,"\"auto\" or null - The prefetch behavior depends on whether the route is static or dynamic."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-app-router-link-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-app-router-link-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-prefetch-prop-on-the-next-js-app-router-link-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `prefetch` prop on the Next.js App Router Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"auto" or null - The prefetch behavior depends on whether the route is static or dynamic.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Wcuko" prefix="r4739" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9857787422446488519"],"question":[0,"What happens when `prefetch={true}` is set on a Link component in the App Router?"],"answer":[0,"The full route will be prefetched for both static and dynamic routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-prefetch-true-is-set-on-a-link-component-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-prefetch-true-is-set-on-a-link-component-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-prefetch-true-is-set-on-a-link-component-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when `prefetch={true}` is set on a Link component in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The full route will be prefetched for both static and dynamic routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QXpit" prefix="r4740" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9937869121078875034"],"question":[0,"What is the default value of the `scroll` prop on the Next.js Pages Router Link component?"],"answer":[0,"true - Next.js maintains scroll position on navigation, keeping the view where it was unless the Page exits the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-scroll-prop-on-the-next-js-pages-router-link-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-scroll-prop-on-the-next-js-pages-router-link-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-scroll-prop-on-the-next-js-pages-router-link-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `scroll` prop on the Next.js Pages Router Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true - Next.js maintains scroll position on navigation, keeping the view where it was unless the Page exits the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OsJNQ" prefix="r4741" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10076267272125246609"],"question":[0,"When `prefetch` is set to \"auto\" or null for a static route in the App Router, what gets prefetched?"],"answer":[0,"The entire route is prefetched, including all its data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-prefetch-is-set-to-auto-or-null-for-a-static-route-in-the-app-router-what-g"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-prefetch-is-set-to-auto-or-null-for-a-static-route-in-the-app-router-what-g" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-prefetch-is-set-to-auto-or-null-for-a-static-route-in-the-app-router-what-g" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When `prefetch` is set to "auto" or null for a static route in the App Router, what gets prefetched?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The entire route is prefetched, including all its data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2o09Y2" prefix="r4742" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10314824204408941276"],"question":[0,"When does prefetching occur for Link components in the App Router?"],"answer":[0,"When a Link component enters the user's viewport (initially or through scroll). Prefetching is only enabled in production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-prefetching-occur-for-link-components-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-prefetching-occur-for-link-components-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-prefetching-occur-for-link-components-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does prefetching occur for Link components in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a Link component enters the user's viewport (initially or through scroll). Prefetching is only enabled in production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="XM6br" prefix="r4743" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10742805207279204655"],"question":[0,"What is the default value of the `static` property in the experimental staleTimes configuration?"],"answer":[0,"5 minutes (300 seconds)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-static-property-in-the-experimental-staletimes-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-static-property-in-the-experimental-staletimes-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-static-property-in-the-experimental-staletimes-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the `static` property in the experimental staleTimes configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes (300 seconds)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gimhL" prefix="r4744" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10980834254301962861"],"question":[0,"What was the default value of the `dynamic` property in staleTimes before Next.js v15.0.0?"],"answer":[0,"30 seconds"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-default-value-of-the-dynamic-property-in-staletimes-before-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-default-value-of-the-dynamic-property-in-staletimes-before-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-default-value-of-the-dynamic-property-in-staletimes-before-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the default value of the `dynamic` property in staleTimes before Next.js v15.0.0?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>30 seconds</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/staleTimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Rb5pB" prefix="r4745" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11172062369979598048"],"question":[0,"When does the router cache get cleared in the App Router?"],"answer":[0,"The cache persists across navigation during a session, but is cleared on page refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-router-cache-get-cleared-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-router-cache-get-cleared-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-router-cache-get-cleared-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the router cache get cleared in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cache persists across navigation during a session, but is cleared on page refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kb0z" prefix="r4746" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11432996808218449705"],"question":[0,"What optional callback does router.prefetch() accept in the App Router?"],"answer":[0,"An optional onInvalidate callback that fires when prefetched data becomes outdated. The callback triggers at most once per prefetch request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-optional-callback-does-router-prefetch-accept-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-optional-callback-does-router-prefetch-accept-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-optional-callback-does-router-prefetch-accept-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What optional callback does router.prefetch() accept in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An optional onInvalidate callback that fires when prefetched data becomes outdated. The callback triggers at most once per prefetch request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVv7x3" prefix="r4747" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12166375606368327726"],"question":[0,"What is the cache duration when using full prefetching (prefetch={true} or router.prefetch)?"],"answer":[0,"5 minutes for both static and dynamic pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-cache-duration-when-using-full-prefetching-prefetch-true-or-router-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-cache-duration-when-using-full-prefetching-prefetch-true-or-router-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-cache-duration-when-using-full-prefetching-prefetch-true-or-router-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the cache duration when using full prefetching (prefetch={true} or router.prefetch)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5 minutes for both static and dynamic pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zsvw4m" prefix="r4748" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13128703691711052250"],"question":[0,"What happens when `prefetch={false}` is set on a Link component in the App Router?"],"answer":[0,"Prefetching will never happen both on entering the viewport and on hover."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-prefetch-false-is-set-on-a-link-component-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-prefetch-false-is-set-on-a-link-component-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-prefetch-false-is-set-on-a-link-component-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when `prefetch={false}` is set on a Link component in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Prefetching will never happen both on entering the viewport and on hover.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Gier8" prefix="r4749" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14480953759254339799"],"question":[0,"What client-side state does router.refresh() preserve in the App Router?"],"answer":[0,"router.refresh() preserves unaffected client-side React state (e.g., useState) and browser state (e.g., scroll position)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-client-side-state-does-router-refresh-preserve-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-client-side-state-does-router-refresh-preserve-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-client-side-state-does-router-refresh-preserve-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What client-side state does router.refresh() preserve in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>router.refresh() preserves unaffected client-side React state (e.g., useState) and browser state (e.g., scroll position).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="multi-zones" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Multi-Zones</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="14HuhT" prefix="r4750" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"34706997989309869"],"question":[0,"Does assetPrefix affect files in the public folder?"],"answer":[0,"No, assetPrefix does NOT affect the public folder; manual prefixing is required for those assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"does-assetprefix-affect-files-in-the-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-assetprefix-affect-files-in-the-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-assetprefix-affect-files-in-the-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does assetPrefix affect files in the public folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, assetPrefix does NOT affect the public folder; manual prefixing is required for those assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16zS29" prefix="r4751" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"49625839875571261"],"question":[0,"What is recommended for coordinating feature releases across independently-deployed zones?"],"answer":[0,"Feature flags are recommended for coordinating feature releases across independently-deployed zones."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-recommended-for-coordinating-feature-releases-across-independently-deplo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-recommended-for-coordinating-feature-releases-across-independently-deplo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-recommended-for-coordinating-feature-releases-across-independently-deplo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is recommended for coordinating feature releases across independently-deployed zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Feature flags are recommended for coordinating feature releases across independently-deployed zones.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1utzND" prefix="r4752" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1788863542407284215"],"question":[0,"How can zones share code when using a monorepo setup?"],"answer":[0,"A monorepo makes it easier to share code across separate microfrontends - when a change is made to a component used by multiple applications, the developer only has to change one repository and Vercel will automatically deploy all affected applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/templates/next.js/microfrontends-multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-zones-share-code-when-using-a-monorepo-setup"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-zones-share-code-when-using-a-monorepo-setup" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-zones-share-code-when-using-a-monorepo-setup" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can zones share code when using a monorepo setup?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A monorepo makes it easier to share code across separate microfrontends - when a change is made to a component used by multiple applications, the developer only has to change one repository and Vercel will automatically deploy all affected applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/templates/next.js/microfrontends-multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqPxS3" prefix="r4753" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2207310278767249017"],"question":[0,"Is assetPrefix automatically configured when deploying to Vercel?"],"answer":[0,"Yes, assetPrefix is automatically configured when deploying to Vercel and manual setup is unnecessary for Vercel deployments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"is-assetprefix-automatically-configured-when-deploying-to-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-assetprefix-automatically-configured-when-deploying-to-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-assetprefix-automatically-configured-when-deploying-to-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is assetPrefix automatically configured when deploying to Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, assetPrefix is automatically configured when deploying to Vercel and manual setup is unnecessary for Vercel deployments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dNKeb" prefix="r4754" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2367188318075347643"],"question":[0,"Can basePath be changed at runtime without rebuilding?"],"answer":[0,"No, basePath must be set at build time and cannot be changed without re-building as the value is inlined in the client-side bundles."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath"]]],"topic":[0,"nextjs"],"slug":[0,"can-basepath-be-changed-at-runtime-without-rebuilding"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-basepath-be-changed-at-runtime-without-rebuilding" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-basepath-be-changed-at-runtime-without-rebuilding" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can basePath be changed at runtime without rebuilding?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, basePath must be set at build time and cannot be changed without re-building as the value is inlined in the client-side bundles.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZygrQ2" prefix="r4755" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2480831504813376067"],"question":[0,"What is the main benefit of using Multi-Zones for build times?"],"answer":[0,"Multi-Zones reduce the size of each application which improves build times and removes code that is only necessary for one of the zones."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-main-benefit-of-using-multi-zones-for-build-times"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-main-benefit-of-using-multi-zones-for-build-times" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-main-benefit-of-using-multi-zones-for-build-times" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the main benefit of using Multi-Zones for build times?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Multi-Zones reduce the size of each application which improves build times and removes code that is only necessary for one of the zones.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Drc20" prefix="r4756" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3349718919201462438"],"question":[0,"Which directory contents should be uploaded to a CDN when using assetPrefix?"],"answer":[0,"Only upload the .next/static/ directory contents as _next/static/ on your CDN. Do not upload the rest of your .next/ folder as it may expose server code or configuration publicly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"which-directory-contents-should-be-uploaded-to-a-cdn-when-using-assetprefix"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-directory-contents-should-be-uploaded-to-a-cdn-when-using-assetprefix" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-directory-contents-should-be-uploaded-to-a-cdn-when-using-assetprefix" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which directory contents should be uploaded to a CDN when using assetPrefix?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only upload the .next/static/ directory contents as _next/static/ on your CDN. Do not upload the rest of your .next/ folder as it may expose server code or configuration publicly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfJrTJ" prefix="r4757" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4085344449750409979"],"question":[0,"Where should pages that are frequently visited together be placed in a Multi-Zones architecture?"],"answer":[0,"Pages that are frequently visited together should live in the same zone to avoid hard navigations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-pages-that-are-frequently-visited-together-be-placed-in-a-multi-zon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-pages-that-are-frequently-visited-together-be-placed-in-a-multi-zon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-pages-that-are-frequently-visited-together-be-placed-in-a-multi-zon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should pages that are frequently visited together be placed in a Multi-Zones architecture?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pages that are frequently visited together should live in the same zone to avoid hard navigations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uUIwY" prefix="r4758" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4112281802742407255"],"question":[0,"Can Multi-Zones include applications built with frameworks other than Next.js?"],"answer":[0,"Yes, Multi-Zones allow other applications on the domain to use their own choice of framework since applications are decoupled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"can-multi-zones-include-applications-built-with-frameworks-other-than-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-multi-zones-include-applications-built-with-frameworks-other-than-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-multi-zones-include-applications-built-with-frameworks-other-than-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Multi-Zones include applications built with frameworks other than Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Multi-Zones allow other applications on the domain to use their own choice of framework since applications are decoupled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zj1DM" prefix="r4759" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4509982492944490757"],"question":[0,"Which HTML element should be used for links between different zones instead of Next.js Link component?"],"answer":[0,"Links to paths in a different zone should use an <a> tag instead of the Next.js <Link> component, because Next.js will try to prefetch and soft navigate to any relative path in <Link> component, which will not work across zones."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"which-html-element-should-be-used-for-links-between-different-zones-instead-of-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-html-element-should-be-used-for-links-between-different-zones-instead-of-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-html-element-should-be-used-for-links-between-different-zones-instead-of-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTML element should be used for links between different zones instead of Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Links to paths in a different zone should use an <a> tag instead of the Next.js <Link> component, because Next.js will try to prefetch and soft navigate to any relative path in <Link> component, which will not work across zones.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="getmP" prefix="r4760" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4684400958392901720"],"question":[0,"Does the default catch-all zone require an assetPrefix configuration?"],"answer":[0,"No, the default application handling all paths not routed to another more specific zone does not need an assetPrefix."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-default-catch-all-zone-require-an-assetprefix-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-default-catch-all-zone-require-an-assetprefix-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-default-catch-all-zone-require-an-assetprefix-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the default catch-all zone require an assetPrefix configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the default application handling all paths not routed to another more specific zone does not need an assetPrefix.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bQV1x" prefix="r4761" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5236379374074394976"],"question":[0,"How can zones in different repositories share code?"],"answer":[0,"For zones in different repositories, code can be shared using public or private NPM packages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-zones-in-different-repositories-share-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-zones-in-different-repositories-share-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-zones-in-different-repositories-share-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can zones in different repositories share code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For zones in different repositories, code can be shared using public or private NPM packages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PBCum" prefix="r4762" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5606790416415697492"],"question":[0,"What does assetPrefix configuration affect in Next.js?"],"answer":[0,"assetPrefix configures a CDN to serve Next.js static assets by prefixing URLs for JavaScript and CSS files from the /_next/ path (files in .next/static/)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-assetprefix-configuration-affect-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-assetprefix-configuration-affect-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-assetprefix-configuration-affect-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does assetPrefix configuration affect in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>assetPrefix configures a CDN to serve Next.js static assets by prefixing URLs for JavaScript and CSS files from the /_next/ path (files in .next/static/).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z293Sxz" prefix="r4763" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6197066435390803835"],"question":[0,"What are Next.js Multi-Zones?"],"answer":[0,"Multi-Zones are an approach to micro-frontends that separate a large application on a domain into smaller Next.js applications that each serve a set of paths."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-next-js-multi-zones"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-next-js-multi-zones" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-next-js-multi-zones" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are Next.js Multi-Zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Multi-Zones are an approach to micro-frontends that separate a large application on a domain into smaller Next.js applications that each serve a set of paths.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dm5W8" prefix="r4764" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6949348151975649593"],"question":[0,"What configuration must each zone (except the default catch-all) define to avoid asset conflicts?"],"answer":[0,"Each zone must define an assetPrefix in next.config.js. For example: const nextConfig = { assetPrefix: '/blog-static' }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-must-each-zone-except-the-default-catch-all-define-to-avoid-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-must-each-zone-except-the-default-catch-all-define-to-avoid-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-must-each-zone-except-the-default-catch-all-define-to-avoid-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration must each zone (except the default catch-all) define to avoid asset conflicts?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each zone must define an assetPrefix in next.config.js. For example: const nextConfig = { assetPrefix: '/blog-static' }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="u7XkI" prefix="r4765" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9671097796547238359"],"question":[0,"What configuration is required for Server Actions when using Multi-Zones?"],"answer":[0,"You must explicitly allow the user-facing origin in next.config.js: experimental: { serverActions: { allowedOrigins: ['your-production-domain.com'] } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-required-for-server-actions-when-using-multi-zones"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-required-for-server-actions-when-using-multi-zones" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-required-for-server-actions-when-using-multi-zones" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is required for Server Actions when using Multi-Zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must explicitly allow the user-facing origin in next.config.js: experimental: { serverActions: { allowedOrigins: ['your-production-domain.com'] } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tiYME" prefix="r4766" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10251532089814301026"],"question":[0,"What happens when navigating between pages within the same zone?"],"answer":[0,"Navigating between pages in the same zone performs soft navigations that don't require reloading the page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-navigating-between-pages-within-the-same-zone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-navigating-between-pages-within-the-same-zone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-navigating-between-pages-within-the-same-zone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when navigating between pages within the same zone?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Navigating between pages in the same zone performs soft navigations that don't require reloading the page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18ni4m" prefix="r4767" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10853525534998473331"],"question":[0,"Do zones need additional rewrite rules for static assets in Next.js 15?"],"answer":[0,"No, in versions older than Next.js 15 you may need an additional rewrite to handle the static assets, but this is no longer necessary in Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"do-zones-need-additional-rewrite-rules-for-static-assets-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-zones-need-additional-rewrite-rules-for-static-assets-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-zones-need-additional-rewrite-rules-for-static-assets-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do zones need additional rewrite rules for static assets in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, in versions older than Next.js 15 you may need an additional rewrite to handle the static assets, but this is no longer necessary in Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17iJO0" prefix="r4768" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11817210399463026673"],"question":[0,"Can page names be duplicated across different zones?"],"answer":[0,"No, all the pages across all zones should have unique names. An app can't have pages from another app - if app A has /blog then app B shouldn't have it too."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"can-page-names-be-duplicated-across-different-zones"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-page-names-be-duplicated-across-different-zones" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-page-names-be-duplicated-across-different-zones" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can page names be duplicated across different zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, all the pages across all zones should have unique names. An app can't have pages from another app - if app A has /blog then app B shouldn't have it too.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAL8KJ" prefix="r4769" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12837379714045554676"],"question":[0,"Do Multi-Zones automatically deduplicate shared dependencies across zones?"],"answer":[0,"No, unlike a single Next.js application, Multi Zones doesn't automatically deduplicate shared dependencies across zones. Each zone loads its resources independently."],"confidence":[0,0.95],"sources":[1,[[0,"https://techhub.iodigital.com/articles/building-scalable-micro-frontends-with-next-js-multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"do-multi-zones-automatically-deduplicate-shared-dependencies-across-zones"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-multi-zones-automatically-deduplicate-shared-dependencies-across-zones" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-multi-zones-automatically-deduplicate-shared-dependencies-across-zones" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Multi-Zones automatically deduplicate shared dependencies across zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, unlike a single Next.js application, Multi Zones doesn't automatically deduplicate shared dependencies across zones. Each zone loads its resources independently.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://techhub.iodigital.com/articles/building-scalable-micro-frontends-with-next-js-multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>techhub.iodigital.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18RLnk" prefix="r4770" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13084849496221920876"],"question":[0,"Under which path are assets served when using assetPrefix in Multi-Zones?"],"answer":[0,"Assets are served under /assetPrefix/_next/... for each of the zones."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"under-which-path-are-assets-served-when-using-assetprefix-in-multi-zones"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="under-which-path-are-assets-served-when-using-assetprefix-in-multi-zones" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#under-which-path-are-assets-served-when-using-assetprefix-in-multi-zones" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Under which path are assets served when using assetPrefix in Multi-Zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Assets are served under /assetPrefix/_next/... for each of the zones.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2oK1gK" prefix="r4771" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13970892570671955111"],"question":[0,"What is the default value for the basePath configuration option?"],"answer":[0,"An empty string ('')"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-basepath-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-basepath-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-basepath-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the basePath configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An empty string ('')</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Ss3Ip" prefix="r4772" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14567058479216204012"],"question":[0,"What is the recommended method for routing requests to different zones?"],"answer":[0,"Use rewrites in next.config.js. For example: async rewrites() { return [{ source: '/blog/:path+', destination: `${process.env.BLOG_DOMAIN}/blog/:path+` }] }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/multi-zones"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-method-for-routing-requests-to-different-zones"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-method-for-routing-requests-to-different-zones" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-method-for-routing-requests-to-different-zones" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended method for routing requests to different zones?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use rewrites in next.config.js. For example: async rewrites() { return [{ source: '/blog/:path+', destination: <code>${process.env.BLOG_DOMAIN}/blog/:path+</code> }] }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/multi-zones" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1q8XCq" prefix="r4773" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14813627149481690185"],"question":[0,"Does next/link automatically apply the basePath prefix to links?"],"answer":[0,"Yes, when using next/link and next/router the basePath is automatically applied. For example, using /about will automatically become /docs/about when basePath is set to /docs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-link-automatically-apply-the-basepath-prefix-to-links"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-link-automatically-apply-the-basepath-prefix-to-links" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-link-automatically-apply-the-basepath-prefix-to-links" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does next/link automatically apply the basePath prefix to links?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, when using next/link and next/router the basePath is automatically applied. For example, using /about will automatically become /docs/about when basePath is set to /docs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="deploying-static-hosting" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Deploying > Static Hosting</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="10vplI" prefix="r4774" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"78120750836496551"],"question":[0,"Are Rewrites and Redirects supported in Next.js static exports?"],"answer":[0,"No, Rewrites and Redirects are not supported in static exports because they require server-side request routing. You must configure redirects in your web server (e.g., Nginx) instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-rewrites-and-redirects-supported-in-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-rewrites-and-redirects-supported-in-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-rewrites-and-redirects-supported-in-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Rewrites and Redirects supported in Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Rewrites and Redirects are not supported in static exports because they require server-side request routing. You must configure redirects in your web server (e.g., Nginx) instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uv3OI" prefix="r4775" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"707007302060461211"],"question":[0,"What Nginx configuration is recommended for serving Next.js static exports?"],"answer":[0,"Use `try_files $uri $uri.html $uri/ =404;` in the location block. This checks for the exact URI, then tries with .html extension, then as a directory, and finally returns 404 if none match."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-nginx-configuration-is-recommended-for-serving-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-nginx-configuration-is-recommended-for-serving-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-nginx-configuration-is-recommended-for-serving-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Nginx configuration is recommended for serving Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>try_files $uri $uri.html $uri/ =404;</code> in the location block. This checks for the exact URI, then tries with .html extension, then as a directory, and finally returns 404 if none match.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nkPho" prefix="r4776" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1042391246277058532"],"question":[0,"Is Draft Mode supported with static exports?"],"answer":[0,"No, Draft Mode is not supported with static exports because it requires a Node.js server to handle cookies, dynamic rendering, and request-time data fetching."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-draft-mode-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-draft-mode-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-draft-mode-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Draft Mode supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Draft Mode is not supported with static exports because it requires a Node.js server to handle cookies, dynamic rendering, and request-time data fetching.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1XIodT" prefix="r4777" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1240824258614171515"],"question":[0,"Is internationalized routing (i18n) supported with static exports?"],"answer":[0,"No, Internationalized Routing does not integrate with `output: 'export'` as it does not leverage the Next.js routing layer and requires a Node.js server. Manual solutions using `[locale]` folders with generateStaticParams are possible."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-internationalized-routing-i18n-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-internationalized-routing-i18n-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-internationalized-routing-i18n-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is internationalized routing (i18n) supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Internationalized Routing does not integrate with <code>output: 'export'</code> as it does not leverage the Next.js routing layer and requires a Node.js server. Manual solutions using <code>[locale]</code> folders with generateStaticParams are possible.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sHxOe" prefix="r4778" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1292671659813096126"],"question":[0,"Do Server Components work with static exports?"],"answer":[0,"Yes, Server Components execute during build time and render to static HTML for initial loads and static payloads for client navigation. No modifications are needed unless using dynamic server functions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-components-work-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-components-work-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-components-work-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Components work with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Components execute during build time and render to static HTML for initial loads and static payloads for client navigation. No modifications are needed unless using dynamic server functions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pHsfS" prefix="r4779" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3079003038410612388"],"question":[0,"Which getStaticPaths fallback values are not supported with static exports?"],"answer":[0,"`fallback: true` and `fallback: 'blocking'` are not supported when using `output: 'export'`. Only `fallback: false` is supported, which requires returning all paths at build time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"which-getstaticpaths-fallback-values-are-not-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-getstaticpaths-fallback-values-are-not-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-getstaticpaths-fallback-values-are-not-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which getStaticPaths fallback values are not supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>fallback: true</code> and <code>fallback: 'blocking'</code> are not supported when using <code>output: 'export'</code>. Only <code>fallback: false</code> is supported, which requires returning all paths at build time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="76Mx1" prefix="r4780" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4217114006903748824"],"question":[0,"Is generateStaticParams required for dynamic routes when using static export?"],"answer":[0,"Yes, `generateStaticParams` is required for any dynamic routes when using `output: 'export'`. Dynamic Routes without generateStaticParams() are not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-generatestaticparams-required-for-dynamic-routes-when-using-static-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-generatestaticparams-required-for-dynamic-routes-when-using-static-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-generatestaticparams-required-for-dynamic-routes-when-using-static-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is generateStaticParams required for dynamic routes when using static export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, <code>generateStaticParams</code> is required for any dynamic routes when using <code>output: 'export'</code>. Dynamic Routes without generateStaticParams() are not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZixEUX" prefix="r4781" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4550017571381416824"],"question":[0,"Are Headers supported in Next.js static exports?"],"answer":[0,"No, Headers are not supported in static exports because they require runtime modification on the server, which is not possible with pre-rendered static files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-headers-supported-in-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-headers-supported-in-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-headers-supported-in-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Headers supported in Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Headers are not supported in static exports because they require runtime modification on the server, which is not possible with pre-rendered static files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mpjxl" prefix="r4782" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4558418137797958401"],"question":[0,"What configuration option must be set in next.config.js to enable static export in Next.js?"],"answer":[0,"Set `output: 'export'` in next.config.js to enable static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-must-be-set-in-next-config-js-to-enable-static-export-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-must-be-set-in-next-config-js-to-enable-static-export-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-must-be-set-in-next-config-js-to-enable-static-export-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option must be set in next.config.js to enable static export in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>output: 'export'</code> in next.config.js to enable static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1k0zxh" prefix="r4783" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4606064001807767749"],"question":[0,"Are 404 pages automatically generated in Next.js static exports?"],"answer":[0,"Yes, Next.js automatically generates a static 404 page at build time. For Pages Router, create `pages/404.js` for a custom 404 page. The output includes `/out/404.html`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-404-pages-automatically-generated-in-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-404-pages-automatically-generated-in-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-404-pages-automatically-generated-in-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are 404 pages automatically generated in Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js automatically generates a static 404 page at build time. For Pages Router, create <code>pages/404.js</code> for a custom 404 page. The output includes <code>/out/404.html</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aEvfj" prefix="r4784" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5094119256554734092"],"question":[0,"Does assetPrefix configuration affect files in the public folder?"],"answer":[0,"No, while `assetPrefix` covers requests to `_next/static`, it does not influence files in the public folder. If you want to serve those assets over a CDN, you'll have to introduce the prefix yourself."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"does-assetprefix-configuration-affect-files-in-the-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-assetprefix-configuration-affect-files-in-the-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-assetprefix-configuration-affect-files-in-the-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does assetPrefix configuration affect files in the public folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, while <code>assetPrefix</code> covers requests to <code>_next/static</code>, it does not influence files in the public folder. If you want to serve those assets over a CDN, you'll have to introduce the prefix yourself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16YdnA" prefix="r4785" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5938496841362813176"],"question":[0,"What is the default output directory name when running next build with static export enabled?"],"answer":[0,"The default output directory is `out` folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-output-directory-name-when-running-next-build-with-static-ex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-output-directory-name-when-running-next-build-with-static-ex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-output-directory-name-when-running-next-build-with-static-ex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default output directory name when running next build with static export enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default output directory is <code>out</code> folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="QPuWR" prefix="r4786" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7921777088047495680"],"question":[0,"What configuration is required to use next/image with static exports?"],"answer":[0,"You must define a custom image loader by setting `images: { loader: 'custom', loaderFile: './my-loader.ts' }` in next.config.js, or set `images: { unoptimized: true }`. The default Image Optimization loader is not supported in static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-is-required-to-use-next-image-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-is-required-to-use-next-image-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-is-required-to-use-next-image-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration is required to use next/image with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must define a custom image loader by setting <code>images: { loader: 'custom', loaderFile: './my-loader.ts' }</code> in next.config.js, or set <code>images: { unoptimized: true }</code>. The default Image Optimization loader is not supported in static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1yolCM" prefix="r4787" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8566836679598677463"],"question":[0,"What are the three possible values for getStaticPaths fallback option?"],"answer":[0,"The three values are: `fallback: false` (returns 404 for unspecified paths), `fallback: true` (serves a fallback page while generating in background), and `fallback: 'blocking'` (waits for HTML generation like SSR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-possible-values-for-getstaticpaths-fallback-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-possible-values-for-getstaticpaths-fallback-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-possible-values-for-getstaticpaths-fallback-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three possible values for getStaticPaths fallback option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three values are: <code>fallback: false</code> (returns 404 for unspecified paths), <code>fallback: true</code> (serves a fallback page while generating in background), and <code>fallback: 'blocking'</code> (waits for HTML generation like SSR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-paths" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cuFmn" prefix="r4788" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9900649417744630005"],"question":[0,"Are Intercepting Routes supported with static exports?"],"answer":[0,"No, Intercepting Routes are not supported with static export. Starting from Next.js 15.2.x, attempting to use them will cause a build error: 'Intercepting routes are not supported with static export.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/76926"]]],"topic":[0,"nextjs"],"slug":[0,"are-intercepting-routes-supported-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-intercepting-routes-supported-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-intercepting-routes-supported-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Intercepting Routes supported with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Intercepting Routes are not supported with static export. Starting from Next.js 15.2.x, attempting to use them will cause a build error: 'Intercepting routes are not supported with static export.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/76926" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nG6Oa" prefix="r4789" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10553920583114013662"],"question":[0,"Are API Routes supported in Next.js static exports?"],"answer":[0,"No, API Routes (from Pages Router) are not supported with static exports. However, Route Handlers in the App Router can be used with static exports if they use only the GET method."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/api-routes-static-export"]]],"topic":[0,"nextjs"],"slug":[0,"are-api-routes-supported-in-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-api-routes-supported-in-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-api-routes-supported-in-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are API Routes supported in Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, API Routes (from Pages Router) are not supported with static exports. However, Route Handlers in the App Router can be used with static exports if they use only the GET method.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/api-routes-static-export" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRH06d" prefix="r4790" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11704844887064487352"],"question":[0,"Which file extensions are exempt from trailing slash rules in Next.js static exports?"],"answer":[0,"Static files with extensions (e.g., `/file.txt`, `images/photos/picture.png`) and all paths under `.well-known/` (e.g., `.well-known/subfolder/config.json`) are exempt from trailing slash appending."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"which-file-extensions-are-exempt-from-trailing-slash-rules-in-next-js-static-exp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-file-extensions-are-exempt-from-trailing-slash-rules-in-next-js-static-exp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-file-extensions-are-exempt-from-trailing-slash-rules-in-next-js-static-exp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which file extensions are exempt from trailing slash rules in Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Static files with extensions (e.g., <code>/file.txt</code>, <code>images/photos/picture.png</code>) and all paths under <code>.well-known/</code> (e.g., <code>.well-known/subfolder/config.json</code>) are exempt from trailing slash appending.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="12Wgy5" prefix="r4791" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11987562097706048972"],"question":[0,"Which HTTP method is supported for Route Handlers in static exports?"],"answer":[0,"Only the GET HTTP verb is supported for Route Handlers in static exports. Route Handlers can generate static HTML, JSON, TXT, or other files from cached or uncached data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"which-http-method-is-supported-for-route-handlers-in-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-http-method-is-supported-for-route-handlers-in-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-http-method-is-supported-for-route-handlers-in-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTTP method is supported for Route Handlers in static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the GET HTTP verb is supported for Route Handlers in static exports. Route Handlers can generate static HTML, JSON, TXT, or other files from cached or uncached data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHtYwm" prefix="r4792" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12151522200833591438"],"question":[0,"In which Next.js version was the `next export` command removed?"],"answer":[0,"The `next export` command was removed in Next.js version 14.0.0. It was replaced by the `output: 'export'` configuration option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/version-14"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-next-export-command-removed"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-next-export-command-removed" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-next-export-command-removed" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the `next export` command removed?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>next export</code> command was removed in Next.js version 14.0.0. It was replaced by the <code>output: 'export'</code> configuration option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/version-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjIKnz" prefix="r4793" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12332496133674838090"],"question":[0,"What configuration changes the static export output directory from 'out' to a custom name?"],"answer":[0,"Use the `distDir` option in next.config.js, for example: `distDir: 'dist'`. However, note that `distDir` controls the build output directory (.next), not specifically the static export folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-changes-the-static-export-output-directory-from-out-to-a-cust"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-changes-the-static-export-output-directory-from-out-to-a-cust" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-changes-the-static-export-output-directory-from-out-to-a-cust" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration changes the static export output directory from 'out' to a custom name?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the <code>distDir</code> option in next.config.js, for example: <code>distDir: 'dist'</code>. However, note that <code>distDir</code> controls the build output directory (.next), not specifically the static export folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xTRa5" prefix="r4794" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12933912357081932372"],"question":[0,"Are Server Actions supported in Next.js static exports?"],"answer":[0,"No, Server Actions are not supported with static export. Using them will cause a build error: 'Server Actions are not supported with static export.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-actions-supported-in-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-actions-supported-in-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-actions-supported-in-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Actions supported in Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Server Actions are not supported with static export. Using them will cause a build error: 'Server Actions are not supported with static export.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="DYooa" prefix="r4795" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13348458090669384411"],"question":[0,"What is the default value of the trailingSlash configuration option in Next.js?"],"answer":[0,"The default value is `false`, which means URLs with trailing slashes redirect to their non-trailing counterparts (e.g., `/about/` redirects to `/about`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-trailingslash-configuration-option-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-trailingslash-configuration-option-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-trailingslash-configuration-option-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the trailingSlash configuration option in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>false</code>, which means URLs with trailing slashes redirect to their non-trailing counterparts (e.g., <code>/about/</code> redirects to <code>/about</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mt4hc" prefix="r4796" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13644818968815443628"],"question":[0,"How does trailingSlash: true affect static export output?"],"answer":[0,"When `trailingSlash: true` is used with `output: 'export'`, the `/about` page will output `/about/index.html` instead of the default `/about.html`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-trailingslash-true-affect-static-export-output"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-trailingslash-true-affect-static-export-output" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-trailingslash-true-affect-static-export-output" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does trailingSlash: true affect static export output?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When <code>trailingSlash: true</code> is used with <code>output: 'export'</code>, the <code>/about</code> page will output <code>/about/index.html</code> instead of the default <code>/about.html</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEPtmE" prefix="r4797" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14345549755330432219"],"question":[0,"Can generateMetadata use searchParams with static exports?"],"answer":[0,"No, static exports do not support runtime dynamic functions like `searchParams`. However, `generateMetadata` works with dynamic route parameters (via `params`) that have `generateStaticParams` defined."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/55476"]]],"topic":[0,"nextjs"],"slug":[0,"can-generatemetadata-use-searchparams-with-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-generatemetadata-use-searchparams-with-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-generatemetadata-use-searchparams-with-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can generateMetadata use searchParams with static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, static exports do not support runtime dynamic functions like <code>searchParams</code>. However, <code>generateMetadata</code> works with dynamic route parameters (via <code>params</code>) that have <code>generateStaticParams</code> defined.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/55476" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="edge-runtime-runtime-characteristics" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Edge Runtime > Runtime Characteristics</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="2b6bTH" prefix="r4798" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"82409582364482326"],"question":[0,"Is eval() allowed in the Edge Runtime?"],"answer":[0,"No, eval() is disabled in the Edge Runtime for security reasons. If executed, it will throw a runtime error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-eval-allowed-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-eval-allowed-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-eval-allowed-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is eval() allowed in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, eval() is disabled in the Edge Runtime for security reasons. If executed, it will throw a runtime error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ppRcF" prefix="r4799" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1448662748438302533"],"question":[0,"Is AsyncLocalStorage supported in the Edge Runtime?"],"answer":[0,"Yes, AsyncLocalStorage is provided as a polyfill in the Edge Runtime as a Node.js-specific addition, even though it's not a standard Web API."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-asynclocalstorage-supported-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-asynclocalstorage-supported-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-asynclocalstorage-supported-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is AsyncLocalStorage supported in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, AsyncLocalStorage is provided as a polyfill in the Edge Runtime as a Node.js-specific addition, even though it's not a standard Web API.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3846W" prefix="r4800" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1906320255083611108"],"question":[0,"What is the relationship between Next.js Edge Runtime and Web APIs?"],"answer":[0,"The Edge Runtime is based on Web APIs and is a lightweight subset of available Node.js APIs, relying primarily on standard Web APIs rather than Node.js-specific functionality."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-relationship-between-next-js-edge-runtime-and-web-apis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-relationship-between-next-js-edge-runtime-and-web-apis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-relationship-between-next-js-edge-runtime-and-web-apis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the relationship between Next.js Edge Runtime and Web APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime is based on Web APIs and is a lightweight subset of available Node.js APIs, relying primarily on standard Web APIs rather than Node.js-specific functionality.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jfDry" prefix="r4801" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2538275667901462490"],"question":[0,"Does the Edge Runtime support Incremental Static Regeneration (ISR)?"],"answer":[0,"No, the Edge Runtime does not support Incremental Static Regeneration (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-incremental-static-regeneration-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-incremental-static-regeneration-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-incremental-static-regeneration-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support Incremental Static Regeneration (ISR)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the Edge Runtime does not support Incremental Static Regeneration (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1oQ3d9" prefix="r4802" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3491497070451095630"],"question":[0,"Are environment variables from .env files available in Edge Runtime on Vercel?"],"answer":[0,"No, when deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their names are prefixed with NEXT_PUBLIC_. Vercel recommends managing environment variables in Project Settings instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"are-environment-variables-from-env-files-available-in-edge-runtime-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-environment-variables-from-env-files-available-in-edge-runtime-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-environment-variables-from-env-files-available-in-edge-runtime-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are environment variables from .env files available in Edge Runtime on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, when deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their names are prefixed with NEXT_PUBLIC_. Vercel recommends managing environment variables in Project Settings instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEnxLd" prefix="r4803" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3759788874623363288"],"question":[0,"Does the Edge Runtime support HTTP streaming?"],"answer":[0,"Yes, the Edge Runtime supports HTTP streaming. Both Node.js and Edge runtimes can support streaming depending on your deployment adapter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-http-streaming"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-http-streaming" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-http-streaming" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support HTTP streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the Edge Runtime supports HTTP streaming. Both Node.js and Edge runtimes can support streaming depending on your deployment adapter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZC56XH" prefix="r4804" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4352907002662668063"],"question":[0,"Is WebAssembly.compile() supported in the Edge Runtime?"],"answer":[0,"No, WebAssembly.compile() is disabled in the Edge Runtime. You must use pre-compiled WASM modules with WebAssembly.instantiate() instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-webassembly-compile-supported-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-webassembly-compile-supported-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-webassembly-compile-supported-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is WebAssembly.compile() supported in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, WebAssembly.compile() is disabled in the Edge Runtime. You must use pre-compiled WASM modules with WebAssembly.instantiate() instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vgnVD" prefix="r4805" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4462858172986706711"],"question":[0,"What is the maximum duration an Edge Function can run before it must start sending a response?"],"answer":[0,"Edge Functions must begin sending a response within 25 seconds to maintain streaming capabilities, and can continue streaming data for up to 300 seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/docs/functions/limitations"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-duration-an-edge-function-can-run-before-it-must-start-sendi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-duration-an-edge-function-can-run-before-it-must-start-sendi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-duration-an-edge-function-can-run-before-it-must-start-sendi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum duration an Edge Function can run before it must start sending a response?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Edge Functions must begin sending a response within 25 seconds to maintain streaming capabilities, and can continue streaming data for up to 300 seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/docs/functions/limitations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ru87y" prefix="r4806" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5129758202991472957"],"question":[0,"Can npm packages be used in the Edge Runtime?"],"answer":[0,"Yes, node_modules can be used in the Edge Runtime, but only if they implement ES Modules and do not use native Node.js APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-npm-packages-be-used-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-npm-packages-be-used-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-npm-packages-be-used-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can npm packages be used in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, node_modules can be used in the Edge Runtime, but only if they implement ES Modules and do not use native Node.js APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13MsRP" prefix="r4807" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5919388614646444568"],"question":[0,"What is unstable_allowDynamic used for in the Edge Runtime?"],"answer":[0,"unstable_allowDynamic is a glob or array of globs that allows you to suppress build-time errors for specific files containing dynamic code evaluation (eval, new Function, WebAssembly.compile) that won't be executed at runtime. Example: unstable_allowDynamic: ['/lib/utilities.js', '**/node_modules/function-bind/**']"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/edge-dynamic-code-evaluation"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-unstable-allowdynamic-used-for-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-unstable-allowdynamic-used-for-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-unstable-allowdynamic-used-for-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is unstable_allowDynamic used for in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>unstable_allowDynamic is a glob or array of globs that allows you to suppress build-time errors for specific files containing dynamic code evaluation (eval, new Function, WebAssembly.compile) that won't be executed at runtime. Example: unstable_allowDynamic: ['/lib/utilities.js', '<strong>/node_modules/function-bind/</strong>']</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/edge-dynamic-code-evaluation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Qo9YL" prefix="r4808" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6408639278747080674"],"question":[0,"What is the NEXT_RUNTIME environment variable value for Edge Runtime?"],"answer":[0,"The NEXT_RUNTIME environment variable has the value 'edge' when code is running in the Edge Runtime (and 'nodejs' for Node.js runtime)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-next-runtime-environment-variable-value-for-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-next-runtime-environment-variable-value-for-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-next-runtime-environment-variable-value-for-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the NEXT_RUNTIME environment variable value for Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The NEXT_RUNTIME environment variable has the value 'edge' when code is running in the Edge Runtime (and 'nodejs' for Node.js runtime).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kv1h7" prefix="r4809" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7545337126064601650"],"question":[0,"Does unstable_allowDynamic enable dynamic code evaluation at runtime in Edge Runtime?"],"answer":[0,"No, unstable_allowDynamic only suppresses build-time errors. If dynamic code evaluation statements are actually executed at runtime, they will still throw a runtime error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/edge-dynamic-code-evaluation"]]],"topic":[0,"nextjs"],"slug":[0,"does-unstable-allowdynamic-enable-dynamic-code-evaluation-at-runtime-in-edge-run"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-unstable-allowdynamic-enable-dynamic-code-evaluation-at-runtime-in-edge-run" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-unstable-allowdynamic-enable-dynamic-code-evaluation-at-runtime-in-edge-run" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does unstable_allowDynamic enable dynamic code evaluation at runtime in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, unstable_allowDynamic only suppresses build-time errors. If dynamic code evaluation statements are actually executed at runtime, they will still throw a runtime error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/edge-dynamic-code-evaluation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lb9fn" prefix="r4810" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7647513539066607153"],"question":[0,"Can you use process.env to access environment variables in the Edge Runtime?"],"answer":[0,"Yes, you can use process.env to access environment variables in the Edge Runtime for both next dev and next build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-process-env-to-access-environment-variables-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-process-env-to-access-environment-variables-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-process-env-to-access-environment-variables-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use process.env to access environment variables in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can use process.env to access environment variables in the Edge Runtime for both next dev and next build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24bJLt" prefix="r4811" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8051059398012281496"],"question":[0,"Does the Edge Runtime support data revalidation with fetch?"],"answer":[0,"Yes, the Edge Runtime supports data revalidation with fetch."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-data-revalidation-with-fetch"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-data-revalidation-with-fetch" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-data-revalidation-with-fetch" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support data revalidation with fetch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the Edge Runtime supports data revalidation with fetch.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAz65" prefix="r4812" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8220029909791112813"],"question":[0,"What cold boot performance characteristic does the Edge Runtime have compared to serverless?"],"answer":[0,"The Edge Runtime has Low cold boot time compared to Normal for traditional serverless functions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-cold-boot-performance-characteristic-does-the-edge-runtime-have-compared-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cold-boot-performance-characteristic-does-the-edge-runtime-have-compared-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cold-boot-performance-characteristic-does-the-edge-runtime-have-compared-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cold boot performance characteristic does the Edge Runtime have compared to serverless?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime has Low cold boot time compared to Normal for traditional serverless functions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gKuye" prefix="r4813" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8438234055029738652"],"question":[0,"How does Edge Runtime latency compare to other runtime options?"],"answer":[0,"The Edge Runtime provides the Lowest latency among the runtime options in Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-edge-runtime-latency-compare-to-other-runtime-options"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-edge-runtime-latency-compare-to-other-runtime-options" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-edge-runtime-latency-compare-to-other-runtime-options" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Edge Runtime latency compare to other runtime options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime provides the Lowest latency among the runtime options in Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hhfsj" prefix="r4814" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8700255878606450985"],"question":[0,"What is the only I/O operation method supported by the Edge Runtime?"],"answer":[0,"The Edge Runtime only supports fetch for I/O operations, whereas Node.js supports all I/O methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-only-i-o-operation-method-supported-by-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-only-i-o-operation-method-supported-by-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-only-i-o-operation-method-supported-by-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the only I/O operation method supported by the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime only supports fetch for I/O operations, whereas Node.js supports all I/O methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTz3Ev" prefix="r4815" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9397728638366299143"],"question":[0,"What Crypto APIs are available in the Edge Runtime?"],"answer":[0,"The Edge Runtime supports: crypto, CryptoKey, and SubtleCrypto."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-crypto-apis-are-available-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-crypto-apis-are-available-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-crypto-apis-are-available-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Crypto APIs are available in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports: crypto, CryptoKey, and SubtleCrypto.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rLbjF" prefix="r4816" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10558310278421602075"],"question":[0,"What is the maximum size limit for Edge Runtime code on Vercel?"],"answer":[0,"Code executed in the Edge Runtime on Vercel cannot exceed between 1 MB and 4 MB, including imported packages, fonts, and files. The limit varies depending on your Vercel plan (typically 1 MB for Hobby, 2 MB for Pro)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-size-limit-for-edge-runtime-code-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-size-limit-for-edge-runtime-code-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-size-limit-for-edge-runtime-code-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum size limit for Edge Runtime code on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Code executed in the Edge Runtime on Vercel cannot exceed between 1 MB and 4 MB, including imported packages, fonts, and files. The limit varies depending on your Vercel plan (typically 1 MB for Hobby, 2 MB for Pro).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1uhSyz" prefix="r4817" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11677225117394945210"],"question":[0,"What APIs does the Edge Runtime support for network operations?"],"answer":[0,"The Edge Runtime supports the following Network APIs: Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, and WebSocket."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-apis-does-the-edge-runtime-support-for-network-operations"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-apis-does-the-edge-runtime-support-for-network-operations" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-apis-does-the-edge-runtime-support-for-network-operations" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What APIs does the Edge Runtime support for network operations?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports the following Network APIs: Blob, fetch, FetchEvent, File, FormData, Headers, Request, Response, URLSearchParams, and WebSocket.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20x1aM" prefix="r4818" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11974251853770087606"],"question":[0,"What encoding APIs are available in the Edge Runtime?"],"answer":[0,"The Edge Runtime supports these Encoding APIs: atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, and TextEncoderStream."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-encoding-apis-are-available-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-encoding-apis-are-available-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-encoding-apis-are-available-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What encoding APIs are available in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports these Encoding APIs: atob, btoa, TextDecoder, TextDecoderStream, TextEncoder, and TextEncoderStream.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ukwq2" prefix="r4819" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12403837670170040462"],"question":[0,"Can you use require() to import modules in the Edge Runtime?"],"answer":[0,"No, calling require() directly is not allowed in the Edge Runtime. You must use ES Modules with import statements instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-to-import-modules-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-to-import-modules-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-to-import-modules-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use require() to import modules in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, calling require() directly is not allowed in the Edge Runtime. You must use ES Modules with import statements instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="W8l3K" prefix="r4820" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12725845813736735808"],"question":[0,"What types of rendering does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports Dynamic Rendering but does not support Static Rendering or Incremental Static Regeneration (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-rendering-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-rendering-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-rendering-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of rendering does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports Dynamic Rendering but does not support Static Rendering or Incremental Static Regeneration (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hPj2N" prefix="r4821" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13487989413273284846"],"question":[0,"Can you use new Function() for dynamic code evaluation in the Edge Runtime?"],"answer":[0,"No, new Function(evalString) is disabled in the Edge Runtime for security reasons and will cause a runtime error if executed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-new-function-for-dynamic-code-evaluation-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-new-function-for-dynamic-code-evaluation-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-new-function-for-dynamic-code-evaluation-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use new Function() for dynamic code evaluation in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, new Function(evalString) is disabled in the Edge Runtime for security reasons and will cause a runtime error if executed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="edge-runtime-feature-support" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Edge Runtime > Feature Support</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="22v7pf" prefix="r4822" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"88674865912502459"],"question":[0,"Can you use `new Function(evalString)` in the Edge Runtime?"],"answer":[0,"No. `new Function(evalString)` is disabled and will fail at runtime in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-new-function-evalstring-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-new-function-evalstring-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-new-function-evalstring-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `new Function(evalString)` in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. <code>new Function(evalString)</code> is disabled and will fail at runtime in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTHUro" prefix="r4823" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"160237317840581410"],"question":[0,"Is `AsyncLocalStorage` available in the Edge Runtime?"],"answer":[0,"Yes. `AsyncLocalStorage` is provided as a Next.js polyfill in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-asynclocalstorage-available-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-asynclocalstorage-available-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-asynclocalstorage-available-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is `AsyncLocalStorage` available in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. <code>AsyncLocalStorage</code> is provided as a Next.js polyfill in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1OzSt8" prefix="r4824" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"510288280674817289"],"question":[0,"Does the Edge Runtime support the Node.js `crypto` module?"],"answer":[0,"No. The Edge Runtime does not support the Node.js `crypto` module. You must use the Web Crypto API instead (accessed via `crypto.subtle`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/node-module-in-edge-runtime"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-the-node-js-crypto-module"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-the-node-js-crypto-module" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-the-node-js-crypto-module" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support the Node.js `crypto` module?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The Edge Runtime does not support the Node.js <code>crypto</code> module. You must use the Web Crypto API instead (accessed via <code>crypto.subtle</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/node-module-in-edge-runtime" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6CCIR" prefix="r4825" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"661169675858544035"],"question":[0,"What is the `unstable_allowDynamic` configuration option used for in the Edge Runtime?"],"answer":[0,"`unstable_allowDynamic` is a glob or array of globs that allows you to relax the dynamic code evaluation check for specific files. However, if these statements are executed on the Edge, they will still throw and cause a runtime error. This only suppresses the build-time error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-unstable-allowdynamic-configuration-option-used-for-in-the-edge-runt"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-unstable-allowdynamic-configuration-option-used-for-in-the-edge-runt" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-unstable-allowdynamic-configuration-option-used-for-in-the-edge-runt" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the `unstable_allowDynamic` configuration option used for in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>unstable_allowDynamic</code> is a glob or array of globs that allows you to relax the dynamic code evaluation check for specific files. However, if these statements are executed on the Edge, they will still throw and cause a runtime error. This only suppresses the build-time error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZR7Rzb" prefix="r4826" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"667888153501082401"],"question":[0,"Can you use `fs` (filesystem) operations in the Edge Runtime?"],"answer":[0,"No. You cannot read or write to the filesystem in the Edge Runtime. The `fs` module is a Node.js API and is not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-fs-filesystem-operations-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-fs-filesystem-operations-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-fs-filesystem-operations-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `fs` (filesystem) operations in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot read or write to the filesystem in the Edge Runtime. The <code>fs</code> module is a Node.js API and is not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NABe6" prefix="r4827" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1067166047265500929"],"question":[0,"What timer functions does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports `setTimeout`, `clearTimeout`, `setInterval`, and `clearInterval`."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/blob/canary/docs/api-reference/edge-runtime.md"]]],"topic":[0,"nextjs"],"slug":[0,"what-timer-functions-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-timer-functions-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-timer-functions-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What timer functions does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports <code>setTimeout</code>, <code>clearTimeout</code>, <code>setInterval</code>, and <code>clearInterval</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/blob/canary/docs/api-reference/edge-runtime.md" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPzsYn" prefix="r4828" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1427017902847924564"],"question":[0,"What crypto-related APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports `crypto`, `CryptoKey`, and `SubtleCrypto` (via `crypto.subtle`) for cryptographic operations using Web Crypto APIs. However, it does NOT support the Node.js `crypto` module."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-crypto-related-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-crypto-related-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-crypto-related-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What crypto-related APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports <code>crypto</code>, <code>CryptoKey</code>, and <code>SubtleCrypto</code> (via <code>crypto.subtle</code>) for cryptographic operations using Web Crypto APIs. However, it does NOT support the Node.js <code>crypto</code> module.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSCpKJ" prefix="r4829" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1702016435448978281"],"question":[0,"Does the Edge Runtime support `ReadableStream` from Node.js `fs.createReadStream()`?"],"answer":[0,"No. `createReadStream` is a Node.js function that only works in Node.js runtime despite returning a generic ReadableStream. It is not compatible with the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/50614"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-readablestream-from-node-js-fs-createreadstream"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-readablestream-from-node-js-fs-createreadstream" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-readablestream-from-node-js-fs-createreadstream" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support `ReadableStream` from Node.js `fs.createReadStream()`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. <code>createReadStream</code> is a Node.js function that only works in Node.js runtime despite returning a generic ReadableStream. It is not compatible with the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/50614" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jbapE" prefix="r4830" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2514532559777112161"],"question":[0,"What is the typical bundle size limit for Edge Functions on Vercel?"],"answer":[0,"The typical bundle size limit for Edge Functions on Vercel is 1 MB. However, this limit can vary depending on your deployment infrastructure and plan."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-bundle-size-limit-for-edge-functions-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-bundle-size-limit-for-edge-functions-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-bundle-size-limit-for-edge-functions-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical bundle size limit for Edge Functions on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The typical bundle size limit for Edge Functions on Vercel is 1 MB. However, this limit can vary depending on your deployment infrastructure and plan.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="uyKV0" prefix="r4831" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2716594304318620488"],"question":[0,"Does the Edge Runtime support native Node.js APIs?"],"answer":[0,"No. Native Node.js APIs are not supported in the Edge Runtime. For example, you cannot read or write to the filesystem."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-native-node-js-apis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-native-node-js-apis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-native-node-js-apis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support native Node.js APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Native Node.js APIs are not supported in the Edge Runtime. For example, you cannot read or write to the filesystem.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1OzXjq" prefix="r4832" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2975862729477613793"],"question":[0,"What is the bundle size limit for Edge Functions on Cloudflare Pages?"],"answer":[0,"The bundle size limit for Edge Functions on Cloudflare Pages is 4 MB."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/waelhabbal/nextjs-and-the-edge-runtime-a-guide-for-full-stack-developers-17g3"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-bundle-size-limit-for-edge-functions-on-cloudflare-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-bundle-size-limit-for-edge-functions-on-cloudflare-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-bundle-size-limit-for-edge-functions-on-cloudflare-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the bundle size limit for Edge Functions on Cloudflare Pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The bundle size limit for Edge Functions on Cloudflare Pages is 4 MB.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/waelhabbal/nextjs-and-the-edge-runtime-a-guide-for-full-stack-developers-17g3" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zru5MH" prefix="r4833" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4533038066610725339"],"question":[0,"What standard JavaScript objects and error types does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports `Promise`, `Map`, `Set`, `WeakMap`, `WeakSet`, typed arrays (Int8Array, Uint8Array, etc.), `JSON`, `Date`, `Math`, `RegExp`, `Proxy`, `Reflect`, and standard error types (Error, TypeError, RangeError, etc.)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-standard-javascript-objects-and-error-types-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-standard-javascript-objects-and-error-types-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-standard-javascript-objects-and-error-types-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What standard JavaScript objects and error types does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports <code>Promise</code>, <code>Map</code>, <code>Set</code>, <code>WeakMap</code>, <code>WeakSet</code>, typed arrays (Int8Array, Uint8Array, etc.), <code>JSON</code>, <code>Date</code>, <code>Math</code>, <code>RegExp</code>, <code>Proxy</code>, <code>Reflect</code>, and standard error types (Error, TypeError, RangeError, etc.).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="IiPgw" prefix="r4834" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4790000368424550934"],"question":[0,"What encoding APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports `atob`, `btoa`, `TextEncoder`, `TextDecoder`, and their stream variants (`TextEncoderStream`, `TextDecoderStream`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-encoding-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-encoding-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-encoding-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What encoding APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports <code>atob</code>, <code>btoa</code>, <code>TextEncoder</code>, <code>TextDecoder</code>, and their stream variants (<code>TextEncoderStream</code>, <code>TextDecoderStream</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18Sj4G" prefix="r4835" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5104384563979630451"],"question":[0,"Can you access environment variables using `process.env` in the Edge Runtime?"],"answer":[0,"Yes. The Edge Runtime supports using `process.env` to access environment variables for both `next dev` and `next build`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-access-environment-variables-using-process-env-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-access-environment-variables-using-process-env-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-access-environment-variables-using-process-env-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you access environment variables using `process.env` in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The Edge Runtime supports using <code>process.env</code> to access environment variables for both <code>next dev</code> and <code>next build</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1gJDeH" prefix="r4836" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6777453658758532875"],"question":[0,"What happens if you try to use a library that depends on Node.js APIs in the Edge Runtime?"],"answer":[0,"Any third-party npm package that relies on Node.js-specific APIs will not work in the Edge Runtime and will throw runtime errors. For example, packages like `jsonwebtoken` (which depend on Node's crypto module) will fail. You need to use edge-compatible alternatives like the `jose` library instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/node-module-in-edge-runtime"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-try-to-use-a-library-that-depends-on-node-js-apis-in-the-edg"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-try-to-use-a-library-that-depends-on-node-js-apis-in-the-edg" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-try-to-use-a-library-that-depends-on-node-js-apis-in-the-edg" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you try to use a library that depends on Node.js APIs in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any third-party npm package that relies on Node.js-specific APIs will not work in the Edge Runtime and will throw runtime errors. For example, packages like <code>jsonwebtoken</code> (which depend on Node's crypto module) will fail. You need to use edge-compatible alternatives like the <code>jose</code> library instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/node-module-in-edge-runtime" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KsP3b" prefix="r4837" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7534661344323074529"],"question":[0,"Can you use `require()` directly in the Edge Runtime?"],"answer":[0,"No. Calling `require` directly is not allowed in the Edge Runtime. You must use ES Modules instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-directly-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-directly-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-directly-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `require()` directly in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Calling <code>require</code> directly is not allowed in the Edge Runtime. You must use ES Modules instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DrJ9P" prefix="r4838" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8571191888065521266"],"question":[0,"What Stream APIs does the Edge Runtime support?"],"answer":[0,"The Edge Runtime supports `ReadableStream`, `WritableStream`, `TransformStream`, and associated reader/writer classes (`WritableStreamDefaultWriter`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-stream-apis-does-the-edge-runtime-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-stream-apis-does-the-edge-runtime-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-stream-apis-does-the-edge-runtime-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Stream APIs does the Edge Runtime support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime supports <code>ReadableStream</code>, <code>WritableStream</code>, <code>TransformStream</code>, and associated reader/writer classes (<code>WritableStreamDefaultWriter</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1FjoMm" prefix="r4839" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10673236253930253008"],"question":[0,"Is `eval()` supported in the Edge Runtime?"],"answer":[0,"No. `eval()` is disabled and will fail at runtime in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"is-eval-supported-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-eval-supported-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-eval-supported-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is `eval()` supported in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. <code>eval()</code> is disabled and will fail at runtime in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZOFkQy" prefix="r4840" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10912812141431979571"],"question":[0,"Can you read environment variables dynamically from `process.env` in the Edge Runtime?"],"answer":[0,"No. During the build process, Next.js uses the Webpack DefinePlugin to replace environment variable values in the locations of use, so you cannot have dynamic reads from `process.env` (e.g., `process.env[variableName]`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/44628"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-read-environment-variables-dynamically-from-process-env-in-the-edge-runt"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-read-environment-variables-dynamically-from-process-env-in-the-edge-runt" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-read-environment-variables-dynamically-from-process-env-in-the-edge-runt" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you read environment variables dynamically from `process.env` in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. During the build process, Next.js uses the Webpack DefinePlugin to replace environment variable values in the locations of use, so you cannot have dynamic reads from <code>process.env</code> (e.g., <code>process.env[variableName]</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/44628" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1q9ch5" prefix="r4841" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11125746230411002336"],"question":[0,"Does the Edge Runtime support the `Event` and `EventTarget` APIs?"],"answer":[0,"Yes. The Edge Runtime supports `Event`, `EventTarget`, `FetchEvent`, and `PromiseRejectionEvent`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-the-event-and-eventtarget-apis"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-the-event-and-eventtarget-apis" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-the-event-and-eventtarget-apis" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support the `Event` and `EventTarget` APIs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The Edge Runtime supports <code>Event</code>, <code>EventTarget</code>, <code>FetchEvent</code>, and <code>PromiseRejectionEvent</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sDz6Y" prefix="r4842" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13161965349579426019"],"question":[0,"How should you handle WASM imports in the Edge Runtime?"],"answer":[0,"When importing WebAssembly modules in the Edge Runtime, imports are required to have the `?module` suffix. For example: `import('arcjet.component.wasm?module')`. The Edge platform detects this and instantiates the WebAssembly.Module."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-dynamic-wasm-compilation"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-handle-wasm-imports-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-handle-wasm-imports-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-handle-wasm-imports-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you handle WASM imports in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When importing WebAssembly modules in the Edge Runtime, imports are required to have the <code>?module</code> suffix. For example: <code>import('arcjet.component.wasm?module')</code>. The Edge platform detects this and instantiates the WebAssembly.Module.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-dynamic-wasm-compilation" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2d6TcH" prefix="r4843" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13589173151014492087"],"question":[0,"Does the Edge Runtime support the `Intl` internationalization API?"],"answer":[0,"Yes. The Edge Runtime supports the JavaScript `Intl` object for internationalization formatting (dates, numbers, currencies, etc.)."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/edge-runtime/blob/main/docs/pages/features/available-apis.mdx"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-the-intl-internationalization-api"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-the-intl-internationalization-api" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-the-intl-internationalization-api" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support the `Intl` internationalization API?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The Edge Runtime supports the JavaScript <code>Intl</code> object for internationalization formatting (dates, numbers, currencies, etc.).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/edge-runtime/blob/main/docs/pages/features/available-apis.mdx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzjlIA" prefix="r4844" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13960556126706113215"],"question":[0,"Are environment variables prefixed with `NEXT_PUBLIC_` required for Edge Runtime in production?"],"answer":[0,"When deploying to Vercel, environment variables in `.env*` files will not be made available to Edge Runtime unless their name is prefixed with `NEXT_PUBLIC_`. It is recommended to manage environment variables in Project Settings instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/44628"]]],"topic":[0,"nextjs"],"slug":[0,"are-environment-variables-prefixed-with-next-public-required-for-edge-runtime-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-environment-variables-prefixed-with-next-public-required-for-edge-runtime-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-environment-variables-prefixed-with-next-public-required-for-edge-runtime-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are environment variables prefixed with `NEXT_PUBLIC_` required for Edge Runtime in production?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When deploying to Vercel, environment variables in <code>.env*</code> files will not be made available to Edge Runtime unless their name is prefixed with <code>NEXT_PUBLIC_</code>. It is recommended to manage environment variables in Project Settings instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/44628" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aeT0E" prefix="r4845" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14240997095663756813"],"question":[0,"Are `WebAssembly.compile()` and `WebAssembly.instantiate()` supported in the Edge Runtime?"],"answer":[0,"No. Both `WebAssembly.compile()` and `WebAssembly.instantiate()` are disabled and will fail at runtime in the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"are-webassembly-compile-and-webassembly-instantiate-supported-in-the-edge-runtim"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-webassembly-compile-and-webassembly-instantiate-supported-in-the-edge-runtim" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-webassembly-compile-and-webassembly-instantiate-supported-in-the-edge-runtim" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are `WebAssembly.compile()` and `WebAssembly.instantiate()` supported in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Both <code>WebAssembly.compile()</code> and <code>WebAssembly.instantiate()</code> are disabled and will fail at runtime in the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="error-handling-expected-error-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Error Handling > Expected Error Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="16Hhy2" prefix="r4846" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"220999217046568567"],"question":[0,"Where can redirect() be called after try/catch to avoid it being caught in Next.js?"],"answer":[0,"Call redirect() after the entire try/catch block. It can also be placed in a finally block, or inside a catch block if it's the final action in error handling."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-redirect-be-called-after-try-catch-to-avoid-it-being-caught-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-redirect-be-called-after-try-catch-to-avoid-it-being-caught-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-redirect-be-called-after-try-catch-to-avoid-it-being-caught-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can redirect() be called after try/catch to avoid it being caught in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Call redirect() after the entire try/catch block. It can also be placed in a finally block, or inside a catch block if it's the final action in error handling.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2qXTL6" prefix="r4847" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"755930746254468724"],"question":[0,"What is the default value for the type parameter in redirect() for Server Actions vs other contexts in Next.js?"],"answer":[0,"By default, redirect will use RedirectType.push (adding a new entry to the browser history stack) in Server Actions and RedirectType.replace (replacing the current URL in the browser history stack) everywhere else."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-type-parameter-in-redirect-for-server-actions-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-type-parameter-in-redirect-for-server-actions-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-type-parameter-in-redirect-for-server-actions-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the type parameter in redirect() for Server Actions vs other contexts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, redirect will use RedirectType.push (adding a new entry to the browser history stack) in Server Actions and RedirectType.replace (replacing the current URL in the browser history stack) everywhere else.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kzDvN" prefix="r4848" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1056452136145984015"],"question":[0,"How does using useActionState change the signature of a Server Action in Next.js?"],"answer":[0,"When using useActionState, the Server function signature changes to receive a new prevState or initialState parameter as its first argument. The function changes from `async function action(formData: FormData)` to `async function action(prevState: any, formData: FormData)`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-using-useactionstate-change-the-signature-of-a-server-action-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-using-useactionstate-change-the-signature-of-a-server-action-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-using-useactionstate-change-the-signature-of-a-server-action-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does using useActionState change the signature of a Server Action in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using useActionState, the Server function signature changes to receive a new prevState or initialState parameter as its first argument. The function changes from <code>async function action(formData: FormData)</code> to <code>async function action(prevState: any, formData: FormData)</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfOE8C" prefix="r4849" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1165231485712051263"],"question":[0,"What hook should you use to handle expected errors in Server Functions in Next.js?"],"answer":[0,"Use the useActionState hook to manage expected errors in Server Functions. This approach helps avoid using try/catch blocks for expected errors, which should be treated as return values rather than thrown exceptions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-hook-should-you-use-to-handle-expected-errors-in-server-functions-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-hook-should-you-use-to-handle-expected-errors-in-server-functions-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-hook-should-you-use-to-handle-expected-errors-in-server-functions-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What hook should you use to handle expected errors in Server Functions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the useActionState hook to manage expected errors in Server Functions. This approach helps avoid using try/catch blocks for expected errors, which should be treated as return values rather than thrown exceptions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mMM91" prefix="r4850" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1322140640342340434"],"question":[0,"How should you handle expected errors in Server Components when fetching data in Next.js?"],"answer":[0,"Check the fetch response and conditionally render error messaging or redirect based on the res.ok status. Example: `if (!res.ok) { return 'There was an error.' }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-handle-expected-errors-in-server-components-when-fetching-data-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-handle-expected-errors-in-server-components-when-fetching-data-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-handle-expected-errors-in-server-components-when-fetching-data-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you handle expected errors in Server Components when fetching data in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Check the fetch response and conditionally render error messaging or redirect based on the res.ok status. Example: <code>if (!res.ok) { return 'There was an error.' }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="oyO3x" prefix="r4851" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1589578069611058276"],"question":[0,"How does redirect() behave in streaming contexts in Next.js?"],"answer":[0,"In streaming contexts, redirect() will insert a meta tag to emit the redirect on the client side rather than using traditional HTTP redirects."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-redirect-behave-in-streaming-contexts-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-redirect-behave-in-streaming-contexts-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-redirect-behave-in-streaming-contexts-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does redirect() behave in streaming contexts in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In streaming contexts, redirect() will insert a meta tag to emit the redirect on the client side rather than using traditional HTTP redirects.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1z2Ttj" prefix="r4852" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2550045319468869295"],"question":[0,"What is the definition of an expected error in Next.js?"],"answer":[0,"Expected errors are those that can occur during the normal operation of the application, such as those from server-side form validation or failed requests. They should be handled explicitly and returned to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-definition-of-an-expected-error-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-definition-of-an-expected-error-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-definition-of-an-expected-error-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the definition of an expected error in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Expected errors are those that can occur during the normal operation of the application, such as those from server-side form validation or failed requests. They should be handled explicitly and returned to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBxx9o" prefix="r4853" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3921811938264471356"],"question":[0,"What HTTP status codes does not-found.js return for streamed vs non-streamed responses in Next.js?"],"answer":[0,"For streamed responses, not-found.js returns a 200 HTTP status code. For non-streamed responses, it returns a 404 HTTP status code."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-codes-does-not-found-js-return-for-streamed-vs-non-streamed-res"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-codes-does-not-found-js-return-for-streamed-vs-non-streamed-res" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-codes-does-not-found-js-return-for-streamed-vs-non-streamed-res" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status codes does not-found.js return for streamed vs non-streamed responses in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For streamed responses, not-found.js returns a 200 HTTP status code. For non-streamed responses, it returns a 404 HTTP status code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1C6Kdr" prefix="r4854" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4414862024481893583"],"question":[0,"What experimental flag must be enabled to use global-not-found.js in Next.js?"],"answer":[0,"You need to add the globalNotFound flag in next.config.ts with `experimental: { globalNotFound: true }`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-experimental-flag-must-be-enabled-to-use-global-not-found-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-experimental-flag-must-be-enabled-to-use-global-not-found-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-experimental-flag-must-be-enabled-to-use-global-not-found-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What experimental flag must be enabled to use global-not-found.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You need to add the globalNotFound flag in next.config.ts with <code>experimental: { globalNotFound: true }</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2puA8D" prefix="r4855" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5974065461537612076"],"question":[0,"What must a global-not-found.js file return that a regular not-found.js file does not in Next.js?"],"answer":[0,"Unlike not-found.js, the global-not-found.js file must return a full HTML document, including <html> and <body> tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-a-global-not-found-js-file-return-that-a-regular-not-found-js-file-doe"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-a-global-not-found-js-file-return-that-a-regular-not-found-js-file-doe" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-a-global-not-found-js-file-return-that-a-regular-not-found-js-file-doe" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must a global-not-found.js file return that a regular not-found.js file does not in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unlike not-found.js, the global-not-found.js file must return a full HTML document, including <html> and <body> tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11hkBV" prefix="r4856" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7325196937505184389"],"question":[0,"What error does the notFound() function throw in Next.js?"],"answer":[0,"The notFound() function throws a NEXT_HTTP_ERROR_FALLBACK;404 error and terminates rendering of the route segment where invoked."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-does-the-notfound-function-throw-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-does-the-notfound-function-throw-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-does-the-notfound-function-throw-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error does the notFound() function throw in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The notFound() function throws a NEXT_HTTP_ERROR_FALLBACK;404 error and terminates rendering of the route segment where invoked.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ufVVC" prefix="r4857" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9046096359386318214"],"question":[0,"What error does the redirect() function throw in Next.js?"],"answer":[0,"Invoking the redirect() function throws a NEXT_REDIRECT error and terminates rendering of the route segment in which it was thrown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-does-the-redirect-function-throw-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-does-the-redirect-function-throw-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-does-the-redirect-function-throw-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error does the redirect() function throw in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Invoking the redirect() function throws a NEXT_REDIRECT error and terminates rendering of the route segment in which it was thrown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1rxsSC" prefix="r4858" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9510708635694676327"],"question":[0,"In what version was the notFound() function introduced in Next.js?"],"answer":[0,"The notFound() function was introduced in Next.js v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-version-was-the-notfound-function-introduced-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-version-was-the-notfound-function-introduced-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-version-was-the-notfound-function-introduced-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what version was the notFound() function introduced in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The notFound() function was introduced in Next.js v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LltRJ" prefix="r4859" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9730270724382777585"],"question":[0,"What function should you use to handle expected 404 errors in Next.js?"],"answer":[0,"Use the notFound() function within route segments and create a not-found.js file to display custom 404 UI when resources don't exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-should-you-use-to-handle-expected-404-errors-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-should-you-use-to-handle-expected-404-errors-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-should-you-use-to-handle-expected-404-errors-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function should you use to handle expected 404 errors in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the notFound() function within route segments and create a not-found.js file to display custom 404 UI when resources don't exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rhIfp" prefix="r4860" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10346075534866244279"],"question":[0,"Does the not-found.js component accept any props in Next.js?"],"answer":[0,"No. The not-found.js or global-not-found.js components do not accept any props."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-not-found-js-component-accept-any-props-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-not-found-js-component-accept-any-props-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-not-found-js-component-accept-any-props-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the not-found.js component accept any props in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The not-found.js or global-not-found.js components do not accept any props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LPLuF" prefix="r4861" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10384417925936307893"],"question":[0,"What meta tag does Next.js automatically inject when notFound() is called?"],"answer":[0,"Next.js automatically injects `<meta name=\"robots\" content=\"noindex\" />` tag to prevent search engines from indexing 404 pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-meta-tag-does-next-js-automatically-inject-when-notfound-is-called"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-meta-tag-does-next-js-automatically-inject-when-notfound-is-called" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-meta-tag-does-next-js-automatically-inject-when-notfound-is-called" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What meta tag does Next.js automatically inject when notFound() is called?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically injects <code><meta name="robots" content="noindex" /></code> tag to prevent search engines from indexing 404 pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UwzvF" prefix="r4862" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10520993538036888363"],"question":[0,"Can you export metadata from global-not-found.js in Next.js?"],"answer":[0,"Yes. For global-not-found.js, you can export a metadata object or a generateMetadata function to customize the <title>, <meta>, and other head tags for your 404 page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-export-metadata-from-global-not-found-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-export-metadata-from-global-not-found-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-export-metadata-from-global-not-found-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you export metadata from global-not-found.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. For global-not-found.js, you can export a metadata object or a generateMetadata function to customize the <title>, <meta>, and other head tags for your 404 page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24KpMT" prefix="r4863" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10590784005477479246"],"question":[0,"What TypeScript return type does the notFound() function have in Next.js?"],"answer":[0,"The notFound() function returns never (TypeScript type), meaning it never actually returns. Therefore, you don't need to use `return notFound()` explicitly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-return-type-does-the-notfound-function-have-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-return-type-does-the-notfound-function-have-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-return-type-does-the-notfound-function-have-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript return type does the notFound() function have in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The notFound() function returns never (TypeScript type), meaning it never actually returns. Therefore, you don't need to use <code>return notFound()</code> explicitly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kadm6" prefix="r4864" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13008741762375214161"],"question":[0,"Can redirect() be called in Client Component event handlers in Next.js?"],"answer":[0,"No. redirect() can be called in Client Components during the rendering process but not in event handlers. For event handlers, use the useRouter hook instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"can-redirect-be-called-in-client-component-event-handlers-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-redirect-be-called-in-client-component-event-handlers-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-redirect-be-called-in-client-component-event-handlers-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can redirect() be called in Client Component event handlers in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. redirect() can be called in Client Components during the rendering process but not in event handlers. For event handlers, use the useRouter hook instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBpcKk" prefix="r4865" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13061762463832919833"],"question":[0,"Should redirect() be called inside or outside of try/catch blocks in Next.js?"],"answer":[0,"redirect() should be called outside the try block when using try/catch statements, because redirect works by throwing an error which would be caught by the catch block."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"should-redirect-be-called-inside-or-outside-of-try-catch-blocks-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-redirect-be-called-inside-or-outside-of-try-catch-blocks-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-redirect-be-called-inside-or-outside-of-try-catch-blocks-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should redirect() be called inside or outside of try/catch blocks in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() should be called outside the try block when using try/catch statements, because redirect works by throwing an error which would be caught by the catch block.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjBlnM" prefix="r4866" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13315812467447492846"],"question":[0,"What is the definition of an unexpected error (uncaught exception) in Next.js?"],"answer":[0,"Uncaught exceptions are unexpected errors that indicate bugs or issues that should not occur during the normal flow of your application. These should be handled by throwing errors, which will then be caught by error boundaries."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-definition-of-an-unexpected-error-uncaught-exception-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-definition-of-an-unexpected-error-uncaught-exception-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-definition-of-an-unexpected-error-uncaught-exception-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the definition of an unexpected error (uncaught exception) in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Uncaught exceptions are unexpected errors that indicate bugs or issues that should not occur during the normal flow of your application. These should be handled by throwing errors, which will then be caught by error boundaries.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ekD6s" prefix="r4867" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13633752096539680902"],"question":[0,"What are the two parameters accepted by the redirect() function in Next.js?"],"answer":[0,"redirect() accepts two parameters: path (string) - the URL to redirect to (supporting relative or absolute paths), and type (optional) - either RedirectType.replace or RedirectType.push."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-parameters-accepted-by-the-redirect-function-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-parameters-accepted-by-the-redirect-function-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-parameters-accepted-by-the-redirect-function-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two parameters accepted by the redirect() function in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() accepts two parameters: path (string) - the URL to redirect to (supporting relative or absolute paths), and type (optional) - either RedirectType.replace or RedirectType.push.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jhqu9" prefix="r4868" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14202597239833013707"],"question":[0,"Does notFound() take precedence over error.tsx in Next.js?"],"answer":[0,"Yes. notFound will take precedence over error.tsx, so you can use it when you want to handle more specific errors like missing resources."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"does-notfound-take-precedence-over-error-tsx-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-notfound-take-precedence-over-error-tsx-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-notfound-take-precedence-over-error-tsx-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does notFound() take precedence over error.tsx in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. notFound will take precedence over error.tsx, so you can use it when you want to handle more specific errors like missing resources.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24I4Lu" prefix="r4869" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14596128707420684129"],"question":[0,"What HTTP status code does redirect() return when used in Server Actions in Next.js?"],"answer":[0,"When used in a Server Action, redirect() will serve a 303 HTTP redirect response to the caller. The 303 (See Other) status code mandates that the redirect is followed with a GET request, even if the original request was POST."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-when-used-in-server-actions-in-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-when-used-in-server-actions-in-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-when-used-in-server-actions-in-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return when used in Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When used in a Server Action, redirect() will serve a 303 HTTP redirect response to the caller. The 303 (See Other) status code mandates that the redirect is followed with a GET request, even if the original request was POST.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="font-optimization" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Font Optimization</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZRX12R" prefix="r4870" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"225515786984841891"],"question":[0,"What is the recommended best practice for using the same font in multiple files?"],"answer":[0,"Create a shared font utility file (e.g., `app/fonts.js`) that exports font objects, then import them where needed. This ensures the font is hosted as one instance rather than creating multiple instances."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-best-practice-for-using-the-same-font-in-multiple-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-best-practice-for-using-the-same-font-in-multiple-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-best-practice-for-using-the-same-font-in-multiple-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended best practice for using the same font in multiple files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a shared font utility file (e.g., <code>app/fonts.js</code>) that exports font objects, then import them where needed. This ensures the font is hosted as one instance rather than creating multiple instances.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BFAwv" prefix="r4871" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"394592700802866415"],"question":[0,"Are all Google Fonts available through next/font/google?"],"answer":[0,"Yes, next/font allows you to conveniently use all Google Fonts. You can reference the complete Google Fonts catalog and import any of them using next/font/google."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"are-all-google-fonts-available-through-next-font-google"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-all-google-fonts-available-through-next-font-google" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-all-google-fonts-available-through-next-font-google" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are all Google Fonts available through next/font/google?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, next/font allows you to conveniently use all Google Fonts. You can reference the complete Google Fonts catalog and import any of them using next/font/google.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="4rrY1" prefix="r4872" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"398670354785401254"],"question":[0,"When are fonts downloaded and hosted with next/font?"],"answer":[0,"CSS and font files are downloaded at build time and self-hosted with the rest of your static assets. No requests are sent to Google by the browser at runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/pages/building-your-application/optimizing/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-fonts-downloaded-and-hosted-with-next-font"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-fonts-downloaded-and-hosted-with-next-font" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-fonts-downloaded-and-hosted-with-next-font" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are fonts downloaded and hosted with next/font?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CSS and font files are downloaded at build time and self-hosted with the rest of your static assets. No requests are sent to Google by the browser at runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/pages/building-your-application/optimizing/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zwM8H" prefix="r4873" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"450587439557143453"],"question":[0,"What is the `variable` parameter used for in next/font?"],"answer":[0,"The `variable` parameter is a string that defines a CSS variable name (e.g., `'--my-font'`). You can then apply it using `className={font.variable}` and reference it in CSS as `var(--my-font)`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-variable-parameter-used-for-in-next-font"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-variable-parameter-used-for-in-next-font" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-variable-parameter-used-for-in-next-font" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the `variable` parameter used for in next/font?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>variable</code> parameter is a string that defines a CSS variable name (e.g., <code>'--my-font'</code>). You can then apply it using <code>className={font.variable}</code> and reference it in CSS as <code>var(--my-font)</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZkTEPx" prefix="r4874" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2164521276779967845"],"question":[0,"What is the `axes` parameter used for in next/font/google?"],"answer":[0,"The `axes` parameter is an array that allows you to specify custom axes for variable fonts beyond weight (e.g., `['slnt']`). You can find possible axes values by filtering on the Google variable fonts page for axes other than `wght`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-axes-parameter-used-for-in-next-font-google"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-axes-parameter-used-for-in-next-font-google" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-axes-parameter-used-for-in-next-font-google" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the `axes` parameter used for in next/font/google?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>axes</code> parameter is an array that allows you to specify custom axes for variable fonts beyond weight (e.g., <code>['slnt']</code>). You can find possible axes values by filtering on the Google variable fonts page for axes other than <code>wght</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23L7hE" prefix="r4875" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2347816080037359401"],"question":[0,"What warning occurs when using next/font/google with preload enabled but no subsets specified?"],"answer":[0,"Failing to specify any subsets while `preload` is true will result in a warning. You must define which subsets you want to preload (e.g., `subsets: ['latin']`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-warning-occurs-when-using-next-font-google-with-preload-enabled-but-no-subs"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-warning-occurs-when-using-next-font-google-with-preload-enabled-but-no-subs" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-warning-occurs-when-using-next-font-google-with-preload-enabled-but-no-subs" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What warning occurs when using next/font/google with preload enabled but no subsets specified?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Failing to specify any subsets while <code>preload</code> is true will result in a warning. You must define which subsets you want to preload (e.g., <code>subsets: ['latin']</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jVJ8S" prefix="r4876" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2929330939074568923"],"question":[0,"What is the required parameter for non-variable fonts in next/font/google?"],"answer":[0,"The `weight` parameter is required for non-variable fonts. It accepts either a string (e.g., `'400'`) or an array of strings (e.g., `['400', '700']`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-parameter-for-non-variable-fonts-in-next-font-google"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-parameter-for-non-variable-fonts-in-next-font-google" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-parameter-for-non-variable-fonts-in-next-font-google" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required parameter for non-variable fonts in next/font/google?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>weight</code> parameter is required for non-variable fonts. It accepts either a string (e.g., <code>'400'</code>) or an array of strings (e.g., <code>['400', '700']</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zs0jH0" prefix="r4877" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3236670820540621988"],"question":[0,"What is the required parameter for next/font/local?"],"answer":[0,"The `src` parameter is required. It can be either a string (single file path) or an array of objects with `{path, weight?, style?}` structure."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-required-parameter-for-next-font-local"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-required-parameter-for-next-font-local" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-required-parameter-for-next-font-local" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the required parameter for next/font/local?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>src</code> parameter is required. It can be either a string (single file path) or an array of objects with <code>{path, weight?, style?}</code> structure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1l3sf9" prefix="r4878" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3631080733026583795"],"question":[0,"What is the default value of `adjustFontFallback` for next/font/google?"],"answer":[0,"The default is `true`. This boolean sets whether an automatic fallback font should be used to reduce Cumulative Layout Shift. Next.js automatically sets your fallback font to either Arial or Times New Roman depending on the font type (serif vs sans-serif)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-adjustfontfallback-for-next-font-google"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-adjustfontfallback-for-next-font-google" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-adjustfontfallback-for-next-font-google" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `adjustFontFallback` for next/font/google?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is <code>true</code>. This boolean sets whether an automatic fallback font should be used to reduce Cumulative Layout Shift. Next.js automatically sets your fallback font to either Arial or Times New Roman depending on the font type (serif vs sans-serif).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fm1P2" prefix="r4879" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4770475167964031350"],"question":[0,"What format should the `src` parameter use for multiple font files in next/font/local?"],"answer":[0,"The `src` parameter can be an array of objects with the structure `Array<{path: string, weight?: string, style?: string}>`. Each object specifies the path, weight (optional), and style (optional) for that font variant."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-should-the-src-parameter-use-for-multiple-font-files-in-next-font-lo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-should-the-src-parameter-use-for-multiple-font-files-in-next-font-lo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-should-the-src-parameter-use-for-multiple-font-files-in-next-font-lo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format should the `src` parameter use for multiple font files in next/font/local?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>src</code> parameter can be an array of objects with the structure <code>Array<{path: string, weight?: string, style?: string}></code>. Each object specifies the path, weight (optional), and style (optional) for that font variant.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2j3Bpa" prefix="r4880" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5708386055817856893"],"question":[0,"What type of fonts does Next.js recommend for best performance?"],"answer":[0,"Variable fonts are recommended for the best performance and flexibility."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-fonts-does-next-js-recommend-for-best-performance"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-fonts-does-next-js-recommend-for-best-performance" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-fonts-does-next-js-recommend-for-best-performance" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of fonts does Next.js recommend for best performance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Variable fonts are recommended for the best performance and flexibility.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="AexOk" prefix="r4881" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6235500611099580103"],"question":[0,"What is the default value of `adjustFontFallback` for next/font/local?"],"answer":[0,"The default is `'Arial'`. Possible values are `'Arial'`, `'Times New Roman'`, or `false`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-adjustfontfallback-for-next-font-local"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-adjustfontfallback-for-next-font-local" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-adjustfontfallback-for-next-font-local" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `adjustFontFallback` for next/font/local?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default is <code>'Arial'</code>. Possible values are <code>'Arial'</code>, <code>'Times New Roman'</code>, or <code>false</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ltg0D" prefix="r4882" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9125499557043297899"],"question":[0,"Is the `weight` parameter required for variable fonts in next/font/google?"],"answer":[0,"No, the weight parameter is not required for variable fonts. However, for non-variable fonts, weight is required and must be either a string (e.g., `'400'`) or an array of strings (e.g., `['400', '700']`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-weight-parameter-required-for-variable-fonts-in-next-font-google"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-weight-parameter-required-for-variable-fonts-in-next-font-google" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-weight-parameter-required-for-variable-fonts-in-next-font-google" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the `weight` parameter required for variable fonts in next/font/google?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the weight parameter is not required for variable fonts. However, for non-variable fonts, weight is required and must be either a string (e.g., <code>'400'</code>) or an array of strings (e.g., <code>['400', '700']</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NgxMP" prefix="r4883" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9179023085293419499"],"question":[0,"How does font preloading work differently between unique pages and the custom App file?"],"answer":[0,"For unique pages, fonts are preloaded only on that specific route. For the custom App file (Pages Router), fonts are preloaded on all routes under `/pages`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-font-preloading-work-differently-between-unique-pages-and-the-custom-ap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-font-preloading-work-differently-between-unique-pages-and-the-custom-ap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-font-preloading-work-differently-between-unique-pages-and-the-custom-ap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does font preloading work differently between unique pages and the custom App file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For unique pages, fonts are preloaded only on that specific route. For the custom App file (Pages Router), fonts are preloaded on all routes under <code>/pages</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mctuM" prefix="r4884" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9601625023269748270"],"question":[0,"What Core Web Vitals metrics does next/font improve?"],"answer":[0,"next/font improves First Contentful Paint (FCP) and Largest Contentful Paint (LCP) by inlining font CSS at build time, eliminating an extra round trip to fetch font declarations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn-pages-router/seo/improve/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"what-core-web-vitals-metrics-does-next-font-improve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-core-web-vitals-metrics-does-next-font-improve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-core-web-vitals-metrics-does-next-font-improve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Core Web Vitals metrics does next/font improve?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next/font improves First Contentful Paint (FCP) and Largest Contentful Paint (LCP) by inlining font CSS at build time, eliminating an extra round trip to fetch font declarations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn-pages-router/seo/improve/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zDBGk" prefix="r4885" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10112236041621678257"],"question":[0,"What is the default value of `display` in next/font as of Next.js 13.2?"],"answer":[0,"The default value is `'swap'`. Next.js 13.2 changed the default from `'optional'` to `'swap'`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-display-in-next-font-as-of-next-js-13-2"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-display-in-next-font-as-of-next-js-13-2" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-display-in-next-font-as-of-next-js-13-2" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of `display` in next/font as of Next.js 13.2?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is <code>'swap'</code>. Next.js 13.2 changed the default from <code>'optional'</code> to <code>'swap'</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPyCW9" prefix="r4886" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10187403795870312179"],"question":[0,"What are the two main modules for font optimization in Next.js?"],"answer":[0,"The two main modules are `next/font/google` for Google Fonts and `next/font/local` for local/custom font files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-modules-for-font-optimization-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-modules-for-font-optimization-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-modules-for-font-optimization-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main modules for font optimization in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The two main modules are <code>next/font/google</code> for Google Fonts and <code>next/font/local</code> for local/custom font files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Y4R10" prefix="r4887" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10230709072181665158"],"question":[0,"What is the `declarations` parameter used for in next/font/local?"],"answer":[0,"The `declarations` parameter accepts an array of font face descriptor key-value pairs (e.g., `[{ prop: 'font-feature-settings', value: 'ss02' }]`) that define additional @font-face properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-declarations-parameter-used-for-in-next-font-local"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-declarations-parameter-used-for-in-next-font-local" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-declarations-parameter-used-for-in-next-font-local" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the `declarations` parameter used for in next/font/local?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>declarations</code> parameter accepts an array of font face descriptor key-value pairs (e.g., <code>[{ prop: 'font-feature-settings', value: 'ss02' }]</code>) that define additional @font-face properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqzOt9" prefix="r4888" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10619281458981456196"],"question":[0,"Where can local font files be stored in a Next.js project?"],"answer":[0,"Local fonts can be stored in the `public` folder or co-located within the `app` folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-local-font-files-be-stored-in-a-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-local-font-files-be-stored-in-a-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-local-font-files-be-stored-in-a-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can local font files be stored in a Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Local fonts can be stored in the <code>public</code> folder or co-located within the <code>app</code> folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wpzNB" prefix="r4889" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13224157846401983681"],"question":[0,"How does next/font prevent layout shift (CLS)?"],"answer":[0,"next/font calculates font override metrics (size-adjust, ascent-override, descent-override, line-gap-override) based on the actual font files at build time, generating a fallback font that matches the spacing of your custom font."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/blog/nextjs-next-font"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-font-prevent-layout-shift-cls"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-font-prevent-layout-shift-cls" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-font-prevent-layout-shift-cls" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does next/font prevent layout shift (CLS)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>next/font calculates font override metrics (size-adjust, ascent-override, descent-override, line-gap-override) based on the actual font files at build time, generating a fallback font that matches the spacing of your custom font.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/blog/nextjs-next-font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16N23D" prefix="r4890" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14169428843613459540"],"question":[0,"What happens if you call the font loader function multiple times in different files?"],"answer":[0,"Each time you call the localFont or Google font function, that font will be hosted as one instance in your application. To avoid multiple instances, load the font in one place and import the font object where needed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-call-the-font-loader-function-multiple-times-in-different-fi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-call-the-font-loader-function-multiple-times-in-different-fi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-call-the-font-loader-function-multiple-times-in-different-fi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you call the font loader function multiple times in different files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each time you call the localFont or Google font function, that font will be hosted as one instance in your application. To avoid multiple instances, load the font in one place and import the font object where needed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bra3M" prefix="r4891" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14740703920520799526"],"question":[0,"How should Google Font names with multiple words be imported in next/font?"],"answer":[0,"Font names with multiple words must use underscores. For example, 'Roboto Mono' should be imported as `Roboto_Mono`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/optimizing/fonts"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-google-font-names-with-multiple-words-be-imported-in-next-font"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-google-font-names-with-multiple-words-be-imported-in-next-font" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-google-font-names-with-multiple-words-be-imported-in-next-font" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should Google Font names with multiple words be imported in next/font?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Font names with multiple words must use underscores. For example, 'Roboto Mono' should be imported as <code>Roboto_Mono</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/optimizing/fonts" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="HmaJY" prefix="r4892" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14812633397317215860"],"question":[0,"Does next/font work the same way in both App Router and Pages Router?"],"answer":[0,"The API is the same, but there are differences: In Pages Router, CSS is inlined. In App Router, there is a separate stylesheet. Font preloading also differs: Pages Router preloads on all routes when in the custom App; App Router only preloads fonts on specific layouts where imported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/migrating/app-router-migration"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-font-work-the-same-way-in-both-app-router-and-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-font-work-the-same-way-in-both-app-router-and-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-font-work-the-same-way-in-both-app-router-and-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does next/font work the same way in both App Router and Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The API is the same, but there are differences: In Pages Router, CSS is inlined. In App Router, there is a separate stylesheet. Font preloading also differs: Pages Router preloads on all routes when in the custom App; App Router only preloads fonts on specific layouts where imported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/migrating/app-router-migration" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="n19zz" prefix="r4893" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15055803890811457730"],"question":[0,"What properties does the font function return in next/font?"],"answer":[0,"The font function returns an object with three properties: `.className` (a CSS class string), `.style` (a CSS style object including `style.fontFamily`), and `.variable` (a CSS variable name, if configured)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/font"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-the-font-function-return-in-next-font"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-the-font-function-return-in-next-font" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-the-font-function-return-in-next-font" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does the font function return in next/font?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The font function returns an object with three properties: <code>.className</code> (a CSS class string), <code>.style</code> (a CSS style object including <code>style.fontFamily</code>), and <code>.variable</code> (a CSS variable name, if configured).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/font" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-segment-config-dynamic-route-behavior" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Segment Config > Dynamic Route Behavior</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1AAspt" prefix="r4894" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"535768532307621466"],"question":[0,"What value does params have for a catch-all route [...slug] when visiting /shop/a/b?"],"answer":[0,"{ slug: ['a', 'b'] }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-params-have-for-a-catch-all-route-slug-when-visiting-shop-a-b"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-params-have-for-a-catch-all-route-slug-when-visiting-shop-a-b" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-params-have-for-a-catch-all-route-slug-when-visiting-shop-a-b" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does params have for a catch-all route [...slug] when visiting /shop/a/b?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>{ slug: ['a', 'b'] }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="19PJ7u" prefix="r4895" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"539760418744757060"],"question":[0,"Is generateStaticParams called again during revalidation (ISR)?"],"answer":[0,"No, generateStaticParams will not be called again during revalidation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"is-generatestaticparams-called-again-during-revalidation-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-generatestaticparams-called-again-during-revalidation-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-generatestaticparams-called-again-during-revalidation-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is generateStaticParams called again during revalidation (ISR)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, generateStaticParams will not be called again during revalidation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="mWQh5" prefix="r4896" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1710146190206614396"],"question":[0,"What are all the valid values for the dynamic route segment config option?"],"answer":[0,"'auto', 'force-dynamic', 'error', 'force-static'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-valid-values-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-valid-values-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-valid-values-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the valid values for the dynamic route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto', 'force-dynamic', 'error', 'force-static'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27cCVi" prefix="r4897" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2436446463665839702"],"question":[0,"What return type is required from generateStaticParams for a catch-all route like [...slug]?"],"answer":[0,"An array of objects where slug is an array: { slug: string[] }[]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-is-required-from-generatestaticparams-for-a-catch-all-route-lik"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-is-required-from-generatestaticparams-for-a-catch-all-route-lik" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-is-required-from-generatestaticparams-for-a-catch-all-route-lik" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type is required from generateStaticParams for a catch-all route like [...slug]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of objects where slug is an array: { slug: string[] }[]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="JEtza" prefix="r4898" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3214115603143253696"],"question":[0,"What type does the params prop have for a catch-all segment like [...slug]?"],"answer":[0,"string[]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-does-the-params-prop-have-for-a-catch-all-segment-like-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-does-the-params-prop-have-for-a-catch-all-segment-like-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-does-the-params-prop-have-for-a-catch-all-segment-like-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type does the params prop have for a catch-all segment like [...slug]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>string[]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ApDl0" prefix="r4899" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3935659281897561551"],"question":[0,"Can a parent layout's generateStaticParams function generate params for child segments below it?"],"answer":[0,"No. For example, app/products/[category]/layout.js can only generate params for [category], not for child segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"can-a-parent-layout-s-generatestaticparams-function-generate-params-for-child-se"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-a-parent-layout-s-generatestaticparams-function-generate-params-for-child-se" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-a-parent-layout-s-generatestaticparams-function-generate-params-for-child-se" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can a parent layout's generateStaticParams function generate params for child segments below it?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. For example, app/products/[category]/layout.js can only generate params for [category], not for child segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZaDKer" prefix="r4900" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6478333316763201394"],"question":[0,"What type does the params prop have for an optional catch-all segment like [[...slug]]?"],"answer":[0,"string[] | undefined (undefined when the route matches without the parameter)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-does-the-params-prop-have-for-an-optional-catch-all-segment-like-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-does-the-params-prop-have-for-an-optional-catch-all-segment-like-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-does-the-params-prop-have-for-an-optional-catch-all-segment-like-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type does the params prop have for an optional catch-all segment like [[...slug]]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>string[] | undefined (undefined when the route matches without the parameter)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KAgmv" prefix="r4901" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6686693517369146513"],"question":[0,"When does generateStaticParams run in development mode (next dev)?"],"answer":[0,"generateStaticParams is called when you navigate to a route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-run-in-development-mode-next-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-run-in-development-mode-next-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-run-in-development-mode-next-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams run in development mode (next dev)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateStaticParams is called when you navigate to a route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fTkCo" prefix="r4902" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8181931906379859892"],"question":[0,"What two options allow you to enable ISR (Incremental Static Regeneration) for paths at runtime?"],"answer":[0,"You must return an empty array from generateStaticParams or utilize export const dynamic = 'force-static' in order to revalidate (ISR) paths at runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-options-allow-you-to-enable-isr-incremental-static-regeneration-for-pat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-options-allow-you-to-enable-isr-incremental-static-regeneration-for-pat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-options-allow-you-to-enable-isr-incremental-static-regeneration-for-pat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two options allow you to enable ISR (Incremental Static Regeneration) for paths at runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must return an empty array from generateStaticParams or utilize export const dynamic = 'force-static' in order to revalidate (ISR) paths at runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GW8fC" prefix="r4903" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8191731959346540125"],"question":[0,"What Pages Router option does dynamicParams replace in the App Router?"],"answer":[0,"dynamicParams replaces the fallback: true | false | blocking option of getStaticPaths in the pages directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-pages-router-option-does-dynamicparams-replace-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-pages-router-option-does-dynamicparams-replace-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-pages-router-option-does-dynamicparams-replace-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Pages Router option does dynamicParams replace in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>dynamicParams replaces the fallback: true | false | blocking option of getStaticPaths in the pages directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="q5dd0" prefix="r4904" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8569042381077126956"],"question":[0,"What value does params have for an optional catch-all route [[...slug]] when visiting the base route (e.g., /shop)?"],"answer":[0,"{ slug: undefined }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-value-does-params-have-for-an-optional-catch-all-route-slug-when-visiting-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-value-does-params-have-for-an-optional-catch-all-route-slug-when-visiting-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-value-does-params-have-for-an-optional-catch-all-route-slug-when-visiting-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What value does params have for an optional catch-all route [[...slug]] when visiting the base route (e.g., /shop)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>{ slug: undefined }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DVtrd" prefix="r4905" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8887668828771362022"],"question":[0,"What type does the params prop have for a regular dynamic segment like [slug]?"],"answer":[0,"string"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-does-the-params-prop-have-for-a-regular-dynamic-segment-like-slug"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-does-the-params-prop-have-for-a-regular-dynamic-segment-like-slug" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-does-the-params-prop-have-for-a-regular-dynamic-segment-like-slug" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type does the params prop have for a regular dynamic segment like [slug]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>string</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1d91eh" prefix="r4906" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9792352074003908180"],"question":[0,"What happens when dynamicParams is set to true and a user visits a dynamic segment not included in generateStaticParams?"],"answer":[0,"Dynamic segments not included in generateStaticParams are generated on demand using Streaming Server Rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-set-to-true-and-a-user-visits-a-dynamic-segme"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-set-to-true-and-a-user-visits-a-dynamic-segme" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-set-to-true-and-a-user-visits-a-dynamic-segme" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is set to true and a user visits a dynamic segment not included in generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic segments not included in generateStaticParams are generated on demand using Streaming Server Rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2emDUD" prefix="r4907" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10561921596426084552"],"question":[0,"What does dynamic = 'force-dynamic' do?"],"answer":[0,"Forces dynamic rendering, rendering routes for each user at request time. This is equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-force-dynamic-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-force-dynamic-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-force-dynamic-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic = 'force-dynamic' do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Forces dynamic rendering, rendering routes for each user at request time. This is equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1e2zhc" prefix="r4908" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10651149057760288850"],"question":[0,"When does generateStaticParams run during next build?"],"answer":[0,"generateStaticParams runs before the corresponding Layouts or Pages are generated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-run-during-next-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-run-during-next-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-run-during-next-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams run during next build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateStaticParams runs before the corresponding Layouts or Pages are generated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2lyMBM" prefix="r4909" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11678527929780635998"],"question":[0,"What happens when dynamicParams is set to false and a user visits a dynamic segment not included in generateStaticParams?"],"answer":[0,"Dynamic segments not included in generateStaticParams will return a 404."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-dynamicparams-is-set-to-false-and-a-user-visits-a-dynamic-segm"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-dynamicparams-is-set-to-false-and-a-user-visits-a-dynamic-segm" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-dynamicparams-is-set-to-false-and-a-user-visits-a-dynamic-segm" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when dynamicParams is set to false and a user visits a dynamic segment not included in generateStaticParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Dynamic segments not included in generateStaticParams will return a 404.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vxtP0" prefix="r4910" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12050152539337789915"],"question":[0,"What does dynamic = 'force-static' do to dynamic functions like cookies(), headers(), and useSearchParams()?"],"answer":[0,"It forces cookies(), headers() and useSearchParams() to return empty values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-force-static-do-to-dynamic-functions-like-cookies-headers-and-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-force-static-do-to-dynamic-functions-like-cookies-headers-and-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-force-static-do-to-dynamic-functions-like-cookies-headers-and-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic = 'force-static' do to dynamic functions like cookies(), headers(), and useSearchParams()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It forces cookies(), headers() and useSearchParams() to return empty values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1g29sQ" prefix="r4911" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12194038088960969661"],"question":[0,"When dynamic is set to 'error' or 'force-static', what happens to the default value of dynamicParams?"],"answer":[0,"The default of dynamicParams changes from true to false."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"when-dynamic-is-set-to-error-or-force-static-what-happens-to-the-default-value-o"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-dynamic-is-set-to-error-or-force-static-what-happens-to-the-default-value-o" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-dynamic-is-set-to-error-or-force-static-what-happens-to-the-default-value-o" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When dynamic is set to 'error' or 'force-static', what happens to the default value of dynamicParams?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default of dynamicParams changes from true to false.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2uj1uX" prefix="r4912" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12364679010005098916"],"question":[0,"What is the syntax for a catch-all dynamic segment in Next.js?"],"answer":[0,"[...folderName] - for example, app/shop/[...slug]/page.js matches /shop/a, /shop/a/b, /shop/a/b/c, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-a-catch-all-dynamic-segment-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-a-catch-all-dynamic-segment-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-a-catch-all-dynamic-segment-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for a catch-all dynamic segment in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[...folderName] - for example, app/shop/[...slug]/page.js matches /shop/a, /shop/a/b, /shop/a/b/c, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Hd7R3" prefix="r4913" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12412266560962215095"],"question":[0,"How many times is a child generateStaticParams function executed when a parent generateStaticParams generates multiple segments?"],"answer":[0,"The child generateStaticParams function is executed once for each set of params the parent generates."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-is-a-child-generatestaticparams-function-executed-when-a-parent-g"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-is-a-child-generatestaticparams-function-executed-when-a-parent-g" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-is-a-child-generatestaticparams-function-executed-when-a-parent-g" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times is a child generateStaticParams function executed when a parent generateStaticParams generates multiple segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The child generateStaticParams function is executed once for each set of params the parent generates.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1q90gs" prefix="r4914" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12999040139082490792"],"question":[0,"What does dynamic = 'error' do?"],"answer":[0,"Forces static rendering and caches the data of a layout or page by causing an error if any components use dynamic functions or uncached data."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-error-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-error-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-error-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does dynamic = 'error' do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Forces static rendering and caches the data of a layout or page by causing an error if any components use dynamic functions or uncached data.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Yqsiz" prefix="r4915" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13770211055715636845"],"question":[0,"What is the exact syntax to set dynamicParams to false in a Next.js route?"],"answer":[0,"export const dynamicParams = false"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-to-set-dynamicparams-to-false-in-a-next-js-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-to-set-dynamicparams-to-false-in-a-next-js-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-to-set-dynamicparams-to-false-in-a-next-js-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax to set dynamicParams to false in a Next.js route?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>export const dynamicParams = false</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Hqwjo" prefix="r4916" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13806501453391890532"],"question":[0,"What return type is required from generateStaticParams for a route with multiple dynamic segments like [category]/[product]?"],"answer":[0,"An array of objects with both properties: { category: string, product: string }[]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-type-is-required-from-generatestaticparams-for-a-route-with-multiple"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-type-is-required-from-generatestaticparams-for-a-route-with-multiple" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-type-is-required-from-generatestaticparams-for-a-route-with-multiple" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return type is required from generateStaticParams for a route with multiple dynamic segments like [category]/[product]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An array of objects with both properties: { category: string, product: string }[]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8qso6" prefix="r4917" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14909481302645615530"],"question":[0,"Why are route params typed as string, string[], or undefined instead of more specific types?"],"answer":[0,"Because their values aren't known until runtime - users can enter any URL into the address bar, and these broad types help ensure that your application code handles all these possible cases."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"why-are-route-params-typed-as-string-string-or-undefined-instead-of-more-specifi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-are-route-params-typed-as-string-string-or-undefined-instead-of-more-specifi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-are-route-params-typed-as-string-string-or-undefined-instead-of-more-specifi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why are route params typed as string, string[], or undefined instead of more specific types?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Because their values aren't known until runtime - users can enter any URL into the address bar, and these broad types help ensure that your application code handles all these possible cases.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-handlers-http-method-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Handlers > HTTP Method Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="2qTf9h" prefix="r4918" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"721208675459456542"],"question":[0,"How must you access dynamic route parameters in Next.js 15+ Route Handlers?"],"answer":[0,"You must await the params object before accessing dynamic route segment values. Example: const { id } = await params. In version 14 and earlier, params was a synchronous prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"how-must-you-access-dynamic-route-parameters-in-next-js-15-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-must-you-access-dynamic-route-parameters-in-next-js-15-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-must-you-access-dynamic-route-parameters-in-next-js-15-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How must you access dynamic route parameters in Next.js 15+ Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must await the params object before accessing dynamic route segment values. Example: const { id } = await params. In version 14 and earlier, params was a synchronous prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dAqEG" prefix="r4919" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"836058212973845158"],"question":[0,"What are the valid values for the 'runtime' route segment config option?"],"answer":[0,"The 'runtime' option accepts exactly two string values: 'nodejs' (default) or 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-valid-values-for-the-runtime-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-valid-values-for-the-runtime-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the valid values for the 'runtime' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'runtime' option accepts exactly two string values: 'nodejs' (default) or 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pcvOc" prefix="r4920" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1239934635216034344"],"question":[0,"What route segment config option value skips both the Full Route Cache and Data Cache?"],"answer":[0,"Using dynamic = 'force-dynamic' or revalidate = 0 will skip the Full Route Cache and the Data Cache."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-route-segment-config-option-value-skips-both-the-full-route-cache-and-data-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-route-segment-config-option-value-skips-both-the-full-route-cache-and-data-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-route-segment-config-option-value-skips-both-the-full-route-cache-and-data-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What route segment config option value skips both the Full Route Cache and Data Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using dynamic = 'force-dynamic' or revalidate = 0 will skip the Full Route Cache and the Data Cache.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZL4mDG" prefix="r4921" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1471895921891994435"],"question":[0,"What type is the 'revalidate' route segment config option and what values can it accept?"],"answer":[0,"The 'revalidate' option is of type: false | 0 | number. Valid values are: false (default), 0 (ensures dynamic rendering), or a positive integer representing seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-revalidate-route-segment-config-option-and-what-values-can-it-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-revalidate-route-segment-config-option-and-what-values-can-it-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-revalidate-route-segment-config-option-and-what-values-can-it-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the 'revalidate' route segment config option and what values can it accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'revalidate' option is of type: false | 0 | number. Valid values are: false (default), 0 (ensures dynamic rendering), or a positive integer representing seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qFvaY" prefix="r4922" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2834597289341813187"],"question":[0,"What is the proper way to set revalidation time using the route segment config?"],"answer":[0,"Export a number in seconds representing the revalidation frequency. Example: export const revalidate = 3600 (revalidates at most every hour)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-proper-way-to-set-revalidation-time-using-the-route-segment-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-proper-way-to-set-revalidation-time-using-the-route-segment-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-proper-way-to-set-revalidation-time-using-the-route-segment-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the proper way to set revalidation time using the route segment config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a number in seconds representing the revalidation frequency. Example: export const revalidate = 3600 (revalidates at most every hour).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dLEp6" prefix="r4923" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2887651599940634746"],"question":[0,"What Web API standard do Next.js Route Handlers use for request and response handling?"],"answer":[0,"Route Handlers use the Web Request and Response APIs (standard Web APIs), not Node.js-specific APIs. Next.js extends these with NextRequest and NextResponse for additional convenience helpers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-web-api-standard-do-next-js-route-handlers-use-for-request-and-response-han"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-web-api-standard-do-next-js-route-handlers-use-for-request-and-response-han" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-web-api-standard-do-next-js-route-handlers-use-for-request-and-response-han" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Web API standard do Next.js Route Handlers use for request and response handling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers use the Web Request and Response APIs (standard Web APIs), not Node.js-specific APIs. Next.js extends these with NextRequest and NextResponse for additional convenience helpers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi5xO4" prefix="r4924" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3643085468535413839"],"question":[0,"How do you opt into caching for GET methods in Next.js Route Handlers?"],"answer":[0,"To cache a GET method, use the route config option: export const dynamic = 'force-static' in your Route Handler file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-opt-into-caching-for-get-methods-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-opt-into-caching-for-get-methods-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-opt-into-caching-for-get-methods-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you opt into caching for GET methods in Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>To cache a GET method, use the route config option: export const dynamic = 'force-static' in your Route Handler file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RPc3m" prefix="r4925" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4628464534815102369"],"question":[0,"In which Next.js version were Route Handlers first introduced?"],"answer":[0,"Route Handlers were introduced in Next.js version 13.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-2"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-were-route-handlers-first-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-were-route-handlers-first-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-were-route-handlers-first-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version were Route Handlers first introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers were introduced in Next.js version 13.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-2" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JEC5A" prefix="r4926" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5531165006986449038"],"question":[0,"What automatic effect does exporting a POST, PUT, or DELETE handler have on route caching?"],"answer":[0,"Exporting a POST, PUT, or DELETE handler from your API route file automatically makes the route dynamic (not cached)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-automatic-effect-does-exporting-a-post-put-or-delete-handler-have-on-route-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-automatic-effect-does-exporting-a-post-put-or-delete-handler-have-on-route-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-automatic-effect-does-exporting-a-post-put-or-delete-handler-have-on-route-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What automatic effect does exporting a POST, PUT, or DELETE handler have on route caching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Exporting a POST, PUT, or DELETE handler from your API route file automatically makes the route dynamic (not cached).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ba1rv" prefix="r4927" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5934072801284395567"],"question":[0,"Can HTTP methods other than GET be cached in Next.js Route Handlers?"],"answer":[0,"No, other supported HTTP methods (POST, PUT, PATCH, DELETE, HEAD, OPTIONS) are not cached, even if they are placed alongside a GET method that is cached in the same file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-http-methods-other-than-get-be-cached-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-http-methods-other-than-get-be-cached-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-http-methods-other-than-get-be-cached-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can HTTP methods other than GET be cached in Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, other supported HTTP methods (POST, PUT, PATCH, DELETE, HEAD, OPTIONS) are not cached, even if they are placed alongside a GET method that is cached in the same file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPupm6" prefix="r4928" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6323955738477955777"],"question":[0,"Can you use the same handler function for multiple HTTP methods in a Route Handler?"],"answer":[0,"Yes, you can create a single function and export it for multiple methods using the syntax: export { handler as GET, handler as POST }."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-same-handler-function-for-multiple-http-methods-in-a-route-handl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-same-handler-function-for-multiple-http-methods-in-a-route-handl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-same-handler-function-for-multiple-http-methods-in-a-route-handl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the same handler function for multiple HTTP methods in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, you can create a single function and export it for multiple methods using the syntax: export { handler as GET, handler as POST }.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z19CFBP" prefix="r4929" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7889388975475615770"],"question":[0,"What are all the valid values for the 'dynamic' route segment config option?"],"answer":[0,"The 'dynamic' option accepts exactly four values: 'auto' (default), 'force-dynamic', 'error', and 'force-static'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-the-valid-values-for-the-dynamic-route-segment-config-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-the-valid-values-for-the-dynamic-route-segment-config-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-the-valid-values-for-the-dynamic-route-segment-config-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all the valid values for the 'dynamic' route segment config option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'dynamic' option accepts exactly four values: 'auto' (default), 'force-dynamic', 'error', and 'force-static'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RFk3m" prefix="r4930" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9897244424632355628"],"question":[0,"What does 'revalidate = 0' do in a Next.js Route Handler?"],"answer":[0,"Setting revalidate = 0 ensures dynamic rendering and changes the default for fetch requests to 'no-store' (no caching)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-0-do-in-a-next-js-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-0-do-in-a-next-js-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-0-do-in-a-next-js-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'revalidate = 0' do in a Next.js Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting revalidate = 0 ensures dynamic rendering and changes the default for fetch requests to 'no-store' (no caching).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1xiHiF" prefix="r4931" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10792644226417113530"],"question":[0,"Are Next.js Route Handlers cached by default?"],"answer":[0,"No, Route Handlers are not cached by default. This is the default behavior in Next.js 15+."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"are-next-js-route-handlers-cached-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-next-js-route-handlers-cached-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-next-js-route-handlers-cached-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Next.js Route Handlers cached by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Route Handlers are not cached by default. This is the default behavior in Next.js 15+.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jGntw" prefix="r4932" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10988683891110110902"],"question":[0,"What constraint exists on the 'revalidate' value in Next.js Route Handlers?"],"answer":[0,"The revalidate value needs to be statically analyzable. For example, revalidate = 600 is valid, but revalidate = 60 * 10 is not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-constraint-exists-on-the-revalidate-value-in-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-constraint-exists-on-the-revalidate-value-in-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-constraint-exists-on-the-revalidate-value-in-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What constraint exists on the 'revalidate' value in Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The revalidate value needs to be statically analyzable. For example, revalidate = 600 is valid, but revalidate = 60 * 10 is not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1lo5gE" prefix="r4933" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11258975013834412274"],"question":[0,"Are HTTP method names case-sensitive in Next.js Route Handler exports?"],"answer":[0,"Yes, HTTP method names are case-sensitive and must be exported in uppercase (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) to be recognized by Next.js as route handlers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"are-http-method-names-case-sensitive-in-next-js-route-handler-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-http-method-names-case-sensitive-in-next-js-route-handler-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-http-method-names-case-sensitive-in-next-js-route-handler-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are HTTP method names case-sensitive in Next.js Route Handler exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, HTTP method names are case-sensitive and must be exported in uppercase (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) to be recognized by Next.js as route handlers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LvHzo" prefix="r4934" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12460645830236222693"],"question":[0,"What HTTP methods are supported by Next.js Route Handlers?"],"answer":[0,"Next.js Route Handlers support exactly seven HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-methods-are-supported-by-next-js-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-methods-are-supported-by-next-js-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-methods-are-supported-by-next-js-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP methods are supported by Next.js Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js Route Handlers support exactly seven HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WE7R6" prefix="r4935" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12673975412403245985"],"question":[0,"What file extensions are supported for Next.js Route Handler files?"],"answer":[0,"Route Handlers support four file extensions: route.js, route.ts, route.jsx, and route.tsx (though .js and .ts are most common)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-next-js-route-handler-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-next-js-route-handler-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-next-js-route-handler-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for Next.js Route Handler files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers support four file extensions: route.js, route.ts, route.jsx, and route.tsx (though .js and .ts are most common).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZePzpM" prefix="r4936" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14328447618636637353"],"question":[0,"Can you have both a route.js and page.js file at the same route segment level?"],"answer":[0,"No, there cannot be a route.js file at the same route segment level as page.js. Each route.js or page.js file takes over all HTTP verbs for that route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-have-both-a-route-js-and-page-js-file-at-the-same-route-segment-level"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-have-both-a-route-js-and-page-js-file-at-the-same-route-segment-level" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-have-both-a-route-js-and-page-js-file-at-the-same-route-segment-level" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you have both a route.js and page.js file at the same route segment level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, there cannot be a route.js file at the same route segment level as page.js. Each route.js or page.js file takes over all HTTP verbs for that route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pM72h" prefix="r4937" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14622893200124157144"],"question":[0,"Is the 'revalidate' config option available when using the Edge runtime?"],"answer":[0,"No, the revalidate value is unavailable when using runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-revalidate-config-option-available-when-using-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-revalidate-config-option-available-when-using-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-revalidate-config-option-available-when-using-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the 'revalidate' config option available when using the Edge runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the revalidate value is unavailable when using runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EgzTu" prefix="r4938" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14735676701460898422"],"question":[0,"What type is the second 'context' parameter in Next.js Route Handler functions starting from version 15?"],"answer":[0,"Starting in Next.js 15, the context parameter contains 'params' which is a promise that resolves to an object containing the dynamic route parameters. Type signature: { params: Promise<{ [key]: string }> }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-is-the-second-context-parameter-in-next-js-route-handler-functions-sta"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-is-the-second-context-parameter-in-next-js-route-handler-functions-sta" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-is-the-second-context-parameter-in-next-js-route-handler-functions-sta" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type is the second 'context' parameter in Next.js Route Handler functions starting from version 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting in Next.js 15, the context parameter contains 'params' which is a promise that resolves to an object containing the dynamic route parameters. Type signature: { params: Promise<{ [key]: string }> }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QTU0H" prefix="r4939" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14907802384184937975"],"question":[0,"What happens if you don't define an OPTIONS method in a Next.js Route Handler?"],"answer":[0,"If OPTIONS is not defined, Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-don-t-define-an-options-method-in-a-next-js-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-don-t-define-an-options-method-in-a-next-js-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-don-t-define-an-options-method-in-a-next-js-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you don't define an OPTIONS method in a Next.js Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If OPTIONS is not defined, Next.js will automatically implement OPTIONS and set the appropriate Response Allow header depending on the other methods defined in the Route Handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2mLnoy" prefix="r4940" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14935577199068405952"],"question":[0,"Can Route Handler HTTP method functions be synchronous instead of async?"],"answer":[0,"While the documentation shows all Route Handler examples using async functions, and Next.js 15 made many request APIs asynchronous (like params, cookies(), headers()), Route Handlers should be defined as async functions to properly handle asynchronous operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"can-route-handler-http-method-functions-be-synchronous-instead-of-async"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-route-handler-http-method-functions-be-synchronous-instead-of-async" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-route-handler-http-method-functions-be-synchronous-instead-of-async" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Route Handler HTTP method functions be synchronous instead of async?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>While the documentation shows all Route Handler examples using async functions, and Next.js 15 made many request APIs asynchronous (like params, cookies(), headers()), Route Handlers should be defined as async functions to properly handle asynchronous operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xKOs" prefix="r4941" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15056118154740799531"],"question":[0,"Does Next.js automatically implement HEAD method when you define a GET method in a Route Handler?"],"answer":[0,"No, Next.js does not automatically implement HEAD based on GET. Unlike OPTIONS (which is auto-implemented), HEAD requires explicit definition. If only GET is defined and a HEAD request is made, Next.js will return a 405 Method Not Allowed response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-implement-head-method-when-you-define-a-get-method-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-implement-head-method-when-you-define-a-get-method-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-implement-head-method-when-you-define-a-get-method-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically implement HEAD method when you define a GET method in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Next.js does not automatically implement HEAD based on GET. Unlike OPTIONS (which is auto-implemented), HEAD requires explicit definition. If only GET is defined and a HEAD request is made, Next.js will return a 405 Method Not Allowed response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-rendering-and-execution-model" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Rendering and Execution Model</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z9kmm0" prefix="r4942" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"840867012998160034"],"question":[0,"What symbol does Next.js display for dynamic routes in the build output?"],"answer":[0,"Next.js displays ƒ (function symbol) for dynamic routes that are server-rendered on demand."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/static-and-dynamic-rendering"]]],"topic":[0,"nextjs"],"slug":[0,"what-symbol-does-next-js-display-for-dynamic-routes-in-the-build-output"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-symbol-does-next-js-display-for-dynamic-routes-in-the-build-output" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-symbol-does-next-js-display-for-dynamic-routes-in-the-build-output" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What symbol does Next.js display for dynamic routes in the build output?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js displays ƒ (function symbol) for dynamic routes that are server-rendered on demand.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/static-and-dynamic-rendering" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZxsVpr" prefix="r4943" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1801533360605615642"],"question":[0,"What is the default prefetch behavior for dynamic routes when using the Link component?"],"answer":[0,"For dynamic routes, prefetch defaults to automatic, where only the shared layout down to the first loading.js file is prefetched and cached for 30 seconds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/linking-and-navigating"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-prefetch-behavior-for-dynamic-routes-when-using-the-link-com"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-prefetch-behavior-for-dynamic-routes-when-using-the-link-com" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-prefetch-behavior-for-dynamic-routes-when-using-the-link-com" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default prefetch behavior for dynamic routes when using the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For dynamic routes, prefetch defaults to automatic, where only the shared layout down to the first loading.js file is prefetched and cached for 30 seconds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/linking-and-navigating" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZF1R6j" prefix="r4944" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2759148771134604002"],"question":[0,"Can Server Components use React hooks like useState or useEffect?"],"answer":[0,"No. Server Components cannot use lifecycle hooks like useEffect, state management like useState, or event handlers. These features require the component to be a Client Component with the 'use client' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-components-use-react-hooks-like-usestate-or-useeffect"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-components-use-react-hooks-like-usestate-or-useeffect" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-components-use-react-hooks-like-usestate-or-useeffect" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Components use React hooks like useState or useEffect?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Components cannot use lifecycle hooks like useEffect, state management like useState, or event handlers. These features require the component to be a Client Component with the 'use client' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIMYOg" prefix="r4945" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3568324315683851871"],"question":[0,"When did the cookies() function become asynchronous in Next.js?"],"answer":[0,"The cookies() function became asynchronous in Next.js version 15.0.0-RC. It was initially introduced as synchronous in v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-the-cookies-function-become-asynchronous-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-the-cookies-function-become-asynchronous-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-the-cookies-function-become-asynchronous-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did the cookies() function become asynchronous in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The cookies() function became asynchronous in Next.js version 15.0.0-RC. It was initially introduced as synchronous in v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tgrDy" prefix="r4946" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4032184102212580020"],"question":[0,"What is the default cache TTL for static pages in the Router Cache?"],"answer":[0,"The default cache TTL (Time To Live) for static pages in the Router Cache is 5 minutes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-ttl-for-static-pages-in-the-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-ttl-for-static-pages-in-the-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-ttl-for-static-pages-in-the-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default cache TTL for static pages in the Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default cache TTL (Time To Live) for static pages in the Router Cache is 5 minutes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RSdVY" prefix="r4947" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4370583106318489463"],"question":[0,"What happens to imports and child components in a file marked with 'use client'?"],"answer":[0,"Once a file is marked with 'use client', all its imports and child components are considered part of the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-imports-and-child-components-in-a-file-marked-with-use-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-imports-and-child-components-in-a-file-marked-with-use-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-imports-and-child-components-in-a-file-marked-with-use-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to imports and child components in a file marked with 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Once a file is marked with 'use client', all its imports and child components are considered part of the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zhmvxb" prefix="r4948" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4391720862373220739"],"question":[0,"What dynamic functions will opt a route into dynamic rendering at request time?"],"answer":[0,"Using cookies() and headers() in a Server Component will opt the whole route into dynamic rendering at request time. Using the searchParams Pages prop will also opt the page into dynamic rendering at request time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-dynamic-functions-will-opt-a-route-into-dynamic-rendering-at-request-time"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-dynamic-functions-will-opt-a-route-into-dynamic-rendering-at-request-time" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-dynamic-functions-will-opt-a-route-into-dynamic-rendering-at-request-time" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What dynamic functions will opt a route into dynamic rendering at request time?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Using cookies() and headers() in a Server Component will opt the whole route into dynamic rendering at request time. Using the searchParams Pages prop will also opt the page into dynamic rendering at request time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pTHOD" prefix="r4949" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4584808590971072700"],"question":[0,"What is the default prefetch behavior for static routes when using the Link component?"],"answer":[0,"For static routes, prefetch defaults to true and the entire route is prefetched and cached."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-prefetch-behavior-for-static-routes-when-using-the-link-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-prefetch-behavior-for-static-routes-when-using-the-link-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-prefetch-behavior-for-static-routes-when-using-the-link-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default prefetch behavior for static routes when using the Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For static routes, prefetch defaults to true and the entire route is prefetched and cached.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="LuyRY" prefix="r4950" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6781661037148867936"],"question":[0,"What data format does Next.js use to send Server Component output to the client?"],"answer":[0,"Next.js uses the React Server Component Payload (RSC Payload), which is a compact binary representation of the rendered React Server Components tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-data-format-does-next-js-use-to-send-server-component-output-to-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-data-format-does-next-js-use-to-send-server-component-output-to-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-data-format-does-next-js-use-to-send-server-component-output-to-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What data format does Next.js use to send Server Component output to the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses the React Server Component Payload (RSC Payload), which is a compact binary representation of the rendered React Server Components tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SQG2K" prefix="r4951" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6951441331655321639"],"question":[0,"What are the two module graphs that Next.js splits components into?"],"answer":[0,"Next.js splits components into two module graphs: the server module graph contains all Server Components rendered on the server, and the client module graph contains all Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-module-graphs-that-next-js-splits-components-into"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-module-graphs-that-next-js-splits-components-into" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-module-graphs-that-next-js-splits-components-into" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two module graphs that Next.js splits components into?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js splits components into two module graphs: the server module graph contains all Server Components rendered on the server, and the client module graph contains all Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuB1Fz" prefix="r4952" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7245235947528526328"],"question":[0,"What is the default component type in Next.js App Router?"],"answer":[0,"By default, all components in the App Router are Server Components. Layouts and pages are Server Components by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-component-type-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-component-type-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-component-type-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default component type in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, all components in the App Router are Server Components. Layouts and pages are Server Components by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZG80n1" prefix="r4953" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8017628844537240688"],"question":[0,"Do you need to add 'use client' to every file that contains Client Components?"],"answer":[0,"No. You only need to add it to the files whose components you want to render directly within Server Components. The Client module boundary only needs to be defined once, at the entry point, for all modules imported into it to be considered a Client component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"do-you-need-to-add-use-client-to-every-file-that-contains-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-you-need-to-add-use-client-to-every-file-that-contains-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-you-need-to-add-use-client-to-every-file-that-contains-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do you need to add 'use client' to every file that contains Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You only need to add it to the files whose components you want to render directly within Server Components. The Client module boundary only needs to be defined once, at the entry point, for all modules imported into it to be considered a Client component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jjIiP" prefix="r4954" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9729025464237307296"],"question":[0,"Are the RSC Payload and data cached separately in Next.js?"],"answer":[0,"Yes. The RSC Payload and data are cached separately, allowing routes to combine both cached and uncached data simultaneously."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"are-the-rsc-payload-and-data-cached-separately-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-the-rsc-payload-and-data-cached-separately-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-the-rsc-payload-and-data-cached-separately-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are the RSC Payload and data cached separately in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The RSC Payload and data are cached separately, allowing routes to combine both cached and uncached data simultaneously.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3BTkx" prefix="r4955" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10081062729651940553"],"question":[0,"How does streaming work with React's component model in Next.js?"],"answer":[0,"Streaming works well with React's component model because each component can be considered a chunk. Components with higher priority (like layout or product information) can be sent first, while lower-priority components (like reviews) can follow after their data loads."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-streaming-work-with-react-s-component-model-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-streaming-work-with-react-s-component-model-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-streaming-work-with-react-s-component-model-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does streaming work with React's component model in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Streaming works well with React's component model because each component can be considered a chunk. Components with higher priority (like layout or product information) can be sent first, while lower-priority components (like reviews) can follow after their data loads.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24XirQ" prefix="r4956" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10283516692468069406"],"question":[0,"How are Client Components rendered on subsequent navigations (after initial page load)?"],"answer":[0,"On subsequent navigations, Client Components are rendered entirely on the client, without the server-rendered HTML. The Client Component JavaScript bundle is downloaded and parsed, then React uses the RSC Payload to reconcile the Client and Server Component trees and update the DOM."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-client-components-rendered-on-subsequent-navigations-after-initial-page-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-client-components-rendered-on-subsequent-navigations-after-initial-page-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-client-components-rendered-on-subsequent-navigations-after-initial-page-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are Client Components rendered on subsequent navigations (after initial page load)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On subsequent navigations, Client Components are rendered entirely on the client, without the server-rendered HTML. The Client Component JavaScript bundle is downloaded and parsed, then React uses the RSC Payload to reconcile the Client and Server Component trees and update the DOM.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jd5nm" prefix="r4957" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10296097279886106162"],"question":[0,"When is static rendering performed in Next.js?"],"answer":[0,"With static rendering, routes are rendered at build time or in the background after data revalidation. The result is cached and can be reused across requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-static-rendering-performed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-static-rendering-performed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-static-rendering-performed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is static rendering performed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With static rendering, routes are rendered at build time or in the background after data revalidation. The result is cached and can be reused across requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1eR6M2" prefix="r4958" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11034437402860110262"],"question":[0,"What happens to environment variables without the NEXT_PUBLIC_ prefix in client-side code?"],"answer":[0,"Environment variables without the NEXT_PUBLIC_ prefix are replaced with empty strings in the client bundle. By default, environment variables are only available on the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-environment-variables-without-the-next-public-prefix-in-client-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-environment-variables-without-the-next-public-prefix-in-client-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-environment-variables-without-the-next-public-prefix-in-client-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to environment variables without the NEXT_PUBLIC_ prefix in client-side code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Environment variables without the NEXT_PUBLIC_ prefix are replaced with empty strings in the client bundle. By default, environment variables are only available on the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15YScP" prefix="r4959" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11478366000606468428"],"question":[0,"What are the three steps in the Client Component rendering process on initial page load?"],"answer":[0,"On initial page load: (1) HTML is used to immediately show a fast non-interactive preview of the route, (2) The React Server Components Payload is used to reconcile the Client and Server Component trees and update the DOM, and (3) The JavaScript instructions are used to hydrate Client Components and make their UI interactive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-steps-in-the-client-component-rendering-process-on-initial-pa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-steps-in-the-client-component-rendering-process-on-initial-pa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-steps-in-the-client-component-rendering-process-on-initial-pa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three steps in the Client Component rendering process on initial page load?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On initial page load: (1) HTML is used to immediately show a fast non-interactive preview of the route, (2) The React Server Components Payload is used to reconcile the Client and Server Component trees and update the DOM, and (3) The JavaScript instructions are used to hydrate Client Components and make their UI interactive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21fndJ" prefix="r4960" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11688470405757855316"],"question":[0,"What are the two main reasons a route might opt out of static rendering?"],"answer":[0,"There are two reasons a route might opt out of static rendering: (1) The presence of Dynamic APIs which rely on runtime information, and (2) An uncached data request, like a call to an ORM or database driver."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/rendering/automatic-static-optimization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-reasons-a-route-might-opt-out-of-static-rendering"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-reasons-a-route-might-opt-out-of-static-rendering" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-reasons-a-route-might-opt-out-of-static-rendering" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main reasons a route might opt out of static rendering?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>There are two reasons a route might opt out of static rendering: (1) The presence of Dynamic APIs which rely on runtime information, and (2) An uncached data request, like a call to an ORM or database driver.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/rendering/automatic-static-optimization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kok1m" prefix="r4961" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12549963532228696897"],"question":[0,"What does the loading.js file automatically do with the page.js file?"],"answer":[0,"The loading.js file will automatically wrap the page.js file and any children below in a <Suspense> boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-loading-js-file-automatically-do-with-the-page-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-loading-js-file-automatically-do-with-the-page-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-loading-js-file-automatically-do-with-the-page-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the loading.js file automatically do with the page.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The loading.js file will automatically wrap the page.js file and any children below in a <Suspense> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="byQxF" prefix="r4962" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12722519100404797384"],"question":[0,"How do you disable automatic prefetching for a Link component?"],"answer":[0,"You can disable automatic prefetching by setting prefetch={false} on the Link component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/prefetching"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-disable-automatic-prefetching-for-a-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-disable-automatic-prefetching-for-a-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-disable-automatic-prefetching-for-a-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you disable automatic prefetching for a Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can disable automatic prefetching by setting prefetch={false} on the Link component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/prefetching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1SMvYq" prefix="r4963" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13084327269082333242"],"question":[0,"Where is the Router Cache stored in Next.js?"],"answer":[0,"The Router Cache is an in-memory client-side cache that stores the RSC payload of route segments, split by layouts, loading states, and pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/caching"]]],"topic":[0,"nextjs"],"slug":[0,"where-is-the-router-cache-stored-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-is-the-router-cache-stored-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-is-the-router-cache-stored-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where is the Router Cache stored in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Router Cache is an in-memory client-side cache that stores the RSC payload of route segments, split by layouts, loading states, and pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/caching" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pyIkr" prefix="r4964" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13673978013051642613"],"question":[0,"When is dynamic rendering performed in Next.js?"],"answer":[0,"With dynamic rendering, routes are rendered for each user at request time (when the user visits the page)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/server-components"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-dynamic-rendering-performed-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-dynamic-rendering-performed-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-dynamic-rendering-performed-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is dynamic rendering performed in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>With dynamic rendering, routes are rendered for each user at request time (when the user visits the page).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/server-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21an67" prefix="r4965" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14060127806461453953"],"question":[0,"What happens to NEXT_PUBLIC_ environment variables at build time?"],"answer":[0,"Next.js inlines the value at build time into the JavaScript bundle that is delivered to the client, replacing all references to process.env.[variable] with a hard-coded value. After being built, your app will no longer respond to changes to these environment variables."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-next-public-environment-variables-at-build-time"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-next-public-environment-variables-at-build-time" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-next-public-environment-variables-at-build-time" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to NEXT_PUBLIC_ environment variables at build time?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js inlines the value at build time into the JavaScript bundle that is delivered to the client, replacing all references to process.env.[variable] with a hard-coded value. After being built, your app will no longer respond to changes to these environment variables.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-actions-error-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server Actions > Error Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z26fYuN" prefix="r4966" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"913964552910001724"],"question":[0,"What is the difference between error.js and global-error.js in terms of what errors they catch?"],"answer":[0,"The root app/error.js boundary does not catch errors thrown in the root app/layout.js or app/template.js. To specifically handle errors in these root components, use app/global-error.js located in the root app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-error-js-and-global-error-js-in-terms-of-what-err"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-error-js-and-global-error-js-in-terms-of-what-err" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-error-js-and-global-error-js-in-terms-of-what-err" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between error.js and global-error.js in terms of what errors they catch?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The root app/error.js boundary does not catch errors thrown in the root app/layout.js or app/template.js. To specifically handle errors in these root components, use app/global-error.js located in the root app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UoGLD" prefix="r4967" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2055246771001692177"],"question":[0,"What are the three values returned by the useActionState hook?"],"answer":[0,"useActionState returns an array with [state, formAction, isPending] where state is the current form state, formAction is the action to pass to the form, and isPending is a boolean indicating if the action is processing."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-values-returned-by-the-useactionstate-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-values-returned-by-the-useactionstate-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-values-returned-by-the-useactionstate-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three values returned by the useActionState hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState returns an array with [state, formAction, isPending] where state is the current form state, formAction is the action to pass to the form, and isPending is a boolean indicating if the action is processing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2iD4MC" prefix="r4968" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2169538305561038373"],"question":[0,"What HTTP status code does redirect() return when used in a Server Action?"],"answer":[0,"When used in a Server Action, redirect() returns a 303 (See Other) HTTP redirect response. Otherwise, it returns a 307 (Temporary Redirect)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-when-used-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-when-used-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-when-used-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return when used in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When used in a Server Action, redirect() returns a 303 (See Other) HTTP redirect response. Otherwise, it returns a 307 (Temporary Redirect).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gh2vi" prefix="r4969" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2291900336256843728"],"question":[0,"Why must redirect() be called outside of try/catch blocks in Server Actions?"],"answer":[0,"redirect() works by throwing an error, which would be caught by the catch block. To avoid this, you can call redirect after try/catch. redirect would only be reachable if try is successful."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"why-must-redirect-be-called-outside-of-try-catch-blocks-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-must-redirect-be-called-outside-of-try-catch-blocks-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-must-redirect-be-called-outside-of-try-catch-blocks-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why must redirect() be called outside of try/catch blocks in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() works by throwing an error, which would be caught by the catch block. To avoid this, you can call redirect after try/catch. redirect would only be reachable if try is successful.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZX4u9O" prefix="r4970" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2651519507820663785"],"question":[0,"How does the action function signature differ when used with useActionState compared to being used directly?"],"answer":[0,"When passed to useActionState, the action function receives an extra argument: the previous or initial state as its first argument. The submitted form data becomes its second argument instead of first."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-action-function-signature-differ-when-used-with-useactionstate-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-action-function-signature-differ-when-used-with-useactionstate-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-action-function-signature-differ-when-used-with-useactionstate-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the action function signature differ when used with useActionState compared to being used directly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When passed to useActionState, the action function receives an extra argument: the previous or initial state as its first argument. The submitted form data becomes its second argument instead of first.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTvRLq" prefix="r4971" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3190450151219089938"],"question":[0,"What HTTP status code do Server Actions return when an error is thrown?"],"answer":[0,"Server Actions return HTTP 500 when an error is thrown."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/49426"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-do-server-actions-return-when-an-error-is-thrown"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-do-server-actions-return-when-an-error-is-thrown" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-do-server-actions-return-when-an-error-is-thrown" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code do Server Actions return when an error is thrown?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions return HTTP 500 when an error is thrown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/49426" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27w6xV" prefix="r4972" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3536500930883590842"],"question":[0,"What type of error does the redirect() function throw?"],"answer":[0,"redirect() throws a NEXT_REDIRECT error and terminates rendering of the route segment in which it was thrown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-error-does-the-redirect-function-throw"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-error-does-the-redirect-function-throw" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-error-does-the-redirect-function-throw" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of error does the redirect() function throw?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() throws a NEXT_REDIRECT error and terminates rendering of the route segment in which it was thrown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZUPxum" prefix="r4973" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3691370694555259002"],"question":[0,"What is the maximum character length for the path parameter in revalidatePath()?"],"answer":[0,"The path parameter in revalidatePath() has a maximum of 1024 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the path parameter in revalidatePath()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The path parameter in revalidatePath() has a maximum of 1024 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1c8NOt" prefix="r4974" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4426281380870447749"],"question":[0,"Can you customize the HTTP status code returned by Server Actions?"],"answer":[0,"No, Server Actions always return 200 on success and 500 on error. The only option is returning an object with a statusCode property in it, but the actual HTTP response code will still be 200."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/49302"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-customize-the-http-status-code-returned-by-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-customize-the-http-status-code-returned-by-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-customize-the-http-status-code-returned-by-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you customize the HTTP status code returned by Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Server Actions always return 200 on success and 500 on error. The only option is returning an object with a statusCode property in it, but the actual HTTP response code will still be 200.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/49302" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Q895V" prefix="r4975" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4948027752747377130"],"question":[0,"What is the official Next.js recommendation for handling unexpected errors (bugs) in Server Actions?"],"answer":[0,"Unexpected errors that indicate bugs or issues should be handled by throwing errors, which will then be caught by error boundaries."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-official-next-js-recommendation-for-handling-unexpected-errors-bugs-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-official-next-js-recommendation-for-handling-unexpected-errors-bugs-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-official-next-js-recommendation-for-handling-unexpected-errors-bugs-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the official Next.js recommendation for handling unexpected errors (bugs) in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unexpected errors that indicate bugs or issues should be handled by throwing errors, which will then be caught by error boundaries.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21owKi" prefix="r4976" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5567194016986099054"],"question":[0,"Must error.js files be Client Components or Server Components?"],"answer":[0,"error.js files must be Client Components (require 'use client' directive). Error boundaries must be Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-js-files-be-client-components-or-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-js-files-be-client-components-or-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-js-files-be-client-components-or-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.js files be Client Components or Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>error.js files must be Client Components (require 'use client' directive). Error boundaries must be Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bVXgY" prefix="r4977" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5620509073945731419"],"question":[0,"How is error serialization different between development and production in Server Actions?"],"answer":[0,"During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging. During production, the Error object only includes a generic message and digest property as a security precaution to avoid leaking potentially sensitive details."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-is-error-serialization-different-between-development-and-production-in-serve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-is-error-serialization-different-between-development-and-production-in-serve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-is-error-serialization-different-between-development-and-production-in-serve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How is error serialization different between development and production in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging. During production, the Error object only includes a generic message and digest property as a security precaution to avoid leaking potentially sensitive details.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1COuW4" prefix="r4978" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6932566801304594653"],"question":[0,"What is the serialization requirement for Server Action arguments and return values?"],"answer":[0,"The arguments and return value of Server Actions must be serializable by React. See the React docs for a list of serializable arguments and values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-serialization-requirement-for-server-action-arguments-and-return-val"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-serialization-requirement-for-server-action-arguments-and-return-val" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-serialization-requirement-for-server-action-arguments-and-return-val" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the serialization requirement for Server Action arguments and return values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The arguments and return value of Server Actions must be serializable by React. See the React docs for a list of serializable arguments and values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DM2KR" prefix="r4979" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7997946591277569788"],"question":[0,"What TypeScript return type does the redirect() function have?"],"answer":[0,"The redirect() function returns the TypeScript 'never' type, meaning it never actually returns a value to the caller."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-return-type-does-the-redirect-function-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-return-type-does-the-redirect-function-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-return-type-does-the-redirect-function-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript return type does the redirect() function have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The redirect() function returns the TypeScript 'never' type, meaning it never actually returns a value to the caller.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqMaYM" prefix="r4980" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10082125841498064043"],"question":[0,"How does error.message differ between development and production for Server Component errors?"],"answer":[0,"In development, error.message shows the original error message. In production, Server Component errors show generic messages with an identifier to prevent leaking potentially sensitive details to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-error-message-differ-between-development-and-production-for-server-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-error-message-differ-between-development-and-production-for-server-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-error-message-differ-between-development-and-production-for-server-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does error.message differ between development and production for Server Component errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In development, error.message shows the original error message. In production, Server Component errors show generic messages with an identifier to prevent leaking potentially sensitive details to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mS3y6" prefix="r4981" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10267373928812658461"],"question":[0,"Can revalidatePath() be called in Client Components?"],"answer":[0,"No, revalidatePath() can only be called in Server Functions and Route Handlers, not in Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"can-revalidatepath-be-called-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-revalidatepath-be-called-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-revalidatepath-be-called-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can revalidatePath() be called in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, revalidatePath() can only be called in Server Functions and Route Handlers, not in Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9m5pd" prefix="r4982" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10576968670288708843"],"question":[0,"What meta tag does notFound() automatically insert and why?"],"answer":[0,"notFound() automatically inserts a <meta name=\"robots\" content=\"noindex\" /> tag to prevent search engines from indexing 404 pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-meta-tag-does-notfound-automatically-insert-and-why"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-meta-tag-does-notfound-automatically-insert-and-why" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-meta-tag-does-notfound-automatically-insert-and-why" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What meta tag does notFound() automatically insert and why?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>notFound() automatically inserts a <meta name="robots" content="noindex" /> tag to prevent search engines from indexing 404 pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZaTfOL" prefix="r4983" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11312991069655807638"],"question":[0,"What type of error does the notFound() function throw?"],"answer":[0,"notFound() throws a NEXT_HTTP_ERROR_FALLBACK;404 error and terminates rendering of the route segment where it was invoked."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-error-does-the-notfound-function-throw"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-error-does-the-notfound-function-throw" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-error-does-the-notfound-function-throw" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of error does the notFound() function throw?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>notFound() throws a NEXT_HTTP_ERROR_FALLBACK;404 error and terminates rendering of the route segment where it was invoked.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1eQVOi" prefix="r4984" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11356591456282864538"],"question":[0,"What is the error.digest property used for?"],"answer":[0,"error.digest is an automatically generated hash of the error thrown that can be used to match the corresponding error in server-side logs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-error-digest-property-used-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-error-digest-property-used-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-error-digest-property-used-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the error.digest property used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>error.digest is an automatically generated hash of the error thrown that can be used to match the corresponding error in server-side logs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCkPTP" prefix="r4985" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11942505928344808966"],"question":[0,"What is the correct order for calling revalidatePath() and redirect() in Server Actions?"],"answer":[0,"Call revalidatePath() or revalidateTag() before redirect(). Both should be called outside of try/catch blocks since redirect throws an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-correct-order-for-calling-revalidatepath-and-redirect-in-server-acti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-correct-order-for-calling-revalidatepath-and-redirect-in-server-acti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-correct-order-for-calling-revalidatepath-and-redirect-in-server-acti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the correct order for calling revalidatePath() and redirect() in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Call revalidatePath() or revalidateTag() before redirect(). Both should be called outside of try/catch blocks since redirect throws an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zuty3R" prefix="r4986" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13428377998837660222"],"question":[0,"What HTTP status code is returned when a Server Action returns an error object (without throwing)?"],"answer":[0,"When a Server Action returns an error object (e.g., `{ error: 'message' }`) without throwing, it returns HTTP 200, which can be confusing because it returns a success status for an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/49426"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-is-returned-when-a-server-action-returns-an-error-object-w"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-is-returned-when-a-server-action-returns-an-error-object-w" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-is-returned-when-a-server-action-returns-an-error-object-w" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code is returned when a Server Action returns an error object (without throwing)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a Server Action returns an error object (e.g., <code>{ error: 'message' }</code>) without throwing, it returns HTTP 200, which can be confusing because it returns a success status for an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/49426" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9YoED" prefix="r4987" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13988400465127709293"],"question":[0,"What is the official Next.js recommendation for handling expected errors (like validation failures) in Server Actions?"],"answer":[0,"For expected errors in Server Functions, avoid using try/catch blocks and throw errors. Instead, model expected errors as return values. Return an object with error information (e.g., `{ message: 'Failed to create post' }`) instead of throwing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-official-next-js-recommendation-for-handling-expected-errors-like-va"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-official-next-js-recommendation-for-handling-expected-errors-like-va" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-official-next-js-recommendation-for-handling-expected-errors-like-va" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the official Next.js recommendation for handling expected errors (like validation failures) in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For expected errors in Server Functions, avoid using try/catch blocks and throw errors. Instead, model expected errors as return values. Return an object with error information (e.g., <code>{ message: 'Failed to create post' }</code>) instead of throwing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZP9LDE" prefix="r4988" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14191950053536323085"],"question":[0,"What does revalidatePath() return?"],"answer":[0,"revalidatePath does not return a value (returns void)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidatepath-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidatepath-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidatepath-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does revalidatePath() return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidatePath does not return a value (returns void).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1C6eTx" prefix="r4989" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15075662490162314273"],"question":[0,"What TypeScript return type does the notFound() function have?"],"answer":[0,"The notFound() function uses TypeScript's 'never' type, meaning you don't require 'return notFound()' since it never returns normally."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-return-type-does-the-notfound-function-have"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-return-type-does-the-notfound-function-have" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-return-type-does-the-notfound-function-have" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript return type does the notFound() function have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The notFound() function uses TypeScript's 'never' type, meaning you don't require 'return notFound()' since it never returns normally.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="forms-and-mutations-state-and-ui-management" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Forms and Mutations > State and UI Management</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 24 questions </span> </div> <div class="space-y-4"> <astro-island uid="2srXbv" prefix="r4990" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1007455589584754901"],"question":[0,"What properties does useFormStatus return in React 19?"],"answer":[0,"Four properties: (1) pending - boolean indicating active form submission, (2) data - FormData object or null, (3) method - string value of 'get' or 'post', and (4) action - reference to the action function or null."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-useformstatus-return-in-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-useformstatus-return-in-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-useformstatus-return-in-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does useFormStatus return in React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Four properties: (1) pending - boolean indicating active form submission, (2) data - FormData object or null, (3) method - string value of 'get' or 'post', and (4) action - reference to the action function or null.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18oxSL" prefix="r4991" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1671526051140074495"],"question":[0,"Do forms with Server Actions work in Server Components when JavaScript is disabled?"],"answer":[0,"Yes. Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"do-forms-with-server-actions-work-in-server-components-when-javascript-is-disabl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-forms-with-server-actions-work-in-server-components-when-javascript-is-disabl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-forms-with-server-actions-work-in-server-components-when-javascript-is-disabl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do forms with Server Actions work in Server Components when JavaScript is disabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dzpVW" prefix="r4992" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2804017184936634921"],"question":[0,"What hook should be used instead of useFormState in React 19 and Next.js 15?"],"answer":[0,"useActionState. The useFormState hook is deprecated in React 19 and will be removed in a future release. useActionState was previously called ReactDOM.useFormState in the Canary releases but has been renamed."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/blog/2024/12/05/react-19"]]],"topic":[0,"nextjs"],"slug":[0,"what-hook-should-be-used-instead-of-useformstate-in-react-19-and-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-hook-should-be-used-instead-of-useformstate-in-react-19-and-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-hook-should-be-used-instead-of-useformstate-in-react-19-and-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What hook should be used instead of useFormState in React 19 and Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState. The useFormState hook is deprecated in React 19 and will be removed in a future release. useActionState was previously called ReactDOM.useFormState in the Canary releases but has been renamed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/blog/2024/12/05/react-19" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tWAhg" prefix="r4993" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3204075200176216659"],"question":[0,"What method should be used to programmatically submit a form with Server Actions?"],"answer":[0,"Use the requestSubmit() method on the form element (e.g., form.requestSubmit()). This is useful for keyboard shortcuts like Cmd+Enter and properly triggers form validation and React's form handling."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-method-should-be-used-to-programmatically-submit-a-form-with-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-method-should-be-used-to-programmatically-submit-a-form-with-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-method-should-be-used-to-programmatically-submit-a-form-with-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What method should be used to programmatically submit a form with Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the requestSubmit() method on the form element (e.g., form.requestSubmit()). This is useful for keyboard shortcuts like Cmd+Enter and properly triggers form validation and React's form handling.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1DDgwT" prefix="r4994" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3809424154213750809"],"question":[0,"Should you append /page or /layout to the path parameter in revalidatePath?"],"answer":[0,"No. Do not append /page or /layout to the path parameter. Use the type parameter instead to specify 'page' or 'layout'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-append-page-or-layout-to-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-append-page-or-layout-to-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-append-page-or-layout-to-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you append /page or /layout to the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Do not append /page or /layout to the path parameter. Use the type parameter instead to specify 'page' or 'layout'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJKI1t" prefix="r4995" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5511393836422254461"],"question":[0,"How many values does useActionState return?"],"answer":[0,"Three values: (1) the current state, (2) a form action function to pass to the form's action prop, and (3) an isPending boolean flag indicating whether a transition is in progress."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-values-does-useactionstate-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-values-does-useactionstate-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-values-does-useactionstate-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many values does useActionState return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Three values: (1) the current state, (2) a form action function to pass to the form's action prop, and (3) an isPending boolean flag indicating whether a transition is in progress.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqlPNh" prefix="r4996" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6068346101996816955"],"question":[0,"Where must useFormStatus be called relative to the form element?"],"answer":[0,"useFormStatus must be called from a component that is rendered inside a <form> element. It cannot be called in the same component that renders the form - it must be in a child component of the form."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-useformstatus-be-called-relative-to-the-form-element"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-useformstatus-be-called-relative-to-the-form-element" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-useformstatus-be-called-relative-to-the-form-element" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must useFormStatus be called relative to the form element?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useFormStatus must be called from a component that is rendered inside a <form> element. It cannot be called in the same component that renders the form - it must be in a child component of the form.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1bwCcp" prefix="r4997" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6183353149376854755"],"question":[0,"What prefix appears on extra FormData properties when using Object.fromEntries() with Server Actions?"],"answer":[0,"$ACTION_. When using Object.fromEntries(formData), the result contains extra properties prefixed with $ACTION_ that are used internally by Next.js to route form submissions to the correct Server Action handler."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-prefix-appears-on-extra-formdata-properties-when-using-object-fromentries-w"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prefix-appears-on-extra-formdata-properties-when-using-object-fromentries-w" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prefix-appears-on-extra-formdata-properties-when-using-object-fromentries-w" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prefix appears on extra FormData properties when using Object.fromEntries() with Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>$ACTION_. When using Object.fromEntries(formData), the result contains extra properties prefixed with $ACTION_ that are used internally by Next.js to route form submissions to the correct Server Action handler.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aAB39" prefix="r4998" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6217852592299328936"],"question":[0,"What is the maximum character length for the path parameter in revalidatePath?"],"answer":[0,"The path parameter must not exceed 1024 characters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The path parameter must not exceed 1024 characters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1a5ND5" prefix="r4999" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6869006423890796580"],"question":[0,"What HTTP status code does redirect() return when used in a Server Action?"],"answer":[0,"303 (See Other). This is different from other contexts where redirect() returns 307 (Temporary Redirect). The 303 status is used for POST-redirect-GET scenarios."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-when-used-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-when-used-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-when-used-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return when used in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>303 (See Other). This is different from other contexts where redirect() returns 307 (Temporary Redirect). The 303 status is used for POST-redirect-GET scenarios.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eHA5B" prefix="r5000" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7018419870329556107"],"question":[0,"Can useFormStatus track a form rendered in a sibling or child component?"],"answer":[0,"No. useFormStatus will only return status information for a parent <form>. It cannot track forms in sibling or nested child components—only ancestor forms that wrap the calling component."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"can-useformstatus-track-a-form-rendered-in-a-sibling-or-child-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-useformstatus-track-a-form-rendered-in-a-sibling-or-child-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-useformstatus-track-a-form-rendered-in-a-sibling-or-child-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can useFormStatus track a form rendered in a sibling or child component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. useFormStatus will only return status information for a parent <form>. It cannot track forms in sibling or nested child components—only ancestor forms that wrap the calling component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZVw61E" prefix="r5001" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7154710265356659234"],"question":[0,"When is the action property null in useFormStatus?"],"answer":[0,"The action property returns null when a URI value is provided to the action prop or when no action prop is specified, or when no parent form exists."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-action-property-null-in-useformstatus"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-action-property-null-in-useformstatus" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-action-property-null-in-useformstatus" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the action property null in useFormStatus?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The action property returns null when a URI value is provided to the action prop or when no action prop is specified, or when no parent form exists.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6clk8" prefix="r5002" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7190240795763593405"],"question":[0,"How do you pass additional arguments like userId to a Server Action?"],"answer":[0,"Use JavaScript's .bind() method. For example: updateUser.bind(null, userId). The first argument of bind() is the context (usually null), followed by the additional arguments. This works in both Server and Client Components and supports progressive enhancement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-pass-additional-arguments-like-userid-to-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-pass-additional-arguments-like-userid-to-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-pass-additional-arguments-like-userid-to-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you pass additional arguments like userId to a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use JavaScript's .bind() method. For example: updateUser.bind(null, userId). The first argument of bind() is the context (usually null), followed by the additional arguments. This works in both Server and Client Components and supports progressive enhancement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dPax7" prefix="r5003" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7283872223408033231"],"question":[0,"What prop allows multiple Server Actions within a single form?"],"answer":[0,"The formAction prop. Elements like <button>, <input type=\"submit\">, and <input type=\"image\"> can use formAction to override the form's default action with different Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-prop-allows-multiple-server-actions-within-a-single-form"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prop-allows-multiple-server-actions-within-a-single-form" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prop-allows-multiple-server-actions-within-a-single-form" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prop allows multiple Server Actions within a single form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The formAction prop. Elements like <button>, <input type="submit">, and <input type="image"> can use formAction to override the form's default action with different Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rDJtC" prefix="r5004" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8136411064279649029"],"question":[0,"Is the path parameter in revalidatePath case-sensitive?"],"answer":[0,"Yes, the path value is case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-path-parameter-in-revalidatepath-case-sensitive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-path-parameter-in-revalidatepath-case-sensitive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-path-parameter-in-revalidatepath-case-sensitive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the path parameter in revalidatePath case-sensitive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the path value is case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kYWYf" prefix="r5005" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8330179765829655557"],"question":[0,"What happens to form submissions in Client Components when JavaScript hasn't loaded yet?"],"answer":[0,"In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, and will be prioritized for hydration. After hydration, the browser does not refresh on form submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-form-submissions-in-client-components-when-javascript-hasn-t-loa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-form-submissions-in-client-components-when-javascript-hasn-t-loa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-form-submissions-in-client-components-when-javascript-hasn-t-loa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to form submissions in Client Components when JavaScript hasn't loaded yet?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, and will be prioritized for hydration. After hydration, the browser does not refresh on form submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1O1ELc" prefix="r5006" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11018356362874551599"],"question":[0,"Where should redirect() be called when using try/catch blocks?"],"answer":[0,"redirect() should be called outside the try block when using try/catch statements because redirect() throws an error to terminate execution."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-redirect-be-called-when-using-try-catch-blocks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-redirect-be-called-when-using-try-catch-blocks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-redirect-be-called-when-using-try-catch-blocks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should redirect() be called when using try/catch blocks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() should be called outside the try block when using try/catch statements because redirect() throws an error to terminate execution.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dyK4a" prefix="r5007" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11105255665133806052"],"question":[0,"Can Server Actions from the client be dispatched in parallel?"],"answer":[0,"No. Server Actions are dispatched and awaited one at a time by the client. They run sequentially and work like a queue. If you need parallel operations, use data fetching in Server Components or perform parallel work inside a single Server Action."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-from-the-client-be-dispatched-in-parallel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-from-the-client-be-dispatched-in-parallel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-from-the-client-be-dispatched-in-parallel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions from the client be dispatched in parallel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Server Actions are dispatched and awaited one at a time by the client. They run sequentially and work like a queue. If you need parallel operations, use data fetching in Server Components or perform parallel work inside a single Server Action.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1VY47k" prefix="r5008" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11176202262009771442"],"question":[0,"When calling revalidatePath with dynamic route segments, when does revalidation occur?"],"answer":[0,"Calling revalidatePath with a dynamic route segment will not immediately trigger many revalidations at once. The revalidation behavior is deferred."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"when-calling-revalidatepath-with-dynamic-route-segments-when-does-revalidation-o"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-calling-revalidatepath-with-dynamic-route-segments-when-does-revalidation-o" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-calling-revalidatepath-with-dynamic-route-segments-when-does-revalidation-o" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When calling revalidatePath with dynamic route segments, when does revalidation occur?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Calling revalidatePath with a dynamic route segment will not immediately trigger many revalidations at once. The revalidation behavior is deferred.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uP5MS" prefix="r5009" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12363914380610714185"],"question":[0,"What are the two valid values for the type parameter in revalidatePath?"],"answer":[0,"'page' (invalidates a specific page file) and 'layout' (invalidates a layout file and all nested layouts/pages beneath it)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-valid-values-for-the-type-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-valid-values-for-the-type-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-valid-values-for-the-type-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two valid values for the type parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'page' (invalidates a specific page file) and 'layout' (invalidates a layout file and all nested layouts/pages beneath it).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2j8ESG" prefix="r5010" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12713855873434973822"],"question":[0,"What properties does useFormStatus return in versions before React 19?"],"answer":[0,"Only the pending key is available in versions before React 19. The data, method, and action properties are only available in React 19."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-useformstatus-return-in-versions-before-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-useformstatus-return-in-versions-before-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-useformstatus-return-in-versions-before-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does useFormStatus return in versions before React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the pending key is available in versions before React 19. The data, method, and action properties are only available in React 19.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ijTBL" prefix="r5011" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12730255652481913528"],"question":[0,"When does revalidatePath take effect if called in a Server Action?"],"answer":[0,"In Server Actions, revalidatePath updates the UI immediately (if viewing the affected path). This differs from Route Handlers where revalidation happens on the next visit to the specified path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-revalidatepath-take-effect-if-called-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-revalidatepath-take-effect-if-called-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-revalidatepath-take-effect-if-called-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does revalidatePath take effect if called in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Server Actions, revalidatePath updates the UI immediately (if viewing the affected path). This differs from Route Handlers where revalidation happens on the next visit to the specified path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SkYdl" prefix="r5012" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13231417456310454475"],"question":[0,"What does useOptimistic allow you to do with form UI?"],"answer":[0,"useOptimistic allows you to optimistically update the UI before the Server Action finishes executing, rather than waiting for the response. It accepts initial state and a reducer function, enabling immediate visual feedback during async operations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-useoptimistic-allow-you-to-do-with-form-ui"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-useoptimistic-allow-you-to-do-with-form-ui" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-useoptimistic-allow-you-to-do-with-form-ui" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does useOptimistic allow you to do with form UI?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useOptimistic allows you to optimistically update the UI before the Server Action finishes executing, rather than waiting for the response. It accepts initial state and a reducer function, enabling immediate visual feedback during async operations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="286yVB" prefix="r5013" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13773292738125890807"],"question":[0,"What is the default browser history behavior for redirect() in Server Actions?"],"answer":[0,"By default, redirect() uses 'push' in Server Actions, which adds a new entry to the browser history stack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-browser-history-behavior-for-redirect-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-browser-history-behavior-for-redirect-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-browser-history-behavior-for-redirect-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default browser history behavior for redirect() in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, redirect() uses 'push' in Server Actions, which adds a new entry to the browser history stack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="loading-ui-and-streaming-http-status-and-error-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Loading UI and Streaming > HTTP Status and Error Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 23 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1qUGLJ" prefix="r5014" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"358997268657771669"],"question":[0,"What HTTP status code does notFound() return for streamed vs non-streamed responses?"],"answer":[0,"Next.js returns a 200 HTTP status code for streamed responses, and 404 for non-streamed responses when the notFound() function is invoked. This commonly occurs when using loading.tsx files, as with loading.tsx you are wrapping it inside suspense and streaming the component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-notfound-return-for-streamed-vs-non-streamed-response"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-notfound-return-for-streamed-vs-non-streamed-response" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-notfound-return-for-streamed-vs-non-streamed-response" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does notFound() return for streamed vs non-streamed responses?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js returns a 200 HTTP status code for streamed responses, and 404 for non-streamed responses when the notFound() function is invoked. This commonly occurs when using loading.tsx files, as with loading.tsx you are wrapping it inside suspense and streaming the component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eocdA" prefix="r5015" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"445188947617956361"],"question":[0,"How do error messages differ between development and production in Next.js error.js?"],"answer":[0,"During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging. During production, the Error object forwarded to the client only includes a generic message and digest property to avoid leaking potentially sensitive details included in the error to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-error-messages-differ-between-development-and-production-in-next-js-error"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-error-messages-differ-between-development-and-production-in-next-js-error" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-error-messages-differ-between-development-and-production-in-next-js-error" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do error messages differ between development and production in Next.js error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging. During production, the Error object forwarded to the client only includes a generic message and digest property to avoid leaking potentially sensitive details included in the error to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="eOdaU" prefix="r5016" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1406298611762607324"],"question":[0,"What two props does an error.js component receive in Next.js?"],"answer":[0,"An error.js component receives two props: 'error' (an Error object with an optional digest property: Error & { digest?: string }) and 'reset' (a function with signature () => void that attempts to re-render the error boundary's content)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-props-does-an-error-js-component-receive-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-props-does-an-error-js-component-receive-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-props-does-an-error-js-component-receive-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two props does an error.js component receive in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An error.js component receives two props: 'error' (an Error object with an optional digest property: Error & { digest?: string }) and 'reset' (a function with signature () => void that attempts to re-render the error boundary's content).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z194gGn" prefix="r5017" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2021326688600797751"],"question":[0,"What HTTP status code does redirect() return by default in Next.js?"],"answer":[0,"The redirect() function returns a 307 (Temporary Redirect) status code by default. However, when used in a server action, it will serve a 303 (See Other) HTTP redirect response to the caller."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-by-default-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-by-default-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-by-default-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return by default in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The redirect() function returns a 307 (Temporary Redirect) status code by default. However, when used in a server action, it will serve a 303 (See Other) HTTP redirect response to the caller.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1f8cGx" prefix="r5018" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3075534057350634929"],"question":[0,"Can you change the HTTP status code after streaming has started in Next.js?"],"answer":[0,"No. To start streaming, the response headers must be set, which is why it is not possible to change the status code after streaming started. Because the response headers have already been sent to the client, the status code of the response cannot be updated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-change-the-http-status-code-after-streaming-has-started-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-change-the-http-status-code-after-streaming-has-started-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-change-the-http-status-code-after-streaming-has-started-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you change the HTTP status code after streaming has started in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. To start streaming, the response headers must be set, which is why it is not possible to change the status code after streaming started. Because the response headers have already been sent to the client, the status code of the response cannot be updated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhkJp8" prefix="r5019" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3085916122593260373"],"question":[0,"What meta tag does Next.js include when streaming a 404 page to prevent search engine indexing?"],"answer":[0,"When a 404 page is streamed to the client (returning 200 status), Next.js includes a <meta name='robots' content='noindex'> tag in the streamed HTML, which prevents search engines from indexing that URL even if the HTTP status is 200."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/53225"]]],"topic":[0,"nextjs"],"slug":[0,"what-meta-tag-does-next-js-include-when-streaming-a-404-page-to-prevent-search-e"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-meta-tag-does-next-js-include-when-streaming-a-404-page-to-prevent-search-e" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-meta-tag-does-next-js-include-when-streaming-a-404-page-to-prevent-search-e" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What meta tag does Next.js include when streaming a 404 page to prevent search engine indexing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a 404 page is streamed to the client (returning 200 status), Next.js includes a <meta name='robots' content='noindex'> tag in the streamed HTML, which prevents search engines from indexing that URL even if the HTTP status is 200.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/53225" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="qi9fD" prefix="r5020" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3367871437267869567"],"question":[0,"How do errors bubble up in Next.js nested route hierarchy?"],"answer":[0,"Errors bubble up to the nearest parent error boundary, which means an error.js file will handle errors for all its nested child segments. This allows for granular error handling by placing error.js files at different levels in the route hierarchy."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-errors-bubble-up-in-next-js-nested-route-hierarchy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-errors-bubble-up-in-next-js-nested-route-hierarchy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-errors-bubble-up-in-next-js-nested-route-hierarchy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do errors bubble up in Next.js nested route hierarchy?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Errors bubble up to the nearest parent error boundary, which means an error.js file will handle errors for all its nested child segments. This allows for granular error handling by placing error.js files at different levels in the route hierarchy.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1G9bps" prefix="r5021" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6482948261120872039"],"question":[0,"Do Next.js error boundaries catch errors in event handlers?"],"answer":[0,"No. Error boundaries don't catch errors inside event handlers. They're designed to catch errors during rendering to show a fallback UI instead of crashing the whole app. In general, errors in event handlers or async code aren't handled by error boundaries because they run after rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-error-boundaries-catch-errors-in-event-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-error-boundaries-catch-errors-in-event-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-error-boundaries-catch-errors-in-event-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js error boundaries catch errors in event handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Error boundaries don't catch errors inside event handlers. They're designed to catch errors during rendering to show a fallback UI instead of crashing the whole app. In general, errors in event handlers or async code aren't handled by error boundaries because they run after rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="jkdmS" prefix="r5022" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7392172196523106083"],"question":[0,"What happens to redirect() during streaming in Next.js?"],"answer":[0,"When used in a streaming context, the redirect function will insert a meta tag to emit the redirect on the client side. During streaming, Next.js cannot send HTTP redirect status codes (since headers have already been sent), so it falls back to client-side redirection via meta tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-redirect-during-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-redirect-during-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-redirect-during-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to redirect() during streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When used in a streaming context, the redirect function will insert a meta tag to emit the redirect on the client side. During streaming, Next.js cannot send HTTP redirect status codes (since headers have already been sent), so it falls back to client-side redirection via meta tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhhtQ" prefix="r5023" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7545874043817784964"],"question":[0,"What is the purpose of global-error.js in Next.js?"],"answer":[0,"global-error.js is used to handle errors in the root layout.js and template.js components. It must be placed in the root app directory and is the least granular error UI, serving as 'catch-all' error handling for the whole application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-global-error-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-global-error-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-global-error-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of global-error.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js is used to handle errors in the root layout.js and template.js components. It must be placed in the root app directory and is the least granular error UI, serving as 'catch-all' error handling for the whole application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ekCSM" prefix="r5024" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7811401953589657238"],"question":[0,"What error does invoking notFound() throw in Next.js?"],"answer":[0,"Invoking the notFound() function throws a NEXT_HTTP_ERROR_FALLBACK;404 error (also referenced as NEXT_NOT_FOUND in some contexts) and terminates rendering of the route segment in which it was thrown."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-does-invoking-notfound-throw-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-does-invoking-notfound-throw-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-does-invoking-notfound-throw-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error does invoking notFound() throw in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Invoking the notFound() function throws a NEXT_HTTP_ERROR_FALLBACK;404 error (also referenced as NEXT_NOT_FOUND in some contexts) and terminates rendering of the route segment in which it was thrown.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24vt0d" prefix="r5025" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8264359242769456722"],"question":[0,"Why does Next.js use 307 and 308 status codes instead of 302 and 301?"],"answer":[0,"Next.js uses the 307 temporary redirect and 308 permanent redirect status codes to explicitly preserve the request method used. Traditionally a 302 was used for a temporary redirect and a 301 for a permanent redirect, but many browsers changed the request method of the redirect to GET, regardless of the original method."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"why-does-next-js-use-307-and-308-status-codes-instead-of-302-and-301"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-does-next-js-use-307-and-308-status-codes-instead-of-302-and-301" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-does-next-js-use-307-and-308-status-codes-instead-of-302-and-301" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why does Next.js use 307 and 308 status codes instead of 302 and 301?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses the 307 temporary redirect and 308 permanent redirect status codes to explicitly preserve the request method used. Traditionally a 302 was used for a temporary redirect and a 301 for a permanent redirect, but many browsers changed the request method of the redirect to GET, regardless of the original method.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="G9fzM" prefix="r5026" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9012537736834509096"],"question":[0,"What HTTP status code does Next.js return when streaming a response?"],"answer":[0,"When streaming, a 200 status code will be returned to signal that the request was successful. The server can still communicate errors or issues to the client within the streamed content itself, for example when using redirect or notFound."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-return-when-streaming-a-response"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-return-when-streaming-a-response" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-return-when-streaming-a-response" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js return when streaming a response?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When streaming, a 200 status code will be returned to signal that the request was successful. The server can still communicate errors or issues to the client within the streamed content itself, for example when using redirect or notFound.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRnk6l" prefix="r5027" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9071113662845909577"],"question":[0,"What is the purpose of the error.digest property in Next.js?"],"answer":[0,"The error.digest is an automatically generated hash of the error thrown that can be used to match the corresponding error in server-side logs. It is generated to avoid leaking potentially sensitive details included in the error to the client in production."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-error-digest-property-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-error-digest-property-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-error-digest-property-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the error.digest property in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The error.digest is an automatically generated hash of the error thrown that can be used to match the corresponding error in server-side logs. It is generated to avoid leaking potentially sensitive details included in the error to the client in production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Sk31Q" prefix="r5028" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9959342151865735320"],"question":[0,"Must error.js files be Client Components in Next.js?"],"answer":[0,"Yes. Error boundaries must be Client Components, requiring the 'use client' directive at the top of error.js files. This is because error components need to handle interactive features like the reset() function and use React hooks like useEffect()."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-js-files-be-client-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-js-files-be-client-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-js-files-be-client-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.js files be Client Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Error boundaries must be Client Components, requiring the 'use client' directive at the top of error.js files. This is because error components need to handle interactive features like the reset() function and use React hooks like useEffect().</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xfMhQ" prefix="r5029" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10373351158958674457"],"question":[0,"What file does Next.js use to handle unmatched URLs for the whole application?"],"answer":[0,"The root app/not-found.js file handles any unmatched URLs for your whole application, meaning users that visit a URL that is not handled by your app will be shown the UI exported by the app/not-found.js file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-use-to-handle-unmatched-urls-for-the-whole-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-use-to-handle-unmatched-urls-for-the-whole-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-use-to-handle-unmatched-urls-for-the-whole-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js use to handle unmatched URLs for the whole application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The root app/not-found.js file handles any unmatched URLs for your whole application, meaning users that visit a URL that is not handled by your app will be shown the UI exported by the app/not-found.js file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JFhIA" prefix="r5030" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11348181073807796243"],"question":[0,"What does loading.js automatically wrap components with in Next.js?"],"answer":[0,"loading.js will be nested inside layout.js and will automatically wrap the page.js file and any children below in a <Suspense> boundary. This creates an instant loading state shown immediately upon navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-loading-js-automatically-wrap-components-with-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-loading-js-automatically-wrap-components-with-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-loading-js-automatically-wrap-components-with-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does loading.js automatically wrap components with in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js will be nested inside layout.js and will automatically wrap the page.js file and any children below in a <Suspense> boundary. This creates an instant loading state shown immediately upon navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZBerNX" prefix="r5031" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12413806216518003981"],"question":[0,"What does the reset() function do in Next.js error boundaries?"],"answer":[0,"The reset function can be used to prompt the user to attempt to recover from an error. When executed, the function will try to re-render the error boundary's content. If successful, the fallback error component is replaced with the result of the re-render."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-reset-function-do-in-next-js-error-boundaries"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-reset-function-do-in-next-js-error-boundaries" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-reset-function-do-in-next-js-error-boundaries" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the reset() function do in Next.js error boundaries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The reset function can be used to prompt the user to attempt to recover from an error. When executed, the function will try to re-render the error boundary's content. If successful, the fallback error component is replaced with the result of the re-render.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vTfIc" prefix="r5032" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12501407359788556533"],"question":[0,"How should you handle 404s to ensure the correct status code when using streaming?"],"answer":[0,"You should fetch, validate, then immediately call notFound() if needed, and only then return JSX. Once any HTML is flushed, the status code is locked. Ensure the resource exists before the response body is streamed so that the server can set the HTTP status code."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/61486"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-handle-404s-to-ensure-the-correct-status-code-when-using-streamin"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-handle-404s-to-ensure-the-correct-status-code-when-using-streamin" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-handle-404s-to-ensure-the-correct-status-code-when-using-streamin" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you handle 404s to ensure the correct status code when using streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should fetch, validate, then immediately call notFound() if needed, and only then return JSX. Once any HTML is flushed, the status code is locked. Ensure the resource exists before the response body is streamed so that the server can set the HTTP status code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/61486" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1C39UJ" prefix="r5033" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12600004348851551871"],"question":[0,"Are metadata exports supported in global-error.js?"],"answer":[0,"No. Error boundaries must be Client Components, which means that metadata and generateMetadata exports are not supported in global-error.jsx."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"are-metadata-exports-supported-in-global-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-metadata-exports-supported-in-global-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-metadata-exports-supported-in-global-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are metadata exports supported in global-error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Error boundaries must be Client Components, which means that metadata and generateMetadata exports are not supported in global-error.jsx.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fX8jx" prefix="r5034" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12938916358162944686"],"question":[0,"Should you use 'return notFound()' in Next.js?"],"answer":[0,"No. notFound does not return a component. Simply call notFound() without returning it, as notFound() does not require you to use return notFound() due to using the TypeScript never type."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-use-return-notfound-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-use-return-notfound-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-use-return-notfound-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you use 'return notFound()' in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. notFound does not return a component. Simply call notFound() without returning it, as notFound() does not require you to use return notFound() due to using the TypeScript never type.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13GpDt" prefix="r5035" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13654391303642289629"],"question":[0,"Must global-error.js define its own HTML structure in Next.js?"],"answer":[0,"Yes. Global error UI must define its own <html> and <body> tags, global styles, fonts, or other dependencies that your error page requires. This file replaces the root layout or template when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"must-global-error-js-define-its-own-html-structure-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-global-error-js-define-its-own-html-structure-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-global-error-js-define-its-own-html-structure-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must global-error.js define its own HTML structure in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Global error UI must define its own <html> and <body> tags, global styles, fonts, or other dependencies that your error page requires. This file replaces the root layout or template when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="pIsCD" prefix="r5036" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15114845334740512755"],"question":[0,"Can you call notFound() in the root layout in Next.js?"],"answer":[0,"No. It is not allowed to call notFound() on the root layout. If you need to handle not found cases, you'll need to move the notFound() call to a page component instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-call-notfound-in-the-root-layout-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-call-notfound-in-the-root-layout-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-call-notfound-in-the-root-layout-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you call notFound() in the root layout in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It is not allowed to call notFound() on the root layout. If you need to handle not found cases, you'll need to move the notFound() call to a page component instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="typescript-component-type-safety" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">TypeScript > Component Type Safety</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 23 questions </span> </div> <div class="space-y-4"> <astro-island uid="1pX2Uc" prefix="r5037" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"369865410555384732"],"question":[0,"Where should redirect() be called relative to try/catch blocks?"],"answer":[0,"Call redirect() after try/catch blocks, not inside them. redirect() works by throwing an error, which would be caught by a catch block, preventing the redirect from working properly."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-redirect-be-called-relative-to-try-catch-blocks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-redirect-be-called-relative-to-try-catch-blocks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-redirect-be-called-relative-to-try-catch-blocks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should redirect() be called relative to try/catch blocks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Call redirect() after try/catch blocks, not inside them. redirect() works by throwing an error, which would be caught by a catch block, preventing the redirect from working properly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCkeYS" prefix="r5038" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1176767365689109931"],"question":[0,"What types should you import for Next.js metadata in TypeScript?"],"answer":[0,"Import Metadata and ResolvingMetadata from 'next'. Use Metadata for static metadata exports and for the return type of generateMetadata. Use ResolvingMetadata for the optional parent parameter in generateMetadata to access and extend parent metadata."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-should-you-import-for-next-js-metadata-in-typescript"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-should-you-import-for-next-js-metadata-in-typescript" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-should-you-import-for-next-js-metadata-in-typescript" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types should you import for Next.js metadata in TypeScript?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import Metadata and ResolvingMetadata from 'next'. Use Metadata for static metadata exports and for the return type of generateMetadata. Use ResolvingMetadata for the optional parent parameter in generateMetadata to access and extend parent metadata.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1cdYpg" prefix="r5039" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1376961720478075319"],"question":[0,"What is the default value of the strict setting in Next.js generated tsconfig.json?"],"answer":[0,"Next.js now generates tsconfig.json with \"strict\": true by default. However, historically it defaulted to false, which has been a point of discussion in the community."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-strict-setting-in-next-js-generated-tsconfig-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-strict-setting-in-next-js-generated-tsconfig-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-strict-setting-in-next-js-generated-tsconfig-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the strict setting in Next.js generated tsconfig.json?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js now generates tsconfig.json with "strict": true by default. However, historically it defaulted to false, which has been a point of discussion in the community.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uLv0R" prefix="r5040" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1584479936326119789"],"question":[0,"What TypeScript compiler option does Next.js set by default for module resolution?"],"answer":[0,"Next.js sets \"moduleResolution\": \"bundler\" in the generated tsconfig.json. This is part of the default TypeScript configuration that Next.js creates."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-compiler-option-does-next-js-set-by-default-for-module-resolutio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-compiler-option-does-next-js-set-by-default-for-module-resolutio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-compiler-option-does-next-js-set-by-default-for-module-resolutio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript compiler option does Next.js set by default for module resolution?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js sets "moduleResolution": "bundler" in the generated tsconfig.json. This is part of the default TypeScript configuration that Next.js creates.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZC73us" prefix="r5041" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2229442300971734014"],"question":[0,"What is the type signature for the generateMetadata function?"],"answer":[0,"generateMetadata accepts props with params (Promise<{ id: string }>) and searchParams (Promise<{ [key: string]: string | string[] | undefined }>), and an optional parent parameter of type ResolvingMetadata. It returns Promise<Metadata>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-signature-for-the-generatemetadata-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-signature-for-the-generatemetadata-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-signature-for-the-generatemetadata-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type signature for the generateMetadata function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateMetadata accepts props with params (Promise<{ id: string }>) and searchParams (Promise<{ [key: string]: string | string[] | undefined }>), and an optional parent parameter of type ResolvingMetadata. It returns Promise<Metadata>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2cbLpg" prefix="r5042" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2459046381725310898"],"question":[0,"What command generates TypeScript definitions for routes without performing a full build?"],"answer":[0,"The next typegen command generates TypeScript definitions for your application's routes without performing a full build. This is useful for IDE autocomplete and CI type-checking of route usage."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-generates-typescript-definitions-for-routes-without-performing-a-fu"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-generates-typescript-definitions-for-routes-without-performing-a-fu" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-generates-typescript-definitions-for-routes-without-performing-a-fu" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command generates TypeScript definitions for routes without performing a full build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The next typegen command generates TypeScript definitions for your application's routes without performing a full build. This is useful for IDE autocomplete and CI type-checking of route usage.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqSwfa" prefix="r5043" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2516281247875930831"],"question":[0,"What is the type signature for Route Handler context params in Next.js 15?"],"answer":[0,"The context params type is Promise<{ [key: string]: string | string[] }>. The signature is: export async function GET(request: Request, { params }: { params: Promise<{ team: string }> }). You must await params before accessing its properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-signature-for-route-handler-context-params-in-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-signature-for-route-handler-context-params-in-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-signature-for-route-handler-context-params-in-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type signature for Route Handler context params in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The context params type is Promise<{ [key: string]: string | string[] }>. The signature is: export async function GET(request: Request, { params }: { params: Promise<{ team: string }> }). You must await params before accessing its properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7sjKp" prefix="r5044" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2762663883521676565"],"question":[0,"What is the type signature of searchParams in Next.js App Router page components?"],"answer":[0,"searchParams is a Promise that resolves to an object with type Promise<{ [key: string]: string | string[] | undefined }>. In Next.js 15, you must await searchParams before accessing its properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-signature-of-searchparams-in-next-js-app-router-page-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-signature-of-searchparams-in-next-js-app-router-page-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-signature-of-searchparams-in-next-js-app-router-page-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type signature of searchParams in Next.js App Router page components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>searchParams is a Promise that resolves to an object with type Promise<{ [key: string]: string | string[] | undefined }>. In Next.js 15, you must await searchParams before accessing its properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20M9rN" prefix="r5045" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4475590748253516427"],"question":[0,"Do Next.js layout components receive the searchParams prop?"],"answer":[0,"No. Layouts (Server Components) do not receive the searchParams prop because a shared layout is not re-rendered during navigation, which could lead to stale searchParams between navigations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/layout"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-layout-components-receive-the-searchparams-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-layout-components-receive-the-searchparams-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-layout-components-receive-the-searchparams-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js layout components receive the searchParams prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Layouts (Server Components) do not receive the searchParams prop because a shared layout is not re-rendered during navigation, which could lead to stale searchParams between navigations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/layout" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2owuWi" prefix="r5046" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4668222334052109669"],"question":[0,"What TypeScript type does the notFound() function return?"],"answer":[0,"notFound() returns the never type, so you do not need to use return notFound(). Calling notFound() throws a NEXT_HTTP_ERROR_FALLBACK;404 error and terminates rendering of the route segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/not-found"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-does-the-notfound-function-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-does-the-notfound-function-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-does-the-notfound-function-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type does the notFound() function return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>notFound() returns the never type, so you do not need to use return notFound(). Calling notFound() throws a NEXT_HTTP_ERROR_FALLBACK;404 error and terminates rendering of the route segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/not-found" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vUwir" prefix="r5047" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4861513413040361748"],"question":[0,"How do you use the PageProps global type helper with a specific route in the App Router?"],"answer":[0,"Pass the route path as a type parameter: export default async function Page(props: PageProps<'/blog/[slug]'>). Then await props.params to access the typed parameters: const { slug } = await props.params. No imports are required as PageProps is globally available."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-the-pageprops-global-type-helper-with-a-specific-route-in-the-app"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-the-pageprops-global-type-helper-with-a-specific-route-in-the-app" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-the-pageprops-global-type-helper-with-a-specific-route-in-the-app" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use the PageProps global type helper with a specific route in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pass the route path as a type parameter: export default async function Page(props: PageProps<'/blog/[slug]'>). Then await props.params to access the typed parameters: const { slug } = await props.params. No imports are required as PageProps is globally available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YsEuV" prefix="r5048" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5198714220312919865"],"question":[0,"What TypeScript type does the redirect() function return?"],"answer":[0,"redirect() returns the never type, so you do not need to use return redirect(). The function accepts two arguments: redirect(path, type) where type comes from the RedirectType enum (RedirectType.replace or RedirectType.push)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-typescript-type-does-the-redirect-function-return"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typescript-type-does-the-redirect-function-return" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typescript-type-does-the-redirect-function-return" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What TypeScript type does the redirect() function return?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() returns the never type, so you do not need to use return redirect(). The function accepts two arguments: redirect(path, type) where type comes from the RedirectType enum (RedirectType.replace or RedirectType.push).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZPQdXL" prefix="r5049" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5278820538273060121"],"question":[0,"What file does Next.js generate for typed routes and where is it located?"],"answer":[0,"Next.js generates a link definition file in .next/types that contains information about all existing routes in your application. This file is used by TypeScript to provide feedback in your editor about invalid links."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-generate-for-typed-routes-and-where-is-it-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-generate-for-typed-routes-and-where-is-it-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-generate-for-typed-routes-and-where-is-it-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js generate for typed routes and where is it located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates a link definition file in .next/types that contains information about all existing routes in your application. This file is used by TypeScript to provide feedback in your editor about invalid links.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/typedRoutes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oIQ5I" prefix="r5050" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7497938884976986844"],"question":[0,"What is the recommended way to select the TypeScript version in VS Code for Next.js projects?"],"answer":[0,"Open the command palette (Ctrl/⌘ + Shift + P) and search for 'TypeScript: Select TypeScript Version', then choose 'Use Workspace Version'. VS Code should use the workspace version (installed by Next.js) rather than the built-in TypeScript version."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-way-to-select-the-typescript-version-in-vs-code-for-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-way-to-select-the-typescript-version-in-vs-code-for-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-way-to-select-the-typescript-version-in-vs-code-for-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended way to select the TypeScript version in VS Code for Next.js projects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Open the command palette (Ctrl/⌘ + Shift + P) and search for 'TypeScript: Select TypeScript Version', then choose 'Use Workspace Version'. VS Code should use the workspace version (installed by Next.js) rather than the built-in TypeScript version.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="epHD9" prefix="r5051" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9831876145916115345"],"question":[0,"Can you export both the metadata object and generateMetadata function from the same route segment?"],"answer":[0,"No. You cannot export both the metadata object and generateMetadata function from the same route segment. They are mutually exclusive exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-export-both-the-metadata-object-and-generatemetadata-function-from-the-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you export both the metadata object and generateMetadata function from the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot export both the metadata object and generateMetadata function from the same route segment. They are mutually exclusive exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18vYik" prefix="r5052" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10975418894130603802"],"question":[0,"Should you use type annotation (colon) or the satisfies operator when typing getStaticProps and getServerSideProps?"],"answer":[0,"Use the satisfies operator, not type annotation. When you use GetStaticProps as a type annotation (with a colon), TypeScript won't infer the returned props, and InferGetStaticPropsType will resolve to { [key: string]: any }. The satisfies keyword allows proper type inference. Syntax: export const getStaticProps = (async () => {...}) satisfies GetStaticProps<{ repo: Repo }>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-use-type-annotation-colon-or-the-satisfies-operator-when-typing-getst"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-use-type-annotation-colon-or-the-satisfies-operator-when-typing-getst" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-use-type-annotation-colon-or-the-satisfies-operator-when-typing-getst" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you use type annotation (colon) or the satisfies operator when typing getStaticProps and getServerSideProps?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the satisfies operator, not type annotation. When you use GetStaticProps as a type annotation (with a colon), TypeScript won't infer the returned props, and InferGetStaticPropsType will resolve to { [key: string]: any }. The satisfies keyword allows proper type inference. Syntax: export const getStaticProps = (async () => {...}) satisfies GetStaticProps<{ repo: Repo }></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xUxUf" prefix="r5053" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11138018314635836727"],"question":[0,"What codemod is available to convert synchronous dynamic API usage to asynchronous in Next.js 15?"],"answer":[0,"The next-async-request-api codemod converts synchronous use of cookies(), headers(), draftMode(), searchParams, and params into asynchronous use to handle the Next.js 15 breaking change."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-is-available-to-convert-synchronous-dynamic-api-usage-to-asynchrono"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-is-available-to-convert-synchronous-dynamic-api-usage-to-asynchrono" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-is-available-to-convert-synchronous-dynamic-api-usage-to-asynchrono" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod is available to convert synchronous dynamic API usage to asynchronous in Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The next-async-request-api codemod converts synchronous use of cookies(), headers(), draftMode(), searchParams, and params into asynchronous use to handle the Next.js 15 breaking change.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2p8IKc" prefix="r5054" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11234952940861273149"],"question":[0,"Which Next.js HTTP methods are supported in Route Handlers and what is their basic type signature?"],"answer":[0,"Route Handlers support GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS methods. Each has the signature: export async function GET(request: Request) {}. The request parameter can be typed as NextRequest from 'next/server' for additional helpers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"which-next-js-http-methods-are-supported-in-route-handlers-and-what-is-their-bas"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-next-js-http-methods-are-supported-in-route-handlers-and-what-is-their-bas" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-next-js-http-methods-are-supported-in-route-handlers-and-what-is-their-bas" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Next.js HTTP methods are supported in Route Handlers and what is their basic type signature?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Route Handlers support GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS methods. Each has the signature: export async function GET(request: Request) {}. The request parameter can be typed as NextRequest from 'next/server' for additional helpers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NFRvo" prefix="r5055" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11609798000068212772"],"question":[0,"What props does an error.tsx component receive?"],"answer":[0,"error.tsx components receive two props: error (the error object that was thrown) and reset (a function to reset the error boundary). The component must be a Client Component with 'use client' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-props-does-an-error-tsx-component-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-props-does-an-error-tsx-component-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-props-does-an-error-tsx-component-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What props does an error.tsx component receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>error.tsx components receive two props: error (the error object that was thrown) and reset (a function to reset the error boundary). The component must be a Client Component with 'use client' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2dbl2x" prefix="r5056" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11652338250929044897"],"question":[0,"What is the type signature of params in Next.js 15 App Router page components?"],"answer":[0,"In Next.js 15, params is a Promise that resolves to an object. The type signature is Promise<{ [key: string]: string | string[] | undefined }>. This is a breaking change from Next.js 14 where params was synchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/page"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-signature-of-params-in-next-js-15-app-router-page-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-signature-of-params-in-next-js-15-app-router-page-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-signature-of-params-in-next-js-15-app-router-page-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type signature of params in Next.js 15 App Router page components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Next.js 15, params is a Promise that resolves to an object. The type signature is Promise<{ [key: string]: string | string[] | undefined }>. This is a breaking change from Next.js 14 where params was synchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/page" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1I6DNE" prefix="r5057" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13700828064367315961"],"question":[0,"What types should you use for Route Handler request and response in the App Router?"],"answer":[0,"Import NextRequest from 'next/server' for the request parameter. Use NextResponse from 'next/server' for the response. The signature is: export async function GET(request: NextRequest). NextRequest and NextResponse extend the Web Request and Response APIs with convenient helpers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-should-you-use-for-route-handler-request-and-response-in-the-app-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-should-you-use-for-route-handler-request-and-response-in-the-app-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-should-you-use-for-route-handler-request-and-response-in-the-app-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types should you use for Route Handler request and response in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import NextRequest from 'next/server' for the request parameter. Use NextResponse from 'next/server' for the response. The signature is: export async function GET(request: NextRequest). NextRequest and NextResponse extend the Web Request and Response APIs with convenient helpers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1j8RXM" prefix="r5058" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13856839582231177809"],"question":[0,"What types should you import for Next.js middleware?"],"answer":[0,"Import NextRequest and NextResponse from 'next/server'. The middleware function signature is: (request: NextRequest) => NextResponse | void. For advanced typing, use NextMiddleware type: (request: NextRequest, event: NextFetchEvent) => NextMiddlewareResult | Promise<NextMiddlewareResult>."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-should-you-import-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-should-you-import-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-should-you-import-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types should you import for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import NextRequest and NextResponse from 'next/server'. The middleware function signature is: (request: NextRequest) => NextResponse | void. For advanced typing, use NextMiddleware type: (request: NextRequest, event: NextFetchEvent) => NextMiddlewareResult | Promise<NextMiddlewareResult>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2wHLjF" prefix="r5059" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14615892946746036102"],"question":[0,"What directive must be added to error.tsx files in the App Router?"],"answer":[0,"'use client' must be added at the top of error.tsx files because error boundaries must be Client Components. Without this directive, you'll get an error that error.tsx needs to be a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-must-be-added-to-error-tsx-files-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-must-be-added-to-error-tsx-files-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-must-be-added-to-error-tsx-files-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive must be added to error.tsx files in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'use client' must be added at the top of error.tsx files because error boundaries must be Client Components. Without this directive, you'll get an error that error.tsx needs to be a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="image-optimization-loading-states-and-placeholders" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Image Optimization > Loading States and Placeholders</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 23 questions </span> </div> <div class="space-y-4"> <astro-island uid="17TNNN" prefix="r5060" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"499502280512281220"],"question":[0,"What parameter does the onLoadingComplete callback receive versus the onLoad callback?"],"answer":[0,"onLoadingComplete receives one argument - a reference to the underlying <img> element directly. onLoad receives one argument - the event object which has a target that references the underlying <img> element."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameter-does-the-onloadingcomplete-callback-receive-versus-the-onload-cal"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameter-does-the-onloadingcomplete-callback-receive-versus-the-onload-cal" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameter-does-the-onloadingcomplete-callback-receive-versus-the-onload-cal" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameter does the onLoadingComplete callback receive versus the onLoad callback?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onLoadingComplete receives one argument - a reference to the underlying <img> element directly. onLoad receives one argument - the event object which has a target that references the underlying <img> element.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1pceAF" prefix="r5061" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1165719083305318885"],"question":[0,"What is the recommended maximum size for blurDataURL images in Next.js?"],"answer":[0,"10px or less. The image is automatically enlarged and blurred, so a very small image (10px or less) is recommended."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-maximum-size-for-blurdataurl-images-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-maximum-size-for-blurdataurl-images-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-maximum-size-for-blurdataurl-images-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended maximum size for blurDataURL images in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>10px or less. The image is automatically enlarged and blurred, so a very small image (10px or less) is recommended.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ant1h" prefix="r5062" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2322316994829667830"],"question":[0,"What is the default value of the placeholder prop for the Next.js Image component?"],"answer":[0,"\"empty\""],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-placeholder-prop-for-the-next-js-image-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-placeholder-prop-for-the-next-js-image-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-placeholder-prop-for-the-next-js-image-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the placeholder prop for the Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"empty"</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2aWKYN" prefix="r5063" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2484555717352977091"],"question":[0,"What error message appears when using placeholder=\"blur\" without blurDataURL for dynamic images?"],"answer":[0,"Image with src '/[path]' has 'placeholder=\"blur\"' property but is missing the 'blurDataURL' property. Possible solutions: Add a \"blurDataURL\" property, change the \"src\" property to a static import with supported file types (jpeg, png, webp, avif), or remove the \"placeholder\" property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/placeholder-blur-data-url"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-message-appears-when-using-placeholder-blur-without-blurdataurl-for-d"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-message-appears-when-using-placeholder-blur-without-blurdataurl-for-d" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-message-appears-when-using-placeholder-blur-without-blurdataurl-for-d" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error message appears when using placeholder="blur" without blurDataURL for dynamic images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Image with src '/[path]' has 'placeholder="blur"' property but is missing the 'blurDataURL' property. Possible solutions: Add a "blurDataURL" property, change the "src" property to a static import with supported file types (jpeg, png, webp, avif), or remove the "placeholder" property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/placeholder-blur-data-url" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="AhFP7" prefix="r5064" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2991745401886303942"],"question":[0,"When is the onLoad callback invoked for Next.js Image component?"],"answer":[0,"Once the image is completely loaded and the placeholder has been removed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-onload-callback-invoked-for-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-onload-callback-invoked-for-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-onload-callback-invoked-for-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the onLoad callback invoked for Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Once the image is completely loaded and the placeholder has been removed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZO0C9l" prefix="r5065" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4886014497573046452"],"question":[0,"What property replaced the priority prop in Next.js 16?"],"answer":[0,"The preload property. Starting with Next.js 16, the priority property has been deprecated in favor of the preload property in order to make the behavior clear."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-property-replaced-the-priority-prop-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-property-replaced-the-priority-prop-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-property-replaced-the-priority-prop-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What property replaced the priority prop in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The preload property. Starting with Next.js 16, the priority property has been deprecated in favor of the preload property in order to make the behavior clear.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZMu3df" prefix="r5066" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5197311545638204580"],"question":[0,"Which image formats support automatic blurDataURL generation for statically imported images in Next.js?"],"answer":[0,"jpg, png, webp, and avif files - unless the image is animated."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"which-image-formats-support-automatic-blurdataurl-generation-for-statically-impo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-image-formats-support-automatic-blurdataurl-generation-for-statically-impo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-image-formats-support-automatic-blurdataurl-generation-for-statically-impo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which image formats support automatic blurDataURL generation for statically imported images in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>jpg, png, webp, and avif files - unless the image is animated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="21JXut" prefix="r5067" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5653139315958908165"],"question":[0,"What is the replacement for the deprecated onLoadingComplete callback in Next.js 14?"],"answer":[0,"onLoad. The onLoadingComplete prop is deprecated in Next.js 14, and developers should use onLoad instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-replacement-for-the-deprecated-onloadingcomplete-callback-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-replacement-for-the-deprecated-onloadingcomplete-callback-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-replacement-for-the-deprecated-onloadingcomplete-callback-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the replacement for the deprecated onLoadingComplete callback in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>onLoad. The onLoadingComplete prop is deprecated in Next.js 14, and developers should use onLoad instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hOuIE" prefix="r5068" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5660769222360386298"],"question":[0,"What is the default value of the loading prop for Next.js Image component?"],"answer":[0,"\"lazy\" - defers loading the image until it reaches a calculated distance from the viewport."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-loading-prop-for-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-loading-prop-for-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-loading-prop-for-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the loading prop for Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"lazy" - defers loading the image until it reaches a calculated distance from the viewport.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mykTM" prefix="r5069" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6868743921407441761"],"question":[0,"What component type is required when using onLoad or onLoadingComplete callbacks in Next.js Image?"],"answer":[0,"Client Components. Using props like onLoad or onLoadingComplete, which accept a function, requires using Client Components to serialize the provided function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-component-type-is-required-when-using-onload-or-onloadingcomplete-callbacks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-component-type-is-required-when-using-onload-or-onloadingcomplete-callbacks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-component-type-is-required-when-using-onload-or-onloadingcomplete-callbacks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What component type is required when using onLoad or onLoadingComplete callbacks in Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Client Components. Using props like onLoad or onLoadingComplete, which accept a function, requires using Client Components to serialize the provided function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fdAjY" prefix="r5070" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7718905777448516096"],"question":[0,"Which Safari versions display a gray border while loading images with Next.js Image component?"],"answer":[0,"Safari 15 - 16.3 display a gray border while loading. Safari 16.4 fixed this issue."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"which-safari-versions-display-a-gray-border-while-loading-images-with-next-js-im"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-safari-versions-display-a-gray-border-while-loading-images-with-next-js-im" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-safari-versions-display-a-gray-border-while-loading-images-with-next-js-im" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which Safari versions display a gray border while loading images with Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Safari 15 - 16.3 display a gray border while loading. Safari 16.4 fixed this issue.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2bniGg" prefix="r5071" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8347053377138618279"],"question":[0,"What are the two allowed values for the loading prop in Next.js Image component?"],"answer":[0,"\"lazy\" (defers loading until image nears viewport) and \"eager\" (loads immediately regardless of position)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-allowed-values-for-the-loading-prop-in-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-allowed-values-for-the-loading-prop-in-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-allowed-values-for-the-loading-prop-in-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two allowed values for the loading prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"lazy" (defers loading until image nears viewport) and "eager" (loads immediately regardless of position)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="6tSPk" prefix="r5072" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8585058334716803623"],"question":[0,"What are the two recommended tools for generating blurDataURL according to Next.js documentation?"],"answer":[0,"png-pixel.com (online service) and Plaiceholder (library)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-recommended-tools-for-generating-blurdataurl-according-to-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-recommended-tools-for-generating-blurdataurl-according-to-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-recommended-tools-for-generating-blurdataurl-according-to-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two recommended tools for generating blurDataURL according to Next.js documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>png-pixel.com (online service) and Plaiceholder (library)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tHGoz" prefix="r5073" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8848970344060758032"],"question":[0,"What fetchPriority value should you use for responsive images with art direction in Next.js 16?"],"answer":[0,"fetchPriority=\"high\". You cannot use preload or loading=\"eager\" with responsive images because that would cause both images to load. Instead, you can use fetchPriority=\"high\"."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-fetchpriority-value-should-you-use-for-responsive-images-with-art-direction"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-fetchpriority-value-should-you-use-for-responsive-images-with-art-direction" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-fetchpriority-value-should-you-use-for-responsive-images-with-art-direction" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What fetchPriority value should you use for responsive images with art direction in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>fetchPriority="high". You cannot use preload or loading="eager" with responsive images because that would cause both images to load. Instead, you can use fetchPriority="high".</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1A2b5m" prefix="r5074" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9054348903581195972"],"question":[0,"What happens to lazy loading when the priority prop is set to true on a Next.js Image?"],"answer":[0,"Lazy loading is automatically disabled for images using priority. When priority is true, the image will be considered high priority and preloaded."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-lazy-loading-when-the-priority-prop-is-set-to-true-on-a-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-lazy-loading-when-the-priority-prop-is-set-to-true-on-a-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-lazy-loading-when-the-priority-prop-is-set-to-true-on-a-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to lazy loading when the priority prop is set to true on a Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Lazy loading is automatically disabled for images using priority. When priority is true, the image will be considered high priority and preloaded.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LTbgQ" prefix="r5075" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9187123446591253184"],"question":[0,"What browsers may cause Layout Shift when using width/height of auto with Next.js Image?"],"answer":[0,"Older browsers before Safari 15 that don't preserve the aspect ratio. When using styles with width/height of auto, it is possible to cause Layout Shift on these browsers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-browsers-may-cause-layout-shift-when-using-width-height-of-auto-with-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browsers-may-cause-layout-shift-when-using-width-height-of-auto-with-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browsers-may-cause-layout-shift-when-using-width-height-of-auto-with-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browsers may cause Layout Shift when using width/height of auto with Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Older browsers before Safari 15 that don't preserve the aspect ratio. When using styles with width/height of auto, it is possible to cause Layout Shift on these browsers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1H7TDW" prefix="r5076" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9223135557132841117"],"question":[0,"What happens to the blur placeholder in Safari versions before Safari 12?"],"answer":[0,"When using the blur-up placeholder, older browsers before Safari 12 will fallback to empty placeholder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-the-blur-placeholder-in-safari-versions-before-safari-12"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-the-blur-placeholder-in-safari-versions-before-safari-12" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-the-blur-placeholder-in-safari-versions-before-safari-12" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to the blur placeholder in Safari versions before Safari 12?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using the blur-up placeholder, older browsers before Safari 12 will fallback to empty placeholder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1gPn7r" prefix="r5077" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10136636689148502968"],"question":[0,"What does the default Next.js image loader do with animated images?"],"answer":[0,"The default loader will automatically bypass Image Optimization for animated images and serve the image as-is."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-default-next-js-image-loader-do-with-animated-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-default-next-js-image-loader-do-with-animated-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-default-next-js-image-loader-do-with-animated-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the default Next.js image loader do with animated images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default loader will automatically bypass Image Optimization for animated images and serve the image as-is.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZldDTc" prefix="r5078" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11207143361096653463"],"question":[0,"What are the three allowed values for the placeholder prop in Next.js Image component?"],"answer":[0,"\"empty\" (no placeholder), \"blur\" (blurred image version, requires blurDataURL), and \"data:image/...\" (Data URL as placeholder)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-allowed-values-for-the-placeholder-prop-in-next-js-image-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-allowed-values-for-the-placeholder-prop-in-next-js-image-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-allowed-values-for-the-placeholder-prop-in-next-js-image-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three allowed values for the placeholder prop in Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>"empty" (no placeholder), "blur" (blurred image version, requires blurDataURL), and "data:image/..." (Data URL as placeholder)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2m22UE" prefix="r5079" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11317324983083268447"],"question":[0,"Can you use loading=\"eager\" with the placeholder prop in Next.js Image?"],"answer":[0,"No. Using loading=\"eager\" cannot be used with the placeholder prop because the placeholder will never be removed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-loading-eager-with-the-placeholder-prop-in-next-js-image"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-loading-eager-with-the-placeholder-prop-in-next-js-image" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-loading-eager-with-the-placeholder-prop-in-next-js-image" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use loading="eager" with the placeholder prop in Next.js Image?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Using loading="eager" cannot be used with the placeholder prop because the placeholder will never be removed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1D6ul3" prefix="r5080" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12438147845709676577"],"question":[0,"What performance impact does a large blurDataURL have on Next.js applications?"],"answer":[0,"A large blurDataURL may hurt performance. The documentation recommends keeping it small and simple, as including larger images as placeholders may harm your application performance."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-performance-impact-does-a-large-blurdataurl-have-on-next-js-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-performance-impact-does-a-large-blurdataurl-have-on-next-js-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-performance-impact-does-a-large-blurdataurl-have-on-next-js-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What performance impact does a large blurDataURL have on Next.js applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A large blurDataURL may hurt performance. The documentation recommends keeping it small and simple, as including larger images as placeholders may harm your application performance.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9qJDs" prefix="r5081" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12536403828789042758"],"question":[0,"What should you use instead of the priority prop in Next.js 16 for most cases?"],"answer":[0,"loading=\"eager\" or fetchPriority=\"high\". In most cases, you should use these instead of preload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-use-instead-of-the-priority-prop-in-next-js-16-for-most-cases"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-use-instead-of-the-priority-prop-in-next-js-16-for-most-cases" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-use-instead-of-the-priority-prop-in-next-js-16-for-most-cases" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you use instead of the priority prop in Next.js 16 for most cases?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading="eager" or fetchPriority="high". In most cases, you should use these instead of preload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJCaBY" prefix="r5082" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13925848479036488764"],"question":[0,"What browsers may fallback to eager loading for Next.js Image lazy loading?"],"answer":[0,"Older browsers before Safari 15.4. The next/image component uses browser native lazy loading, which may fallback to eager loading for these browsers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-browsers-may-fallback-to-eager-loading-for-next-js-image-lazy-loading"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browsers-may-fallback-to-eager-loading-for-next-js-image-lazy-loading" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browsers-may-fallback-to-eager-loading-for-next-js-image-lazy-loading" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browsers may fallback to eager loading for Next.js Image lazy loading?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Older browsers before Safari 15.4. The next/image component uses browser native lazy loading, which may fallback to eager loading for these browsers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="route-handlers-route-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Route Handlers > Route Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 23 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1K6kwH" prefix="r5083" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"590937430296500524"],"question":[0,"Can the revalidate value be a computed expression like '60 * 10'?"],"answer":[0,"No, the revalidate value must be statically analyzable. For example, 'revalidate = 600' is valid, but 'revalidate = 60 * 10' is not"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-revalidate-value-be-a-computed-expression-like-60-10"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-revalidate-value-be-a-computed-expression-like-60-10" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-revalidate-value-be-a-computed-expression-like-60-10" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the revalidate value be a computed expression like '60 * 10'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the revalidate value must be statically analyzable. For example, 'revalidate = 600' is valid, but 'revalidate = 60 * 10' is not</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nT6q4" prefix="r5084" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1547785396887900104"],"question":[0,"What is the default value of the 'fetchCache' configuration option?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-fetchcache-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-fetchcache-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-fetchcache-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'fetchCache' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z8oxf9" prefix="r5085" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2103021934398803558"],"question":[0,"What type of values can 'preferredRegion' accept?"],"answer":[0,"'auto', 'global', 'home', a single region string (e.g., 'iad1'), or an array of region strings (e.g., ['iad1', 'sfo1'])"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-type-of-values-can-preferredregion-accept"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-type-of-values-can-preferredregion-accept" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-type-of-values-can-preferredregion-accept" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What type of values can 'preferredRegion' accept?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto', 'global', 'home', a single region string (e.g., 'iad1'), or an array of region strings (e.g., ['iad1', 'sfo1'])</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qGU1i" prefix="r5086" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2506804932017575978"],"question":[0,"What does 'fetchCache = only-no-store' do when a fetch request uses 'cache: force-cache'?"],"answer":[0,"It throws an error, ensuring all fetch requests opt out of caching"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-only-no-store-do-when-a-fetch-request-uses-cache-force-cach"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-only-no-store-do-when-a-fetch-request-uses-cache-force-cach" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-only-no-store-do-when-a-fetch-request-uses-cache-force-cach" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'fetchCache = only-no-store' do when a fetch request uses 'cache: force-cache'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It throws an error, ensuring all fetch requests opt out of caching</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1taOjb" prefix="r5087" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2509098671345004547"],"question":[0,"What does 'fetchCache = default-no-store' set as the default for fetch requests with no cache option?"],"answer":[0,"It sets the default cache option to 'no-store', making all requests without explicit options dynamic"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-default-no-store-set-as-the-default-for-fetch-requests-with"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-default-no-store-set-as-the-default-for-fetch-requests-with" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-default-no-store-set-as-the-default-for-fetch-requests-with" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'fetchCache = default-no-store' set as the default for fetch requests with no cache option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It sets the default cache option to 'no-store', making all requests without explicit options dynamic</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Hn04a" prefix="r5088" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2790133805618618619"],"question":[0,"What is the default value of the 'runtime' configuration option?"],"answer":[0,"'nodejs'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-runtime-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-runtime-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-runtime-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'runtime' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTi1iJ" prefix="r5089" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2840755403299471194"],"question":[0,"What is the default value of the 'dynamic' configuration option in Route Handlers?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamic-configuration-option-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamic-configuration-option-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamic-configuration-option-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'dynamic' configuration option in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Vvcix" prefix="r5090" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2851169062036395995"],"question":[0,"What is the default value of the 'revalidate' configuration option?"],"answer":[0,"false (which means cache indefinitely)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-revalidate-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-revalidate-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-revalidate-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'revalidate' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>false (which means cache indefinitely)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tRImG" prefix="r5091" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3671928932464340843"],"question":[0,"What is the equivalent behavior of 'dynamic = force-dynamic' in terms of fetch options?"],"answer":[0,"It is equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-equivalent-behavior-of-dynamic-force-dynamic-in-terms-of-fetch-optio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-equivalent-behavior-of-dynamic-force-dynamic-in-terms-of-fetch-optio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-equivalent-behavior-of-dynamic-force-dynamic-in-terms-of-fetch-optio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the equivalent behavior of 'dynamic = force-dynamic' in terms of fetch options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is equivalent to setting all fetch requests to { cache: 'no-store', next: { revalidate: 0 } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Kgxxi" prefix="r5092" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4039110067981006466"],"question":[0,"What is the default value of the 'dynamicParams' configuration option?"],"answer":[0,"true"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-dynamicparams-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-dynamicparams-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-dynamicparams-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'dynamicParams' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>true</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OtcvT" prefix="r5093" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4173469951961343775"],"question":[0,"What are all seven possible values for the 'fetchCache' configuration option?"],"answer":[0,"'auto', 'default-cache', 'only-cache', 'force-cache', 'force-no-store', 'default-no-store', and 'only-no-store'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-all-seven-possible-values-for-the-fetchcache-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-all-seven-possible-values-for-the-fetchcache-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-all-seven-possible-values-for-the-fetchcache-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are all seven possible values for the 'fetchCache' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto', 'default-cache', 'only-cache', 'force-cache', 'force-no-store', 'default-no-store', and 'only-no-store'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZwrYzu" prefix="r5094" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4492050746141195207"],"question":[0,"What does 'fetchCache = force-no-store' do to individual fetch request cache options?"],"answer":[0,"It overrides all fetch request cache options to 'no-store', even if they are explicitly set otherwise"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-force-no-store-do-to-individual-fetch-request-cache-options"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-force-no-store-do-to-individual-fetch-request-cache-options" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-force-no-store-do-to-individual-fetch-request-cache-options" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'fetchCache = force-no-store' do to individual fetch request cache options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It overrides all fetch request cache options to 'no-store', even if they are explicitly set otherwise</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1TdswC" prefix="r5095" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4586089529834194138"],"question":[0,"What does 'fetchCache = force-cache' do to individual fetch request cache options?"],"answer":[0,"It overrides all fetch request cache options to 'force-cache', even if they explicitly specify 'no-store'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-force-cache-do-to-individual-fetch-request-cache-options"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-force-cache-do-to-individual-fetch-request-cache-options" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-force-cache-do-to-individual-fetch-request-cache-options" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'fetchCache = force-cache' do to individual fetch request cache options?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It overrides all fetch request cache options to 'force-cache', even if they explicitly specify 'no-store'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="EjiNx" prefix="r5096" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4870768704863492925"],"question":[0,"What does 'fetchCache = default-cache' set as the default for fetch requests with no cache option?"],"answer":[0,"It sets the default cache option to 'force-cache', making even fetch requests after Dynamic APIs static"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-fetchcache-default-cache-set-as-the-default-for-fetch-requests-with-no"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-fetchcache-default-cache-set-as-the-default-for-fetch-requests-with-no" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-fetchcache-default-cache-set-as-the-default-for-fetch-requests-with-no" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'fetchCache = default-cache' set as the default for fetch requests with no cache option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It sets the default cache option to 'force-cache', making even fetch requests after Dynamic APIs static</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GGgCe" prefix="r5097" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5021114048171353438"],"question":[0,"What is the type signature for the params context in Next.js v15 Route Handlers?"],"answer":[0,"{ params: Promise<{ [key: string]: string }> } - for example, { params: Promise<{ slug: string }> }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-type-signature-for-the-params-context-in-next-js-v15-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-type-signature-for-the-params-context-in-next-js-v15-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-type-signature-for-the-params-context-in-next-js-v15-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the type signature for the params context in Next.js v15 Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>{ params: Promise<{ [key: string]: string }> } - for example, { params: Promise<{ slug: string }> }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fTouS" prefix="r5098" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6403089622456496250"],"question":[0,"What happens if OPTIONS method is not explicitly defined in a Route Handler?"],"answer":[0,"Next.js automatically implements OPTIONS and sets the appropriate Response Allow header based on the other methods defined in the route handler"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-options-method-is-not-explicitly-defined-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-options-method-is-not-explicitly-defined-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-options-method-is-not-explicitly-defined-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if OPTIONS method is not explicitly defined in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically implements OPTIONS and sets the appropriate Response Allow header based on the other methods defined in the route handler</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2b2exh" prefix="r5099" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6585844856880436896"],"question":[0,"Is the 'revalidate' option available when using 'runtime = edge'?"],"answer":[0,"No, the revalidate value is not available when using runtime = 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-revalidate-option-available-when-using-runtime-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-revalidate-option-available-when-using-runtime-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-revalidate-option-available-when-using-runtime-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the 'revalidate' option available when using 'runtime = edge'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the revalidate value is not available when using runtime = 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lcbm" prefix="r5100" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6691547562329843681"],"question":[0,"What are the two possible values for the 'runtime' configuration option?"],"answer":[0,"'nodejs' and 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-possible-values-for-the-runtime-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-possible-values-for-the-runtime-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-possible-values-for-the-runtime-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two possible values for the 'runtime' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' and 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23m1YH" prefix="r5101" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11953424946879405976"],"question":[0,"What does 'dynamic = error' do when dynamic functions or uncached data are detected?"],"answer":[0,"It causes an error to be thrown, enforcing that the layout or page must be fully static"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-dynamic-error-do-when-dynamic-functions-or-uncached-data-are-detected"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-dynamic-error-do-when-dynamic-functions-or-uncached-data-are-detected" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-dynamic-error-do-when-dynamic-functions-or-uncached-data-are-detected" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'dynamic = error' do when dynamic functions or uncached data are detected?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It causes an error to be thrown, enforcing that the layout or page must be fully static</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1EUH2f" prefix="r5102" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13898262573544478900"],"question":[0,"What is the minimum Next.js version required for the 'maxDuration' configuration option?"],"answer":[0,"Next.js 13.4.10 or higher"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-next-js-version-required-for-the-maxduration-configuration-o"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-next-js-version-required-for-the-maxduration-configuration-o" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-next-js-version-required-for-the-maxduration-configuration-o" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Next.js version required for the 'maxDuration' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.4.10 or higher</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="11jsxy" prefix="r5103" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14066054310038714878"],"question":[0,"In Next.js v15, is the context.params parameter synchronous or asynchronous?"],"answer":[0,"In v15.0.0-RC, context.params is a promise that must be awaited"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-v15-is-the-context-params-parameter-synchronous-or-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-v15-is-the-context-params-parameter-synchronous-or-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-v15-is-the-context-params-parameter-synchronous-or-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js v15, is the context.params parameter synchronous or asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In v15.0.0-RC, context.params is a promise that must be awaited</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zjld5O" prefix="r5104" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14652009880086131270"],"question":[0,"What is the default value of the 'preferredRegion' configuration option?"],"answer":[0,"'auto'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-the-preferredregion-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-the-preferredregion-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-the-preferredregion-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of the 'preferredRegion' configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'auto'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1BjnGv" prefix="r5105" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15071057362405811602"],"question":[0,"What does 'revalidate = 0' do in a Route Handler?"],"answer":[0,"It ensures the layout or page is always dynamically rendered, even if no Dynamic APIs or uncached data fetches are discovered"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-revalidate-0-do-in-a-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-revalidate-0-do-in-a-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-revalidate-0-do-in-a-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does 'revalidate = 0' do in a Route Handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It ensures the layout or page is always dynamically rendered, even if no Dynamic APIs or uncached data fetches are discovered</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="middleware-request-response-manipulation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Middleware > Request/Response Manipulation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 23 questions </span> </div> <div class="space-y-4"> <astro-island uid="18hBdY" prefix="r5106" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1133256681420264902"],"question":[0,"What error might occur if you set very large headers in middleware?"],"answer":[0,"Setting large headers might cause a '431 Request Header Fields Too Large' error depending on your backend web server configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-might-occur-if-you-set-very-large-headers-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-might-occur-if-you-set-very-large-headers-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-might-occur-if-you-set-very-large-headers-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error might occur if you set very large headers in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting large headers might cause a '431 Request Header Fields Too Large' error depending on your backend web server configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aEoNm" prefix="r5107" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1533416974565299249"],"question":[0,"What types are supported in the 'has' and 'missing' matcher condition items?"],"answer":[0,"The type field must be either 'header', 'cookie', 'host', or 'query'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-are-supported-in-the-has-and-missing-matcher-condition-items"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-are-supported-in-the-has-and-missing-matcher-condition-items" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-are-supported-in-the-has-and-missing-matcher-condition-items" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types are supported in the 'has' and 'missing' matcher condition items?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The type field must be either 'header', 'cookie', 'host', or 'query'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2x0WIg" prefix="r5108" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3970475121566722396"],"question":[0,"Do request headers set with NextResponse.next({ request: { headers } }) get exposed to the client?"],"answer":[0,"No, headers forwarded upstream using `NextResponse.next({ request: { headers } })` modify the headers your server receives and do not expose them to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"do-request-headers-set-with-nextresponse-next-request-headers-get-exposed-to-the"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-request-headers-set-with-nextresponse-next-request-headers-get-exposed-to-the" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-request-headers-set-with-nextresponse-next-request-headers-get-exposed-to-the" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do request headers set with NextResponse.next({ request: { headers } }) get exposed to the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, headers forwarded upstream using <code>NextResponse.next({ request: { headers } })</code> modify the headers your server receives and do not expose them to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kmIiy" prefix="r5109" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4112325036870359417"],"question":[0,"What are the four primary NextResponse operations for manipulating responses in middleware?"],"answer":[0,"1. Redirect: `NextResponse.redirect(new URL(...))`, 2. Rewrite: `NextResponse.rewrite(new URL(...))`, 3. Pass-through: `NextResponse.next()` with optional headers parameter, 4. Direct response: `Response.json()` or custom Response instance."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-primary-nextresponse-operations-for-manipulating-responses-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-primary-nextresponse-operations-for-manipulating-responses-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-primary-nextresponse-operations-for-manipulating-responses-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four primary NextResponse operations for manipulating responses in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Redirect: <code>NextResponse.redirect(new URL(...))</code>, 2. Rewrite: <code>NextResponse.rewrite(new URL(...))</code>, 3. Pass-through: <code>NextResponse.next()</code> with optional headers parameter, 4. Direct response: <code>Response.json()</code> or custom Response instance.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1LwUmz" prefix="r5110" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4530887074397129177"],"question":[0,"What are the matcher path modifiers and what do they mean?"],"answer":[0,"* (asterisk) = zero or more, ? (question mark) = zero or one, + (plus) = one or more. Example: `/about/:path*` matches `/about/a/b/c`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-matcher-path-modifiers-and-what-do-they-mean"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-matcher-path-modifiers-and-what-do-they-mean" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-matcher-path-modifiers-and-what-do-they-mean" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the matcher path modifiers and what do they mean?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ul> <li>(asterisk) = zero or more, ? (question mark) = zero or one, + (plus) = one or more. Example: <code>/about/:path*</code> matches <code>/about/a/b/c</code>.</li> </ul> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="AEdDV" prefix="r5111" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5042576320764590694"],"question":[0,"What is the default value for the reactMaxHeadersLength configuration?"],"answer":[0,"The default value is 6000."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-reactmaxheaderslength-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-reactmaxheaderslength-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-reactmaxheaderslength-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the reactMaxHeadersLength configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value is 6000.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1thalj" prefix="r5112" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5341207131483604037"],"question":[0,"What is the syntax to configure Node.js runtime for middleware?"],"answer":[0,"Export a config object with the runtime property: `export const config = { runtime: 'nodejs' };`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-to-configure-node-js-runtime-for-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-to-configure-node-js-runtime-for-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-to-configure-node-js-runtime-for-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax to configure Node.js runtime for middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Export a config object with the runtime property: <code>export const config = { runtime: 'nodejs' };</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1PhgHM" prefix="r5113" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5855496178124086725"],"question":[0,"In which Next.js version was the ability to set request headers in middleware introduced?"],"answer":[0,"Setting request headers in middleware is available since Next.js v13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-ability-to-set-request-headers-in-middleware-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-ability-to-set-request-headers-in-middleware-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-ability-to-set-request-headers-in-middleware-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the ability to set request headers in middleware introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting request headers in middleware is available since Next.js v13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SiDCO" prefix="r5114" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7464646593766764326"],"question":[0,"What configuration option related to middleware response bodies was removed in Next.js 13.1?"],"answer":[0,"The `experimental.allowMiddlewareResponseBody` configuration option is no longer required as of Next.js 13.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-related-to-middleware-response-bodies-was-removed-in-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-related-to-middleware-response-bodies-was-removed-in-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-related-to-middleware-response-bodies-was-removed-in-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option related to middleware response bodies was removed in Next.js 13.1?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>experimental.allowMiddlewareResponseBody</code> configuration option is no longer required as of Next.js 13.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10FjBQ" prefix="r5115" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7690106555488766560"],"question":[0,"What is the difference between NextResponse.redirect() and NextResponse.rewrite()?"],"answer":[0,"Redirects reroute to a new page and show the URL changes in the browser. Rewrites act as a URL proxy and mask the destination path, making it appear the user hasn't changed their location on the site."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between NextResponse.redirect() and NextResponse.rewrite()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Redirects reroute to a new page and show the URL changes in the browser. Rewrites act as a URL proxy and mask the destination path, making it appear the user hasn't changed their location on the site.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nBGnl" prefix="r5116" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8636955849467234087"],"question":[0,"What is the recommended way to create a URL for redirecting or rewriting in middleware?"],"answer":[0,"Clone NextURL and mutate it: `const url = request.nextUrl.clone(); url.pathname = '/dest'; return NextResponse.rewrite(url);`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-relative-urls"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-way-to-create-a-url-for-redirecting-or-rewriting-in-midd"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-way-to-create-a-url-for-redirecting-or-rewriting-in-midd" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-way-to-create-a-url-for-redirecting-or-rewriting-in-midd" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended way to create a URL for redirecting or rewriting in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Clone NextURL and mutate it: <code>const url = request.nextUrl.clone(); url.pathname = '/dest'; return NextResponse.rewrite(url);</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-relative-urls" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1sAS7C" prefix="r5117" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9068582883509696450"],"question":[0,"What cookie options are supported when using response.cookies.set() in middleware?"],"answer":[0,"Supported options include: name, value, expires (Date), maxAge (Number in seconds), domain (String), path (String, default '/'), secure (Boolean), httpOnly (Boolean), sameSite (Boolean, 'lax', 'strict', or 'none'), priority ('low', 'medium', 'high'), and partitioned (Boolean)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-options-are-supported-when-using-response-cookies-set-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-options-are-supported-when-using-response-cookies-set-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-options-are-supported-when-using-response-cookies-set-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie options are supported when using response.cookies.set() in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Supported options include: name, value, expires (Date), maxAge (Number in seconds), domain (String), path (String, default '/'), secure (Boolean), httpOnly (Boolean), sameSite (Boolean, 'lax', 'strict', or 'none'), priority ('low', 'medium', 'high'), and partitioned (Boolean).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18Ee1B" prefix="r5118" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9217985865173034742"],"question":[0,"What does setting 'locale: false' in a matcher object do?"],"answer":[0,"When set to false, it ignores locale-based routing in path matching. This is useful for paths like API routes that should bypass internationalization handling."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-setting-locale-false-in-a-matcher-object-do"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-setting-locale-false-in-a-matcher-object-do" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-setting-locale-false-in-a-matcher-object-do" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does setting 'locale: false' in a matcher object do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When set to false, it ignores locale-based routing in path matching. This is useful for paths like API routes that should bypass internationalization handling.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZgLjBz" prefix="r5119" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9254261385341779390"],"question":[0,"What cookie methods are available on request.cookies in Next.js middleware?"],"answer":[0,"The available methods are: `get(name)` - returns object with name, value, and Path or undefined; `getAll(name?)` - returns array of cookies; `has(name)` - returns boolean; `delete(name)` - removes cookie; `clear()` - removes all cookies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-methods-are-available-on-request-cookies-in-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-methods-are-available-on-request-cookies-in-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-methods-are-available-on-request-cookies-in-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie methods are available on request.cookies in Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The available methods are: <code>get(name)</code> - returns object with name, value, and Path or undefined; <code>getAll(name?)</code> - returns array of cookies; <code>has(name)</code> - returns boolean; <code>delete(name)</code> - removes cookie; <code>clear()</code> - removes all cookies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zk10jB" prefix="r5120" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9261183126040408507"],"question":[0,"Can NextResponse.next() be used in Route Handlers?"],"answer":[0,"No, Route Handlers in the Next.js App Router do not support using the NextResponse.next() method. Handlers must always return a Response object instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/next-response-next-in-app-route-handler"]]],"topic":[0,"nextjs"],"slug":[0,"can-nextresponse-next-be-used-in-route-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-nextresponse-next-be-used-in-route-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-nextresponse-next-be-used-in-route-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can NextResponse.next() be used in Route Handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Route Handlers in the Next.js App Router do not support using the NextResponse.next() method. Handlers must always return a Response object instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/next-response-next-in-app-route-handler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zsq0fg" prefix="r5121" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9349495031045335043"],"question":[0,"What is the syntax for setting request headers that will be forwarded upstream to server components and route handlers?"],"answer":[0,"Use `NextResponse.next({ request: { headers: newHeaders } })` where newHeaders is a Headers object. Example: `const requestHeaders = new Headers(request.headers); requestHeaders.set('x-custom-header', 'value'); return NextResponse.next({ request: { headers: requestHeaders } });`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-syntax-for-setting-request-headers-that-will-be-forwarded-upstream-t"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-syntax-for-setting-request-headers-that-will-be-forwarded-upstream-t" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-syntax-for-setting-request-headers-that-will-be-forwarded-upstream-t" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the syntax for setting request headers that will be forwarded upstream to server components and route handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>NextResponse.next({ request: { headers: newHeaders } })</code> where newHeaders is a Headers object. Example: <code>const requestHeaders = new Headers(request.headers); requestHeaders.set('x-custom-header', 'value'); return NextResponse.next({ request: { headers: requestHeaders } });</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QNY0m" prefix="r5122" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9655037979987064387"],"question":[0,"In which Next.js version was the ability to return direct responses from middleware introduced?"],"answer":[0,"The ability to return responses directly from middleware (e.g., using Response.json()) was introduced in Next.js v13.1.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-ability-to-return-direct-responses-from-middlew"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-ability-to-return-direct-responses-from-middlew" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-ability-to-return-direct-responses-from-middlew" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the ability to return direct responses from middleware introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The ability to return responses directly from middleware (e.g., using Response.json()) was introduced in Next.js v13.1.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zi76O0" prefix="r5123" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9657874899197711858"],"question":[0,"What URL format is required for NextResponse.redirect() and NextResponse.rewrite()?"],"answer":[0,"You must pass an absolute URL. Use `new URL(path, request.url)` to create an absolute URL. Example: `NextResponse.redirect(new URL('/home', request.url))`. Relative URLs are not allowed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-relative-urls"]]],"topic":[0,"nextjs"],"slug":[0,"what-url-format-is-required-for-nextresponse-redirect-and-nextresponse-rewrite"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-url-format-is-required-for-nextresponse-redirect-and-nextresponse-rewrite" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-url-format-is-required-for-nextresponse-redirect-and-nextresponse-rewrite" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What URL format is required for NextResponse.redirect() and NextResponse.rewrite()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must pass an absolute URL. Use <code>new URL(path, request.url)</code> to create an absolute URL. Example: <code>NextResponse.redirect(new URL('/home', request.url))</code>. Relative URLs are not allowed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-relative-urls" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eF0Q3" prefix="r5124" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10262271150579776800"],"question":[0,"In which Next.js version were the skipTrailingSlashRedirect and skipMiddlewareUrlNormalize flags introduced?"],"answer":[0,"These flags were introduced in Next.js v13.1."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-were-the-skiptrailingslashredirect-and-skipmiddlewareur"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-were-the-skiptrailingslashredirect-and-skipmiddlewareur" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-were-the-skiptrailingslashredirect-and-skipmiddlewareur" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version were the skipTrailingSlashRedirect and skipMiddlewareUrlNormalize flags introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>These flags were introduced in Next.js v13.1.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ghtTA" prefix="r5125" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12037848631161687871"],"question":[0,"What is the second optional parameter of the middleware function and what is it used for?"],"answer":[0,"The second parameter is `event: NextFetchEvent`, which provides the `waitUntil()` method for performing background operations in the Edge runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-second-optional-parameter-of-the-middleware-function-and-what-is-it-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-second-optional-parameter-of-the-middleware-function-and-what-is-it-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-second-optional-parameter-of-the-middleware-function-and-what-is-it-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the second optional parameter of the middleware function and what is it used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The second parameter is <code>event: NextFetchEvent</code>, which provides the <code>waitUntil()</code> method for performing background operations in the Edge runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UwVcC" prefix="r5126" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12777321484937939258"],"question":[0,"Where in the Next.js request lifecycle does middleware execute?"],"answer":[0,"Middleware runs after `next.config.js` headers and redirects, but before `beforeFiles` rewrites, filesystem routes, dynamic routes, and `fallback` rewrites."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-in-the-next-js-request-lifecycle-does-middleware-execute"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-in-the-next-js-request-lifecycle-does-middleware-execute" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-in-the-next-js-request-lifecycle-does-middleware-execute" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where in the Next.js request lifecycle does middleware execute?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware runs after <code>next.config.js</code> headers and redirects, but before <code>beforeFiles</code> rewrites, filesystem routes, dynamic routes, and <code>fallback</code> rewrites.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Mm5aY" prefix="r5127" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13448120423351055028"],"question":[0,"What is the default value for the 'path' option when setting cookies in middleware?"],"answer":[0,"The default value for the 'path' option is '/'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/cookies"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-path-option-when-setting-cookies-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-path-option-when-setting-cookies-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-path-option-when-setting-cookies-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the 'path' option when setting cookies in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default value for the 'path' option is '/'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/cookies" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YRX0e" prefix="r5128" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14636278254570272915"],"question":[0,"What security warning does the Next.js documentation provide about forwarding request headers?"],"answer":[0,"The documentation warns against forwarding all incoming request headers due to risks of sensitive data leakage. It recommends using an allowlist approach that filters out custom x-* headers, authorization, and cookie headers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-warning-does-the-next-js-documentation-provide-about-forwarding-re"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-warning-does-the-next-js-documentation-provide-about-forwarding-re" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-warning-does-the-next-js-documentation-provide-about-forwarding-re" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security warning does the Next.js documentation provide about forwarding request headers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The documentation warns against forwarding all incoming request headers due to risks of sensitive data leakage. It recommends using an allowlist approach that filters out custom x-* headers, authorization, and cookie headers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-actions-configuration-and-security" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server Actions > Configuration and Security</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1TGilL" prefix="r5129" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"75853580214453788"],"question":[0,"What HTTP method(s) are allowed to invoke Server Actions?"],"answer":[0,"Only the POST method. Server Actions use the POST method exclusively, and only this HTTP method is allowed to invoke them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-s-are-allowed-to-invoke-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-s-are-allowed-to-invoke-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-s-are-allowed-to-invoke-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method(s) are allowed to invoke Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only the POST method. Server Actions use the POST method exclusively, and only this HTTP method is allowed to invoke them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17dPh" prefix="r5130" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"303855120270158550"],"question":[0,"What is the difference between 'use server' and the 'server-only' package?"],"answer":[0,"'use server' creates functions that execute on the server but can be called from client components. The 'server-only' package prevents a module from being imported into Client Components at all, providing compile-time protection with a build-time error if violated."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/55314"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-use-server-and-the-server-only-package"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-use-server-and-the-server-only-package" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-use-server-and-the-server-only-package" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between 'use server' and the 'server-only' package?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'use server' creates functions that execute on the server but can be called from client components. The 'server-only' package prevents a module from being imported into Client Components at all, providing compile-time protection with a build-time error if violated.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/55314" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gm8U4" prefix="r5131" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2212327529851033092"],"question":[0,"What is the default maximum size of the request body sent to a Server Action?"],"answer":[0,"1MB. This default prevents the consumption of excessive server resources in parsing large amounts of data, as well as potential DDoS attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-maximum-size-of-the-request-body-sent-to-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-maximum-size-of-the-request-body-sent-to-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-maximum-size-of-the-request-body-sent-to-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default maximum size of the request body sent to a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1MB. This default prevents the consumption of excessive server resources in parsing large amounts of data, as well as potential DDoS attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="5EAOc" prefix="r5132" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2868580844944504717"],"question":[0,"What encryption algorithm does Next.js use to encrypt closure variables in Server Actions?"],"answer":[0,"AES-GCM. Next.js automatically encrypts closed-over variables with the action ID using AES-GCM encryption before sending them to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-encryption-algorithm-does-next-js-use-to-encrypt-closure-variables-in-serve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-encryption-algorithm-does-next-js-use-to-encrypt-closure-variables-in-serve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-encryption-algorithm-does-next-js-use-to-encrypt-closure-variables-in-serve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What encryption algorithm does Next.js use to encrypt closure variables in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AES-GCM. Next.js automatically encrypts closed-over variables with the action ID using AES-GCM encryption before sending them to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Y3LGC" prefix="r5133" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4031846284400096127"],"question":[0,"What is the format for file-level 'use server' directive?"],"answer":[0,"Place 'use server' at the top of a file to mark all exports of that file as Server Actions. This is required for Server Actions that will be imported by Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-format-for-file-level-use-server-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-format-for-file-level-use-server-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-format-for-file-level-use-server-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the format for file-level 'use server' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place 'use server' at the top of a file to mark all exports of that file as Server Actions. This is required for Server Actions that will be imported by Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wfY3E" prefix="r5134" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4788406454560052962"],"question":[0,"Are Server Actions with 'use server' publicly accessible HTTP endpoints?"],"answer":[0,"Yes. When a Server Action is created and exported, it creates a public HTTP endpoint. Even if a Server Action or utility function is not imported elsewhere in your code, it's still publicly accessible."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-actions-with-use-server-publicly-accessible-http-endpoints"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-actions-with-use-server-publicly-accessible-http-endpoints" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-actions-with-use-server-publicly-accessible-http-endpoints" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Actions with 'use server' publicly accessible HTTP endpoints?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. When a Server Action is created and exported, it creates a public HTTP endpoint. Even if a Server Action or utility function is not imported elsewhere in your code, it's still publicly accessible.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eV1n7" prefix="r5135" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4834618805076235339"],"question":[0,"Where in next.config.js do you configure Server Actions options like bodySizeLimit and allowedOrigins?"],"answer":[0,"Under the experimental object: experimental: { serverActions: { bodySizeLimit: '2mb', allowedOrigins: ['my-proxy.com'] } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"where-in-next-config-js-do-you-configure-server-actions-options-like-bodysizelim"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-in-next-config-js-do-you-configure-server-actions-options-like-bodysizelim" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-in-next-config-js-do-you-configure-server-actions-options-like-bodysizelim" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where in next.config.js do you configure Server Actions options like bodySizeLimit and allowedOrigins?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Under the experimental object: experimental: { serverActions: { bodySizeLimit: '2mb', allowedOrigins: ['my-proxy.com'] } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="KD85r" prefix="r5136" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5654151252316133577"],"question":[0,"How should you generate a value for NEXT_SERVER_ACTIONS_ENCRYPTION_KEY?"],"answer":[0,"Use openssl rand -base64 32 to generate a base64 encoded string from a Uint8Array of length valid for AES-GCM (e.g., 16)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-generate-a-value-for-next-server-actions-encryption-key"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-generate-a-value-for-next-server-actions-encryption-key" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-generate-a-value-for-next-server-actions-encryption-key" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you generate a value for NEXT_SERVER_ACTIONS_ENCRYPTION_KEY?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use openssl rand -base64 32 to generate a base64 encoded string from a Uint8Array of length valid for AES-GCM (e.g., 16).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IETzL" prefix="r5137" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5680773785932309432"],"question":[0,"How does Next.js validate Server Action requests to prevent CSRF attacks?"],"answer":[0,"Next.js compares the Origin header to the Host header (or X-Forwarded-Host), and if they don't match, the request will be aborted. This ensures Server Actions can only be invoked on the same host as the page that hosts it."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-validate-server-action-requests-to-prevent-csrf-attacks"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-validate-server-action-requests-to-prevent-csrf-attacks" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-validate-server-action-requests-to-prevent-csrf-attacks" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js validate Server Action requests to prevent CSRF attacks?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js compares the Origin header to the Host header (or X-Forwarded-Host), and if they don't match, the request will be aborted. This ensures Server Actions can only be invoked on the same host as the page that hosts it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uQ4yb" prefix="r5138" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6439796430845240966"],"question":[0,"When does NEXT_SERVER_ACTIONS_ENCRYPTION_KEY need to be present?"],"answer":[0,"It must be present during build time, as that's when the action IDs are generated. This ensures consistency across server instances and builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/73098"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-next-server-actions-encryption-key-need-to-be-present"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-next-server-actions-encryption-key-need-to-be-present" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-next-server-actions-encryption-key-need-to-be-present" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does NEXT_SERVER_ACTIONS_ENCRYPTION_KEY need to be present?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It must be present during build time, as that's when the action IDs are generated. This ensures consistency across server instances and builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/73098" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZtdAcg" prefix="r5139" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7363261497256019415"],"question":[0,"Should you rely on Next.js encryption alone to prevent sensitive values from being exposed on the client?"],"answer":[0,"No. Next.js documentation explicitly states: 'we don't recommend relying on encryption alone to prevent sensitive values from being exposed on the client. Instead, you should use the React taint APIs to proactively prevent specific data from being sent to the client.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-rely-on-next-js-encryption-alone-to-prevent-sensitive-values-from-bei"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-rely-on-next-js-encryption-alone-to-prevent-sensitive-values-from-bei" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-rely-on-next-js-encryption-alone-to-prevent-sensitive-values-from-bei" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you rely on Next.js encryption alone to prevent sensitive values from being exposed on the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js documentation explicitly states: 'we don't recommend relying on encryption alone to prevent sensitive values from being exposed on the client. Instead, you should use the React taint APIs to proactively prevent specific data from being sent to the client.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z223xiV" prefix="r5140" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7818628033893421099"],"question":[0,"Are Server Action IDs deterministic across builds?"],"answer":[0,"No. Next.js creates encrypted, non-deterministic IDs to allow the client to reference and call Server Actions, and these IDs are periodically recalculated between builds for enhanced security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-action-ids-deterministic-across-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-action-ids-deterministic-across-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-action-ids-deterministic-across-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Action IDs deterministic across builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js creates encrypted, non-deterministic IDs to allow the client to reference and call Server Actions, and these IDs are periodically recalculated between builds for enhanced security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zeund4" prefix="r5141" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7958178204324717247"],"question":[0,"Are Server Actions encrypted when using .bind() instead of closures?"],"answer":[0,"No. Arguments passed using .bind() are NOT encrypted. This provides an opt-out for performance and is consistent with .bind() on the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-actions-encrypted-when-using-bind-instead-of-closures"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-actions-encrypted-when-using-bind-instead-of-closures" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-actions-encrypted-when-using-bind-instead-of-closures" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Actions encrypted when using .bind() instead of closures?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Arguments passed using .bind() are NOT encrypted. This provides an opt-out for performance and is consistent with .bind() on the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29H1o8" prefix="r5142" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8911076270063847430"],"question":[0,"How do you configure a custom body size limit for Server Actions?"],"answer":[0,"Use the serverActions.bodySizeLimit option in next.config.js. It accepts the number of bytes or any string format supported by bytes, such as '500kb' or '3mb'. Example: experimental: { serverActions: { bodySizeLimit: '2mb' } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-a-custom-body-size-limit-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-a-custom-body-size-limit-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-a-custom-body-size-limit-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure a custom body size limit for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the serverActions.bodySizeLimit option in next.config.js. It accepts the number of bytes or any string format supported by bytes, such as '500kb' or '3mb'. Example: experimental: { serverActions: { bodySizeLimit: '2mb' } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1vSdI" prefix="r5143" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9026105671946021518"],"question":[0,"What is the experimental.taint configuration option used for?"],"answer":[0,"It enables React's experimental Taint APIs (experimental_taintObjectReference and experimental_taintUniqueValue) which prevent sensitive data from being inadvertently exposed to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-experimental-taint-configuration-option-used-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-experimental-taint-configuration-option-used-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-experimental-taint-configuration-option-used-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the experimental.taint configuration option used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It enables React's experimental Taint APIs (experimental_taintObjectReference and experimental_taintUniqueValue) which prevent sensitive data from being inadvertently exposed to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="TLIVc" prefix="r5144" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9397807698054738041"],"question":[0,"What error occurs if the Origin header doesn't match the Host/X-Forwarded-Host header in a Server Action request?"],"answer":[0,"The request will be aborted. Next.js validates that these headers match to prevent CSRF attacks, ensuring Server Actions can only be invoked on the same host."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-error-occurs-if-the-origin-header-doesn-t-match-the-host-x-forwarded-host-h"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-error-occurs-if-the-origin-header-doesn-t-match-the-host-x-forwarded-host-h" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-error-occurs-if-the-origin-header-doesn-t-match-the-host-x-forwarded-host-h" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What error occurs if the Origin header doesn't match the Host/X-Forwarded-Host header in a Server Action request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The request will be aborted. Next.js validates that these headers match to prevent CSRF attacks, ensuring Server Actions can only be invoked on the same host.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nHseC" prefix="r5145" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9569021089368507731"],"question":[0,"What happens to unused Server Actions in the client bundle?"],"answer":[0,"Unused Server Actions (referenced by their IDs) are removed from the client bundle to avoid public access. This dead code elimination was introduced in Next.js 15."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-unused-server-actions-in-the-client-bundle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-unused-server-actions-in-the-client-bundle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-unused-server-actions-in-the-client-bundle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to unused Server Actions in the client bundle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unused Server Actions (referenced by their IDs) are removed from the client bundle to avoid public access. This dead code elimination was introduced in Next.js 15.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z26x1DM" prefix="r5146" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9856715636044988093"],"question":[0,"What environment variable can you use to maintain consistent encryption keys across multiple server instances?"],"answer":[0,"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY. Setting this environment variable ensures that encryption keys are persistent across builds and all server instances use the same key."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-can-you-use-to-maintain-consistent-encryption-keys-acr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-can-you-use-to-maintain-consistent-encryption-keys-acr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-can-you-use-to-maintain-consistent-encryption-keys-acr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable can you use to maintain consistent encryption keys across multiple server instances?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_SERVER_ACTIONS_ENCRYPTION_KEY. Setting this environment variable ensures that encryption keys are persistent across builds and all server instances use the same key.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ba0Go" prefix="r5147" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10809837813319522008"],"question":[0,"When is a new encryption key generated for Server Actions?"],"answer":[0,"A new private key is generated for each action every time a Next.js application is built. This means actions can only be invoked for a specific build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/security-nextjs-server-components-actions"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-a-new-encryption-key-generated-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-a-new-encryption-key-generated-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-a-new-encryption-key-generated-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is a new encryption key generated for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A new private key is generated for each action every time a Next.js application is built. This means actions can only be invoked for a specific build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/security-nextjs-server-components-actions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mSxl1" prefix="r5148" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12232341928402846425"],"question":[0,"What security validations should always be performed inside Server Actions?"],"answer":[0,"Always re-authorize the user inside the action and validate all action arguments (form data, URL parameters, headers, searchParams). Never trust client input and treat all function arguments as hostile input."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/data-security"]]],"topic":[0,"nextjs"],"slug":[0,"what-security-validations-should-always-be-performed-inside-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-security-validations-should-always-be-performed-inside-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-security-validations-should-always-be-performed-inside-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What security validations should always be performed inside Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Always re-authorize the user inside the action and validate all action arguments (form data, URL parameters, headers, searchParams). Never trust client input and treat all function arguments as hostile input.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/data-security" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1P2cW2" prefix="r5149" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13192781703944864243"],"question":[0,"What is the format for function-level 'use server' directive?"],"answer":[0,"Place 'use server' at the top of an async function body to mark that specific function as a Server Action. This can only be used in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-format-for-function-level-use-server-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-format-for-function-level-use-server-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-format-for-function-level-use-server-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the format for function-level 'use server' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place 'use server' at the top of an async function body to mark that specific function as a Server Action. This can only be used in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="4iAJp" prefix="r5150" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13633061074092874165"],"question":[0,"Does serverActions.allowedOrigins support wildcard patterns?"],"answer":[0,"Yes. You can use wildcard patterns like '*.my-proxy.com' to match multiple subdomains."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"does-serveractions-allowedorigins-support-wildcard-patterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-serveractions-allowedorigins-support-wildcard-patterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-serveractions-allowedorigins-support-wildcard-patterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does serverActions.allowedOrigins support wildcard patterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can use wildcard patterns like '*.my-proxy.com' to match multiple subdomains.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="upgrading-runtime-environment-requirements" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Upgrading > Runtime & Environment Requirements</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2hQDbR" prefix="r5151" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"174163501176216244"],"question":[0,"What runtime value is no longer supported in Next.js 15 and will cause an error?"],"answer":[0,"The runtime segment configuration value 'experimental-edge'. You must update to 'edge' instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-runtime-value-is-no-longer-supported-in-next-js-15-and-will-cause-an-error"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-runtime-value-is-no-longer-supported-in-next-js-15-and-will-cause-an-error" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-runtime-value-is-no-longer-supported-in-next-js-15-and-will-cause-an-error" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What runtime value is no longer supported in Next.js 15 and will cause an error?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The runtime segment configuration value 'experimental-edge'. You must update to 'edge' instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zatiox" prefix="r5152" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1634750582552853283"],"question":[0,"What React version does the App Router in Next.js 16 use?"],"answer":[0,"React 19.2 (via the latest React Canary release)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-version-does-the-app-router-in-next-js-16-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-version-does-the-app-router-in-next-js-16-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-version-does-the-app-router-in-next-js-16-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React version does the App Router in Next.js 16 use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React 19.2 (via the latest React Canary release)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16ClAy" prefix="r5153" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3090813582302299570"],"question":[0,"What configuration options were removed in Next.js 16 for runtime configuration?"],"answer":[0,"serverRuntimeConfig and publicRuntimeConfig have been removed. Use environment variables instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-options-were-removed-in-next-js-16-for-runtime-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-options-were-removed-in-next-js-16-for-runtime-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-options-were-removed-in-next-js-16-for-runtime-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration options were removed in Next.js 16 for runtime configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>serverRuntimeConfig and publicRuntimeConfig have been removed. Use environment variables instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1eKKAQ" prefix="r5154" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4542642705715485304"],"question":[0,"What is the minimum TypeScript version required for async Server Components in Next.js?"],"answer":[0,"5.1.3 or higher, along with @types/react 18.2.8 or higher. Using an older version will cause a 'Promise<Element>' is not a valid JSX element type error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/typescript"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-typescript-version-required-for-async-server-components-in-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-typescript-version-required-for-async-server-components-in-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-typescript-version-required-for-async-server-components-in-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum TypeScript version required for async Server Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>5.1.3 or higher, along with @types/react 18.2.8 or higher. Using an older version will cause a 'Promise<Element>' is not a valid JSX element type error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/typescript" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1SPP84" prefix="r5155" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4806542181470860074"],"question":[0,"What is the default upgrade type when running 'npx @next/codemod upgrade' without specifying a revision?"],"answer":[0,"minor (for stable versions)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-upgrade-type-when-running-npx-next-codemod-upgrade-without-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-upgrade-type-when-running-npx-next-codemod-upgrade-without-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-upgrade-type-when-running-npx-next-codemod-upgrade-without-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default upgrade type when running 'npx @next/codemod upgrade' without specifying a revision?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>minor (for stable versions)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pVz1s" prefix="r5156" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5809193155971195319"],"question":[0,"What command should you use to upgrade Next.js 15 and earlier versions that don't support the built-in upgrade command?"],"answer":[0,"npx @next/codemod@canary upgrade latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/upgrading"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-should-you-use-to-upgrade-next-js-15-and-earlier-versions-that-don-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-should-you-use-to-upgrade-next-js-15-and-earlier-versions-that-don-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-should-you-use-to-upgrade-next-js-15-and-earlier-versions-that-don-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command should you use to upgrade Next.js 15 and earlier versions that don't support the built-in upgrade command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@canary upgrade latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/upgrading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rYRc5" prefix="r5157" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7248138194716685855"],"question":[0,"What is the minimum Node.js version required for Next.js 14?"],"answer":[0,"18.17, since 16.x has reached end-of-life."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/upgrading/version-14"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>18.17, since 16.x has reached end-of-life.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/upgrading/version-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16u8L" prefix="r5158" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7410189179137150882"],"question":[0,"How do you enable Node.js runtime for middleware in Next.js 15.5 and later?"],"answer":[0,"Set 'export const config = { runtime: 'nodejs' }' in your middleware file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-node-js-runtime-for-middleware-in-next-js-15-5-and-later"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-node-js-runtime-for-middleware-in-next-js-15-5-and-later" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-node-js-runtime-for-middleware-in-next-js-15-5-and-later" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable Node.js runtime for middleware in Next.js 15.5 and later?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set 'export const config = { runtime: 'nodejs' }' in your middleware file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1s53gz" prefix="r5159" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7458752832076909030"],"question":[0,"What is the minimum React version required for Next.js 15?"],"answer":[0,"React 19 and React DOM 19."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-react-version-required-for-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-react-version-required-for-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-react-version-required-for-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum React version required for Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React 19 and React DOM 19.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UA5Sl" prefix="r5160" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8275865899894080564"],"question":[0,"What command is recommended to upgrade to Next.js 16 with React and ESLint?"],"answer":[0,"npm install next@latest react@latest react-dom@latest eslint-config-next@latest"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-is-recommended-to-upgrade-to-next-js-16-with-react-and-eslint"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-is-recommended-to-upgrade-to-next-js-16-with-react-and-eslint" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-is-recommended-to-upgrade-to-next-js-16-with-react-and-eslint" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command is recommended to upgrade to Next.js 16 with React and ESLint?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm install next@latest react@latest react-dom@latest eslint-config-next@latest</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZNiGsg" prefix="r5161" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8704695198803468376"],"question":[0,"What is the minimum Node.js version required for Next.js 16?"],"answer":[0,"20.9.0 (LTS). Node.js 18 is no longer supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>20.9.0 (LTS). Node.js 18 is no longer supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZE3QbU" prefix="r5162" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8764840403646825667"],"question":[0,"What is the minimum React version required for Next.js 14?"],"answer":[0,"React 18 and React DOM 18."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/upgrading/version-14"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-react-version-required-for-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-react-version-required-for-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-react-version-required-for-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum React version required for Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React 18 and React DOM 18.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/upgrading/version-14" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sdFX4" prefix="r5163" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9042026179134093935"],"question":[0,"What is the basic syntax for the Next.js upgrade codemod command?"],"answer":[0,"npx @next/codemod upgrade [revision], where revision can be a version type (patch, minor, major), NPM dist tag (latest, canary, rc), or exact version number."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/codemods"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-basic-syntax-for-the-next-js-upgrade-codemod-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-basic-syntax-for-the-next-js-upgrade-codemod-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-basic-syntax-for-the-next-js-upgrade-codemod-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the basic syntax for the Next.js upgrade codemod command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod upgrade [revision], where revision can be a version type (patch, minor, major), NPM dist tag (latest, canary, rc), or exact version number.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/codemods" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aomLr" prefix="r5164" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9506608799135423631"],"question":[0,"What should you upgrade when using TypeScript with Next.js 15?"],"answer":[0,"You should upgrade @types/react and @types/react-dom to their latest versions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-upgrade-when-using-typescript-with-next-js-15"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-upgrade-when-using-typescript-with-next-js-15" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-upgrade-when-using-typescript-with-next-js-15" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you upgrade when using TypeScript with Next.js 15?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should upgrade @types/react and @types/react-dom to their latest versions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HPrB9" prefix="r5165" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9832422382051711184"],"question":[0,"What is the minimum Node.js version required for Next.js 12?"],"answer":[0,"12.22.0, which is the first version of Node.js with native ES Modules support."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/upgrading/version-12"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-12"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-12" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-12" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 12?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>12.22.0, which is the first version of Node.js with native ES Modules support.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/upgrading/version-12" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jAQO7" prefix="r5166" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10676834994098301068"],"question":[0,"What is the default Browserslist configuration for Next.js?"],"answer":[0,"[\"chrome 111\", \"edge 111\", \"firefox 111\", \"safari 16.4\"]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/supported-browsers"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-browserslist-configuration-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-browserslist-configuration-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-browserslist-configuration-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Browserslist configuration for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>["chrome 111", "edge 111", "firefox 111", "safari 16.4"]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/supported-browsers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7NcSn" prefix="r5167" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11376660563253347256"],"question":[0,"In which version of Next.js did the Node.js middleware runtime become stable?"],"answer":[0,"Next.js 15.5"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-of-next-js-did-the-node-js-middleware-runtime-become-stable"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-of-next-js-did-the-node-js-middleware-runtime-become-stable" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-of-next-js-did-the-node-js-middleware-runtime-become-stable" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version of Next.js did the Node.js middleware runtime become stable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15.5</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GYab5" prefix="r5168" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11860322571090802246"],"question":[0,"What is the minimum Node.js version required for Next.js 13?"],"answer":[0,"16.14.0, since 12.x and 14.x have reached end-of-life."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/upgrading/version-13"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-node-js-version-required-for-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-node-js-version-required-for-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-node-js-version-required-for-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Node.js version required for Next.js 13?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>16.14.0, since 12.x and 14.x have reached end-of-life.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/upgrading/version-13" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="PzVjm" prefix="r5169" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12233140992679854200"],"question":[0,"What are the minimum browser versions supported by Next.js 16?"],"answer":[0,"Chrome 111+, Edge 111+, Firefox 111+, and Safari 16.4+."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/supported-browsers"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-minimum-browser-versions-supported-by-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-minimum-browser-versions-supported-by-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-minimum-browser-versions-supported-by-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the minimum browser versions supported by Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Chrome 111+, Edge 111+, Firefox 111+, and Safari 16.4+.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/supported-browsers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdnoXQ" prefix="r5170" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13109950459087310814"],"question":[0,"What npm flags might you need to use when installing Next.js 15 with React 19 due to peer dependency warnings?"],"answer":[0,"--force or --legacy-peer-deps flags to ignore the warning. This won't be necessary once both Next.js 15 and React 19 are stable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-npm-flags-might-you-need-to-use-when-installing-next-js-15-with-react-19-du"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-npm-flags-might-you-need-to-use-when-installing-next-js-15-with-react-19-du" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-npm-flags-might-you-need-to-use-when-installing-next-js-15-with-react-19-du" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What npm flags might you need to use when installing Next.js 15 with React 19 due to peer dependency warnings?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>--force or --legacy-peer-deps flags to ignore the warning. This won't be necessary once both Next.js 15 and React 19 are stable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ue9vr" prefix="r5171" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13829414713927063879"],"question":[0,"What was the limitation of Next.js middleware before Node.js runtime support was added?"],"answer":[0,"Middleware only supported the Edge Runtime, which provided better performance and isolation but had limitations when integrating with Node.js-specific libraries and APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-limitation-of-next-js-middleware-before-node-js-runtime-support-was"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-limitation-of-next-js-middleware-before-node-js-runtime-support-was" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-limitation-of-next-js-middleware-before-node-js-runtime-support-was" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the limitation of Next.js middleware before Node.js runtime support was added?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware only supported the Edge Runtime, which provided better performance and isolation but had limitations when integrating with Node.js-specific libraries and APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z12dJzB" prefix="r5172" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14627796027360978220"],"question":[0,"When did Next.js drop Internet Explorer support?"],"answer":[0,"Next.js 13 dropped Internet Explorer support and began targeting modern browsers only."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/upgrading/version-13"]]],"topic":[0,"nextjs"],"slug":[0,"when-did-next-js-drop-internet-explorer-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-did-next-js-drop-internet-explorer-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-did-next-js-drop-internet-explorer-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When did Next.js drop Internet Explorer support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13 dropped Internet Explorer support and began targeting modern browsers only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/upgrading/version-13" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="eslint" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">ESLint</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZsbzDJ" prefix="r5173" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"186248759859782685"],"question":[0,"How do you configure rootDir for Next.js ESLint in a monorepo?"],"answer":[0,"Use the settings.next.rootDir property in your ESLint configuration. The rootDir can be a path (relative or absolute), a glob (e.g., 'packages/*/'), or an array of paths and/or globs. Example: settings: { next: { rootDir: 'packages/my-app/' } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-rootdir-for-next-js-eslint-in-a-monorepo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-rootdir-for-next-js-eslint-in-a-monorepo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-rootdir-for-next-js-eslint-in-a-monorepo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure rootDir for Next.js ESLint in a monorepo?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the settings.next.rootDir property in your ESLint configuration. The rootDir can be a path (relative or absolute), a glob (e.g., 'packages/*/'), or an array of paths and/or globs. Example: settings: { next: { rootDir: 'packages/my-app/' } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2t7TOA" prefix="r5174" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"525585393045003576"],"question":[0,"How many ESLint rules does @next/eslint-plugin-next include?"],"answer":[0,"@next/eslint-plugin-next includes 24 specific rules covering font optimization, script handling, component restrictions, performance, and metadata handling."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-eslint-rules-does-next-eslint-plugin-next-include"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-eslint-rules-does-next-eslint-plugin-next-include" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-eslint-rules-does-next-eslint-plugin-next-include" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many ESLint rules does @next/eslint-plugin-next include?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>@next/eslint-plugin-next includes 24 specific rules covering font optimization, script handling, component restrictions, performance, and metadata handling.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27sRuX" prefix="r5175" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"621302937361353897"],"question":[0,"How do you use FlatCompat to convert classic ESLint config for Next.js?"],"answer":[0,"import { FlatCompat } from '@eslint/eslintrc'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport js from '@eslint/js'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\nconst compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended })\n\nexport default [...compat.extends('next/core-web-vitals', 'next/typescript')]"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-flatcompat-to-convert-classic-eslint-config-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-flatcompat-to-convert-classic-eslint-config-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-flatcompat-to-convert-classic-eslint-config-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use FlatCompat to convert classic ESLint config for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>import { FlatCompat } from '@eslint/eslintrc'<br>import path from 'node:path'<br>import { fileURLToPath } from 'node:url'<br>import js from '@eslint/js'</p> <p>const __filename = fileURLToPath(import.meta.url)<br>const __dirname = path.dirname(__filename)<br>const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended })</p> <p>export default [...compat.extends('next/core-web-vitals', 'next/typescript')]</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18u6Dz" prefix="r5176" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1541728063805367054"],"question":[0,"Can next/core-web-vitals be used without eslint:recommended?"],"answer":[0,"Yes. Neither eslint-config-next nor next/core-web-vitals includes basic ESLint configs like eslint:recommended, so things like duplicate variables don't throw an error. Configs outside the realm of Next.js and React have to be included separately."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/58714"]]],"topic":[0,"nextjs"],"slug":[0,"can-next-core-web-vitals-be-used-without-eslint-recommended"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-next-core-web-vitals-be-used-without-eslint-recommended" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-next-core-web-vitals-be-used-without-eslint-recommended" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can next/core-web-vitals be used without eslint:recommended?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Neither eslint-config-next nor next/core-web-vitals includes basic ESLint configs like eslint:recommended, so things like duplicate variables don't throw an error. Configs outside the realm of Next.js and React have to be included separately.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/58714" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z21lvv5" prefix="r5177" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2552933202208170526"],"question":[0,"What are the default directories that Next.js runs ESLint on?"],"answer":[0,"By default, Next.js will run ESLint for all files in the pages/, app/, components/, lib/, and src/ directories."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-default-directories-that-next-js-runs-eslint-on"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-default-directories-that-next-js-runs-eslint-on" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-default-directories-that-next-js-runs-eslint-on" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the default directories that Next.js runs ESLint on?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js will run ESLint for all files in the pages/, app/, components/, lib/, and src/ directories.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zq4o0x" prefix="r5178" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3043043155604395950"],"question":[0,"What happens when you run 'next build' and ESLint finds errors?"],"answer":[0,"ESLint automatically runs during every build (next build). Errors will fail the build, while warnings will not."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-run-next-build-and-eslint-finds-errors"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-run-next-build-and-eslint-finds-errors" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-run-next-build-and-eslint-finds-errors" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you run 'next build' and ESLint finds errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ESLint automatically runs during every build (next build). Errors will fail the build, while warnings will not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WbCe1" prefix="r5179" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4940279960311404428"],"question":[0,"What configuration extends from eslint-config-next for TypeScript support?"],"answer":[0,"eslint-config-next/typescript adds TypeScript-specific linting rules from typescript-eslint. Use this alongside the base or core-web-vitals config."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-extends-from-eslint-config-next-for-typescript-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-extends-from-eslint-config-next-for-typescript-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-extends-from-eslint-config-next-for-typescript-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration extends from eslint-config-next for TypeScript support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-config-next/typescript adds TypeScript-specific linting rules from typescript-eslint. Use this alongside the base or core-web-vitals config.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1rHCCJ" prefix="r5180" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5305490718586643258"],"question":[0,"What plugin dependencies are included in eslint-config-next?"],"answer":[0,"eslint-config-next includes @next/eslint-plugin-next along with recommended rule-sets from eslint-plugin-react and eslint-plugin-react-hooks. For TypeScript, it also includes @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-import, and eslint-plugin-jsx-a11y."],"confidence":[0,0.95],"sources":[1,[[0,"https://www.npmjs.com/package/eslint-config-next"]]],"topic":[0,"nextjs"],"slug":[0,"what-plugin-dependencies-are-included-in-eslint-config-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-plugin-dependencies-are-included-in-eslint-config-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-plugin-dependencies-are-included-in-eslint-config-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What plugin dependencies are included in eslint-config-next?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-config-next includes @next/eslint-plugin-next along with recommended rule-sets from eslint-plugin-react and eslint-plugin-react-hooks. For TypeScript, it also includes @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-import, and eslint-plugin-jsx-a11y.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://www.npmjs.com/package/eslint-config-next" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>npmjs.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ghiHn" prefix="r5181" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6240245650970796099"],"question":[0,"What codemod is available for migrating from next lint to ESLint CLI in Next.js 16?"],"answer":[0,"npx @next/codemod@canary next-lint-to-eslint-cli . - This codemod creates an eslint.config.mjs file with Next.js recommended configurations, updates package.json scripts to use eslint, and adds necessary ESLint dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-codemod-is-available-for-migrating-from-next-lint-to-eslint-cli-in-next-js-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-codemod-is-available-for-migrating-from-next-lint-to-eslint-cli-in-next-js-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-codemod-is-available-for-migrating-from-next-lint-to-eslint-cli-in-next-js-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What codemod is available for migrating from next lint to ESLint CLI in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npx @next/codemod@canary next-lint-to-eslint-cli . - This codemod creates an eslint.config.mjs file with Next.js recommended configurations, updates package.json scripts to use eslint, and adds necessary ESLint dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ztt0LS" prefix="r5182" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7073839927990644368"],"question":[0,"Where does Next.js store the ESLint cache by default?"],"answer":[0,"Next.js stores the ESLint cache in .next/cache (or the user-defined custom build directory). ESLint caching is enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/28349"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-next-js-store-the-eslint-cache-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-next-js-store-the-eslint-cache-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-next-js-store-the-eslint-cache-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does Next.js store the ESLint cache by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js stores the ESLint cache in .next/cache (or the user-defined custom build directory). ESLint caching is enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/28349" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WxBtj" prefix="r5183" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7338832047407557468"],"question":[0,"What major change was made to Next.js ESLint in version 16?"],"answer":[0,"Starting with Next.js 16, the next lint command and the eslint option in next.config.js were removed. Users should use Biome or ESLint directly. A codemod is available to assist migration: npx @next/codemod@canary next-lint-to-eslint-cli"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-major-change-was-made-to-next-js-eslint-in-version-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-major-change-was-made-to-next-js-eslint-in-version-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-major-change-was-made-to-next-js-eslint-in-version-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What major change was made to Next.js ESLint in version 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Starting with Next.js 16, the next lint command and the eslint option in next.config.js were removed. Users should use Biome or ESLint directly. A codemod is available to assist migration: npx @next/codemod@canary next-lint-to-eslint-cli</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2hAQcn" prefix="r5184" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8139516814313515208"],"question":[0,"How do you use lint-staged with next lint and the --file flag?"],"answer":[0,"Create a .lintstagedrc.js file:\nconst path = require('path')\nconst buildEslintCommand = (filenames) => `next lint --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}`\nmodule.exports = { '*.{js,jsx,ts,tsx}': [buildEslintCommand] }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-lint-staged-with-next-lint-and-the-file-flag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-lint-staged-with-next-lint-and-the-file-flag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-lint-staged-with-next-lint-and-the-file-flag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use lint-staged with next lint and the --file flag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Create a .lintstagedrc.js file:<br>const path = require('path')<br>const buildEslintCommand = (filenames) => <code>next lint --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}</code><br>module.exports = { '*.{js,jsx,ts,tsx}': [buildEslintCommand] }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nvJwF" prefix="r5185" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8736074260661204980"],"question":[0,"How do you lint specific directories and files with next lint?"],"answer":[0,"Use the --dir and --file flags: next lint --dir pages --dir utils --file bar.js"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-lint-specific-directories-and-files-with-next-lint"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-lint-specific-directories-and-files-with-next-lint" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-lint-specific-directories-and-files-with-next-lint" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you lint specific directories and files with next lint?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the --dir and --file flags: next lint --dir pages --dir utils --file bar.js</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZudRiT" prefix="r5186" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9146061222443911682"],"question":[0,"How do you disable ESLint during production builds in Next.js?"],"answer":[0,"Set ignoreDuringBuilds: true in the eslint option in next.config.js: module.exports = { eslint: { ignoreDuringBuilds: true } }. This is not recommended unless you already have ESLint configured to run in a separate part of your workflow (for example, in CI or a pre-commit hook)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/app/api-reference/config/next-config-js/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-disable-eslint-during-production-builds-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-disable-eslint-during-production-builds-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-disable-eslint-during-production-builds-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you disable ESLint during production builds in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set ignoreDuringBuilds: true in the eslint option in next.config.js: module.exports = { eslint: { ignoreDuringBuilds: true } }. This is not recommended unless you already have ESLint configured to run in a separate part of your workflow (for example, in CI or a pre-commit hook).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/app/api-reference/config/next-config-js/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2qAHxW" prefix="r5187" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9667061436793065238"],"question":[0,"What files are automatically created when you select a configuration option during ESLint setup?"],"answer":[0,"Next.js will automatically install eslint and eslint-config-next as dependencies in your application and create an .eslintrc.json file in the root of your project that includes your selected configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-files-are-automatically-created-when-you-select-a-configuration-option-duri"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-files-are-automatically-created-when-you-select-a-configuration-option-duri" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-files-are-automatically-created-when-you-select-a-configuration-option-duri" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What files are automatically created when you select a configuration option during ESLint setup?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will automatically install eslint and eslint-config-next as dependencies in your application and create an .eslintrc.json file in the root of your project that includes your selected configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="14oRr" prefix="r5188" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10122155952369294027"],"question":[0,"What is the difference between eslint-config-next and eslint-config-next/core-web-vitals?"],"answer":[0,"eslint-config-next is the base configuration with Next.js, React, and React Hooks rules. eslint-config-next/core-web-vitals includes everything from the base config, plus upgrades rules that impact Core Web Vitals from warnings to errors (recommended for most projects)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between eslint-config-next and eslint-config-next/core-web-vitals?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eslint-config-next is the base configuration with Next.js, React, and React Hooks rules. eslint-config-next/core-web-vitals includes everything from the base config, plus upgrades rules that impact Core Web Vitals from warnings to errors (recommended for most projects).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RKwVU" prefix="r5189" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11092597206023643228"],"question":[0,"How do you integrate Prettier with eslint-config-next?"],"answer":[0,"Install eslint-config-prettier and add 'prettier' to the extends array in your .eslintrc.json after 'next' or 'next/core-web-vitals'. For flat config: import prettier from 'eslint-config-prettier/flat' and include it in your defineConfig array."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-integrate-prettier-with-eslint-config-next"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-integrate-prettier-with-eslint-config-next" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-integrate-prettier-with-eslint-config-next" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you integrate Prettier with eslint-config-next?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Install eslint-config-prettier and add 'prettier' to the extends array in your .eslintrc.json after 'next' or 'next/core-web-vitals'. For flat config: import prettier from 'eslint-config-prettier/flat' and include it in your defineConfig array.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nvqXE" prefix="r5190" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11110292319352658118"],"question":[0,"Does next lint run during next dev?"],"answer":[0,"No. ESLint is built into Next.js and currently only runs at build time via next build. To check for errors during development, you must run next lint manually."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/38345"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-lint-run-during-next-dev"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-lint-run-during-next-dev" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-lint-run-during-next-dev" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does next lint run during next dev?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. ESLint is built into Next.js and currently only runs at build time via next build. To check for errors during development, you must run next lint manually.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/38345" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1CA5RN" prefix="r5191" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11492263891793713619"],"question":[0,"How do you override ESLint rules in eslint.config.mjs?"],"answer":[0,"Use the rules property in your eslint.config.mjs configuration object. Example: rules: { '@next/next/no-img-element': 'off' } to disable, 'warn' for warning, or 'error' for error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-override-eslint-rules-in-eslint-config-mjs"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-override-eslint-rules-in-eslint-config-mjs" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-override-eslint-rules-in-eslint-config-mjs" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you override ESLint rules in eslint.config.mjs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the rules property in your eslint.config.mjs configuration object. Example: rules: { '@next/next/no-img-element': 'off' } to disable, 'warn' for warning, or 'error' for error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIb10F" prefix="r5192" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11747690733198418676"],"question":[0,"Can you use eslint-config-next without the next lint command?"],"answer":[0,"Yes. You can extend directly from the plugin using 'plugin:@next/next/recommended' in your ESLint config. Install via: npm install --save-dev @next/eslint-plugin-next"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/configuring/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-eslint-config-next-without-the-next-lint-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-eslint-config-next-without-the-next-lint-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-eslint-config-next-without-the-next-lint-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use eslint-config-next without the next lint command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can extend directly from the plugin using 'plugin:@next/next/recommended' in your ESLint config. Install via: npm install --save-dev @next/eslint-plugin-next</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/configuring/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpMrJW" prefix="r5193" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13355266608009989865"],"question":[0,"What directories does eslint-config-next automatically ignore?"],"answer":[0,"The configuration automatically ignores: .next/**, out/**, build/**, and next-env.d.ts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-directories-does-eslint-config-next-automatically-ignore"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directories-does-eslint-config-next-automatically-ignore" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directories-does-eslint-config-next-automatically-ignore" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directories does eslint-config-next automatically ignore?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The configuration automatically ignores: .next/<strong>, out/</strong>, build/**, and next-env.d.ts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23JqNU" prefix="r5194" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14317782530271423252"],"question":[0,"What is the severity level of @next/next/no-img-element in the base vs core-web-vitals config?"],"answer":[0,"In the base configuration (eslint-config-next), @next/next/no-img-element is a warning by default. In the core-web-vitals configuration (eslint-config-next/core-web-vitals), this rule is upgraded to an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-severity-level-of-next-next-no-img-element-in-the-base-vs-core-web-v"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-severity-level-of-next-next-no-img-element-in-the-base-vs-core-web-v" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-severity-level-of-next-next-no-img-element-in-the-base-vs-core-web-v" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the severity level of @next/next/no-img-element in the base vs core-web-vitals config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In the base configuration (eslint-config-next), @next/next/no-img-element is a warning by default. In the core-web-vitals configuration (eslint-config-next/core-web-vitals), this rule is upgraded to an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="styling-css-in-js-solutions" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Styling > CSS-in-JS Solutions</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="2url1v" prefix="r5195" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"325454242647097112"],"question":[0,"What is the minimum version of styled-jsx required for use with Next.js App Router Client Components?"],"answer":[0,"styled-jsx v5.1.0 or newer is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-version-of-styled-jsx-required-for-use-with-next-js-app-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-version-of-styled-jsx-required-for-use-with-next-js-app-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-version-of-styled-jsx-required-for-use-with-next-js-app-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum version of styled-jsx required for use with Next.js App Router Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>styled-jsx v5.1.0 or newer is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ewCJP" prefix="r5196" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"967657574464643373"],"question":[0,"What is the default value for the labelFormat option in Emotion Next.js compiler configuration?"],"answer":[0,"Defaults to '[local]'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-labelformat-option-in-emotion-next-js-compiler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-labelformat-option-in-emotion-next-js-compiler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-labelformat-option-in-emotion-next-js-compiler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the labelFormat option in Emotion Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Defaults to '[local]'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpbUHH" prefix="r5197" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2125472265233882478"],"question":[0,"Are CSS-in-JS libraries that require runtime JavaScript supported in React Server Components?"],"answer":[0,"No. CSS-in-JS libraries which require runtime JavaScript are not currently supported in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"are-css-in-js-libraries-that-require-runtime-javascript-supported-in-react-serve"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-css-in-js-libraries-that-require-runtime-javascript-supported-in-react-serve" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-css-in-js-libraries-that-require-runtime-javascript-supported-in-react-serve" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are CSS-in-JS libraries that require runtime JavaScript supported in React Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. CSS-in-JS libraries which require runtime JavaScript are not currently supported in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UCjVu" prefix="r5198" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2676297925583855365"],"question":[0,"Where are styles flushed during server rendering when using CSS-in-JS with Next.js App Router?"],"answer":[0,"Styles are extracted to a global registry and flushed to the <head> of your HTML."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"where-are-styles-flushed-during-server-rendering-when-using-css-in-js-with-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-are-styles-flushed-during-server-rendering-when-using-css-in-js-with-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-are-styles-flushed-during-server-rendering-when-using-css-in-js-with-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where are styles flushed during server rendering when using CSS-in-JS with Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Styles are extracted to a global registry and flushed to the <head> of your HTML.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z18pFYJ" prefix="r5199" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3291676410264997429"],"question":[0,"What browser check is recommended in the styled-components registry component for Next.js?"],"answer":[0,"if (typeof window !== 'undefined') return <>{children}</> - this skips stylesheet management on the client during hydration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-browser-check-is-recommended-in-the-styled-components-registry-component-fo"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browser-check-is-recommended-in-the-styled-components-registry-component-fo" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browser-check-is-recommended-in-the-styled-components-registry-component-fo" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browser check is recommended in the styled-components registry component for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>if (typeof window !== 'undefined') return <>{children}</> - this skips stylesheet management on the client during hydration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jLohk" prefix="r5200" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3597368526329873522"],"question":[0,"What is the default value for the meaninglessFileNames option in styled-components Next.js compiler configuration?"],"answer":[0,"Defaults to [\"index\"]."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-meaninglessfilenames-option-in-styled-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-meaninglessfilenames-option-in-styled-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-meaninglessfilenames-option-in-styled-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the meaninglessFileNames option in styled-components Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Defaults to ["index"].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="hTc6c" prefix="r5201" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4394830793834095273"],"question":[0,"What is the default value for the fileName option in styled-components Next.js compiler configuration?"],"answer":[0,"Enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-filename-option-in-styled-components-next-js-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-filename-option-in-styled-components-next-js-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-filename-option-in-styled-components-next-js-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the fileName option in styled-components Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dBf8X" prefix="r5202" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4494676845076084378"],"question":[0,"Which CSS-in-JS libraries are currently supported in Client Components in the Next.js App Router?"],"answer":[0,"ant-design, chakra-ui, @fluentui/react-components, kuma-ui, @mui/material, @mui/joy, pandacss, styled-jsx, styled-components, stylex, tamagui, tss-react, and vanilla-extract."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"which-css-in-js-libraries-are-currently-supported-in-client-components-in-the-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-css-in-js-libraries-are-currently-supported-in-client-components-in-the-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-css-in-js-libraries-are-currently-supported-in-client-components-in-the-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which CSS-in-JS libraries are currently supported in Client Components in the Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>ant-design, chakra-ui, @fluentui/react-components, kuma-ui, @mui/material, @mui/joy, pandacss, styled-jsx, styled-components, stylex, tamagui, tss-react, and vanilla-extract.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hNlUC" prefix="r5203" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5290707517029482530"],"question":[0,"Which hook must be used to inject CSS-in-JS styles before content that might use them?"],"answer":[0,"The useServerInsertedHTML hook from 'next/navigation'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"which-hook-must-be-used-to-inject-css-in-js-styles-before-content-that-might-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-hook-must-be-used-to-inject-css-in-js-styles-before-content-that-might-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-hook-must-be-used-to-inject-css-in-js-styles-before-content-that-might-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which hook must be used to inject CSS-in-JS styles before content that might use them?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The useServerInsertedHTML hook from 'next/navigation'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ow9aB" prefix="r5204" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5939888523826491425"],"question":[0,"What is the default value for the importMap option in Emotion Next.js compiler configuration?"],"answer":[0,"Undefined by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-importmap-option-in-emotion-next-js-compiler-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-importmap-option-in-emotion-next-js-compiler-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-importmap-option-in-emotion-next-js-compiler-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the importMap option in Emotion Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Undefined by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cfhNP" prefix="r5205" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6151726244826918450"],"question":[0,"What is the default value for the ssr option in styled-components Next.js compiler configuration?"],"answer":[0,"Enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-ssr-option-in-styled-components-next-js-compil"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-ssr-option-in-styled-components-next-js-compil" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-ssr-option-in-styled-components-next-js-compil" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the ssr option in styled-components Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UAueX" prefix="r5206" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6246781787451068177"],"question":[0,"What is the default value for the topLevelImportPaths option in styled-components Next.js compiler configuration?"],"answer":[0,"Empty by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-toplevelimportpaths-option-in-styled-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-toplevelimportpaths-option-in-styled-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-toplevelimportpaths-option-in-styled-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the topLevelImportPaths option in styled-components Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Empty by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tjzKV" prefix="r5207" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6550984568795242514"],"question":[0,"What is the default value for the cssProp option in styled-components Next.js compiler configuration?"],"answer":[0,"Enabled by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-cssprop-option-in-styled-components-next-js-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-cssprop-option-in-styled-components-next-js-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-cssprop-option-in-styled-components-next-js-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the cssProp option in styled-components Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Enabled by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="8q2I1" prefix="r5208" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6728471576420655653"],"question":[0,"What is the default value for the autoLabel option in Emotion Next.js compiler configuration?"],"answer":[0,"Defaults to 'dev-only'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-autolabel-option-in-emotion-next-js-compiler-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-autolabel-option-in-emotion-next-js-compiler-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-autolabel-option-in-emotion-next-js-compiler-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the autoLabel option in Emotion Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Defaults to 'dev-only'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6m962" prefix="r5209" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6747780709651964094"],"question":[0,"What is the default value for the displayName option in styled-components Next.js compiler configuration?"],"answer":[0,"Enabled by default in development, disabled in production to reduce file size."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-for-the-displayname-option-in-styled-components-next-j"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-for-the-displayname-option-in-styled-components-next-j" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-for-the-displayname-option-in-styled-components-next-j" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value for the displayName option in styled-components Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Enabled by default in development, disabled in production to reduce file size.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26NDvX" prefix="r5210" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7867368799117977955"],"question":[0,"What configuration must be added to next.config.js to enable styled-components compiler support?"],"answer":[0,"Set styledComponents: true in the compiler options: module.exports = { compiler: { styledComponents: true } }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-must-be-added-to-next-config-js-to-enable-styled-components-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-must-be-added-to-next-config-js-to-enable-styled-components-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-must-be-added-to-next-config-js-to-enable-styled-components-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration must be added to next.config.js to enable styled-components compiler support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set styledComponents: true in the compiler options: module.exports = { compiler: { styledComponents: true } }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eogeq" prefix="r5211" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9118866077569244277"],"question":[0,"What are the accepted values for the autoLabel option in Emotion Next.js compiler configuration?"],"answer":[0,"Accepts 'never', 'dev-only', or 'always'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/nextjs-compiler"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-accepted-values-for-the-autolabel-option-in-emotion-next-js-compile"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-accepted-values-for-the-autolabel-option-in-emotion-next-js-compile" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-accepted-values-for-the-autolabel-option-in-emotion-next-js-compile" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the accepted values for the autoLabel option in Emotion Next.js compiler configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Accepts 'never', 'dev-only', or 'always'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/nextjs-compiler" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2oVVUs" prefix="r5212" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9794551172218126013"],"question":[0,"What directive must be added to the CSS-in-JS registry component wrapper?"],"answer":[0,"'use client' - it must be a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-must-be-added-to-the-css-in-js-registry-component-wrapper"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-must-be-added-to-the-css-in-js-registry-component-wrapper" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-must-be-added-to-the-css-in-js-registry-component-wrapper" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive must be added to the CSS-in-JS registry component wrapper?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'use client' - it must be a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nNxt8" prefix="r5213" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10495784538238290894"],"question":[0,"Is styled-jsx bundled with Next.js by default?"],"answer":[0,"Yes, styled-jsx comes included with Next.js by default, requiring no additional installation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/styling-next-with-styled-jsx"]]],"topic":[0,"nextjs"],"slug":[0,"is-styled-jsx-bundled-with-next-js-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-styled-jsx-bundled-with-next-js-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-styled-jsx-bundled-with-next-js-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is styled-jsx bundled with Next.js by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, styled-jsx comes included with Next.js by default, requiring no additional installation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/styling-next-with-styled-jsx" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zw8wSX" prefix="r5214" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13009236189203523845"],"question":[0,"What styling solutions does Next.js recommend for Server Components?"],"answer":[0,"CSS Modules or other solutions that output CSS files, like PostCSS or Tailwind CSS."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-styling-solutions-does-next-js-recommend-for-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-styling-solutions-does-next-js-recommend-for-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-styling-solutions-does-next-js-recommend-for-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What styling solutions does Next.js recommend for Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CSS Modules or other solutions that output CSS files, like PostCSS or Tailwind CSS.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="gupNF" prefix="r5215" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13398102263780358480"],"question":[0,"How many steps are involved in configuring CSS-in-JS for Next.js App Router?"],"answer":[0,"Three steps: (1) a style registry to collect all CSS rules in a render, (2) the useServerInsertedHTML hook to inject rules before any content that might use them, (3) a Client Component that wraps your app with the style registry during initial server-side rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-steps-are-involved-in-configuring-css-in-js-for-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-steps-are-involved-in-configuring-css-in-js-for-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-steps-are-involved-in-configuring-css-in-js-for-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many steps are involved in configuring CSS-in-JS for Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Three steps: (1) a style registry to collect all CSS rules in a render, (2) the useServerInsertedHTML hook to inject rules before any content that might use them, (3) a Client Component that wraps your app with the style registry during initial server-side rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rL5od" prefix="r5216" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13535664210953576891"],"question":[0,"What is the minimum version of styled-components required for use with Next.js App Router?"],"answer":[0,"styled-components v6 or newer is required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/css-in-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-version-of-styled-components-required-for-use-with-next-js-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-version-of-styled-components-required-for-use-with-next-js-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-version-of-styled-components-required-for-use-with-next-js-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum version of styled-components required for use with Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>styled-components v6 or newer is required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/css-in-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="internationalization-routing-strategy" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Internationalization > Routing Strategy</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="23MM1C" prefix="r5217" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"431798754058534369"],"question":[0,"What are the two locale handling strategies available in Next.js built-in i18n routing?"],"answer":[0,"Sub-path Routing and Domain Routing. Sub-path Routing puts the locale in the URL path (e.g., /fr/page), while Domain Routing configures locales to be served from different domains (e.g., example.fr for French)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-locale-handling-strategies-available-in-next-js-built-in-i18n-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-locale-handling-strategies-available-in-next-js-built-in-i18n-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-locale-handling-strategies-available-in-next-js-built-in-i18n-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two locale handling strategies available in Next.js built-in i18n routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Sub-path Routing and Domain Routing. Sub-path Routing puts the locale in the URL path (e.g., /fr/page), while Domain Routing configures locales to be served from different domains (e.g., example.fr for French).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KOIcD" prefix="r5218" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"925532940005878480"],"question":[0,"What is the maximum recommended number of locales in Next.js i18n configuration?"],"answer":[0,"100 locales. Exceeding this limit will trigger a warning (previously it was a hard error). This limit was converted from an error to a warning in a pull request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/invalid-i18n-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-recommended-number-of-locales-in-next-js-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-recommended-number-of-locales-in-next-js-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-recommended-number-of-locales-in-next-js-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum recommended number of locales in Next.js i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>100 locales. Exceeding this limit will trigger a warning (previously it was a hard error). This limit was converted from an error to a warning in a pull request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/invalid-i18n-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZiscpL" prefix="r5219" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1010273967227450306"],"question":[0,"What is the name of the cookie that Next.js uses to override the Accept-Language header for locale selection?"],"answer":[0,"NEXT_LOCALE. When this cookie is set, Next.js will use the locale specified in the cookie instead of the Accept-Language header until the cookie is removed or expired."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-name-of-the-cookie-that-next-js-uses-to-override-the-accept-language"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-name-of-the-cookie-that-next-js-uses-to-override-the-accept-language" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-name-of-the-cookie-that-next-js-uses-to-override-the-accept-language" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the name of the cookie that Next.js uses to override the Accept-Language header for locale selection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_LOCALE. When this cookie is set, Next.js will use the locale specified in the cookie instead of the Accept-Language header until the cookie is removed or expired.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="BIT5C" prefix="r5220" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1701364145261773653"],"question":[0,"Does the router.asPath include the locale prefix in Next.js i18n routing?"],"answer":[0,"No, the asPath property does not include the locale prefix. If the URL is '/en/something', then asPath points to '/something'. This matches the basePath behavior where it is removed from the asPath value."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/18782"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-router-aspath-include-the-locale-prefix-in-next-js-i18n-routing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-router-aspath-include-the-locale-prefix-in-next-js-i18n-routing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-router-aspath-include-the-locale-prefix-in-next-js-i18n-routing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the router.asPath include the locale prefix in Next.js i18n routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the asPath property does not include the locale prefix. If the URL is '/en/something', then asPath points to '/something'. This matches the basePath behavior where it is removed from the asPath value.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/18782" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RB0FH" prefix="r5221" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2513714153929622236"],"question":[0,"What are the two required fields in the Next.js i18n configuration?"],"answer":[0,"locales (an array of locale strings) and defaultLocale (a string specifying the default locale). Both are required; if either is missing or invalid, Next.js will trigger an error during development server runs and production builds."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-required-fields-in-the-next-js-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-required-fields-in-the-next-js-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-required-fields-in-the-next-js-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two required fields in the Next.js i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>locales (an array of locale strings) and defaultLocale (a string specifying the default locale). Both are required; if either is missing or invalid, Next.js will trigger an error during development server runs and production builds.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z26NHuT" prefix="r5222" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2662298300272970930"],"question":[0,"What properties are available in the context parameter of getStaticProps and getServerSideProps when i18n is configured?"],"answer":[0,"The context includes: locale (the current active locale), locales (all configured locales), and defaultLocale (the configured default locale)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-are-available-in-the-context-parameter-of-getstaticprops-and-get"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-are-available-in-the-context-parameter-of-getstaticprops-and-get" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-are-available-in-the-context-parameter-of-getstaticprops-and-get" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties are available in the context parameter of getStaticProps and getServerSideProps when i18n is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The context includes: locale (the current active locale), locales (all configured locales), and defaultLocale (the configured default locale).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qdyfi" prefix="r5223" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3953150516842347230"],"question":[0,"What configuration option allows you to test locale domains locally with HTTP instead of HTTPS?"],"answer":[0,"The http: true field in the domain configuration. For example: { domain: 'example.fr', defaultLocale: 'fr', http: true } enables HTTP protocol for localhost testing."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/24991"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-allows-you-to-test-locale-domains-locally-with-http-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-allows-you-to-test-locale-domains-locally-with-http-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-allows-you-to-test-locale-domains-locally-with-http-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option allows you to test locale domains locally with HTTP instead of HTTPS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The http: true field in the domain configuration. For example: { domain: 'example.fr', defaultLocale: 'fr', http: true } enables HTTP protocol for localhost testing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/24991" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZbAsXF" prefix="r5224" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4473228343712606334"],"question":[0,"What is the minimum Next.js version that introduced built-in i18n routing support?"],"answer":[0,"Next.js v10.0.0 was the first version to introduce built-in support for internationalized (i18n) routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-next-js-version-that-introduced-built-in-i18n-routing-suppor"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-next-js-version-that-introduced-built-in-i18n-routing-suppor" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-next-js-version-that-introduced-built-in-i18n-routing-suppor" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum Next.js version that introduced built-in i18n routing support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js v10.0.0 was the first version to introduce built-in support for internationalized (i18n) routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1wkAL8" prefix="r5225" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4599635297254725262"],"question":[0,"How can you disable automatic locale detection in Next.js i18n?"],"answer":[0,"Set localeDetection: false in the i18n configuration. When disabled, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale-based domain or locale path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-disable-automatic-locale-detection-in-next-js-i18n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-disable-automatic-locale-detection-in-next-js-i18n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-disable-automatic-locale-detection-in-next-js-i18n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you disable automatic locale detection in Next.js i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set localeDetection: false in the i18n configuration. When disabled, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale-based domain or locale path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2nyNHr" prefix="r5226" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4642265823308500804"],"question":[0,"When using domain routing, what happens if a user with Accept-Language header fr;q=0.9 visits example.com (configured for en-US)?"],"answer":[0,"The user will be redirected to example.fr if that domain handles the fr locale by default. This is different from sub-path routing where the user would be redirected to /fr on the same domain."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-domain-routing-what-happens-if-a-user-with-accept-language-header-fr-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-domain-routing-what-happens-if-a-user-with-accept-language-header-fr-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-domain-routing-what-happens-if-a-user-with-accept-language-header-fr-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using domain routing, what happens if a user with Accept-Language header fr;q=0.9 visits example.com (configured for en-US)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The user will be redirected to example.fr if that domain handles the fr locale by default. This is different from sub-path routing where the user would be redirected to /fr on the same domain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2kyh5s" prefix="r5227" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6804513471457804964"],"question":[0,"Is built-in i18n routing available in Next.js App Router?"],"answer":[0,"No, with the release of the App Router, internationalized routing has been removed as a built-in Next.js feature. The locale, locales, defaultLocales, and domainLocales configuration values have been removed and are only available in the Pages Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-intl.dev/docs/getting-started/app-router"]]],"topic":[0,"nextjs"],"slug":[0,"is-built-in-i18n-routing-available-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-built-in-i18n-routing-available-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-built-in-i18n-routing-available-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is built-in i18n routing available in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, with the release of the App Router, internationalized routing has been removed as a built-in Next.js feature. The locale, locales, defaultLocales, and domainLocales configuration values have been removed and are only available in the Pages Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-intl.dev/docs/getting-started/app-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-intl.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2awq51" prefix="r5228" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7287670186952458508"],"question":[0,"Is the locales property required or optional within each domain configuration object?"],"answer":[0,"The locales property is optional within each domain object. It is only needed when you want to specify additional locales (beyond the defaultLocale) that should be handled by that specific domain."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-locales-property-required-or-optional-within-each-domain-configuration-ob"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-locales-property-required-or-optional-within-each-domain-configuration-ob" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-locales-property-required-or-optional-within-each-domain-configuration-ob" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the locales property required or optional within each domain configuration object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The locales property is optional within each domain object. It is only needed when you want to specify additional locales (beyond the defaultLocale) that should be handled by that specific domain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="xHrtH" prefix="r5229" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8658047503348067687"],"question":[0,"How does Next.js handle trailing slashes with i18n routing by default?"],"answer":[0,"By default, Next.js redirects URLs with trailing slashes to their counterpart without a trailing slash (e.g., /about/ redirects to /about). You can set trailingSlash: true to reverse this behavior. The middleware and navigation APIs will take the trailingSlash setting into account for i18n routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-trailing-slashes-with-i18n-routing-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-trailing-slashes-with-i18n-routing-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-trailing-slashes-with-i18n-routing-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle trailing slashes with i18n routing by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, Next.js redirects URLs with trailing slashes to their counterpart without a trailing slash (e.g., /about/ redirects to /about). You can set trailingSlash: true to reverse this behavior. The middleware and navigation APIs will take the trailingSlash setting into account for i18n routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1wVjIx" prefix="r5230" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9931377394916165676"],"question":[0,"What configuration field is required for each domain object when using domain routing in Next.js i18n?"],"answer":[0,"Each domain object requires a defaultLocale property. Optionally, you can also specify a locales array to define additional locales that should be handled by that domain."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-field-is-required-for-each-domain-object-when-using-domain-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-field-is-required-for-each-domain-object-when-using-domain-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-field-is-required-for-each-domain-object-when-using-domain-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration field is required for each domain object when using domain routing in Next.js i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each domain object requires a defaultLocale property. Optionally, you can also specify a locales array to define additional locales that should be handled by that domain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZFXfQB" prefix="r5231" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11056310169502888156"],"question":[0,"Is there a built-in prefixDefaultLocale configuration option in Next.js i18n?"],"answer":[0,"No, there is no official prefixDefaultLocale configuration option in Next.js's native i18n settings. The default locale always has no prefix by default. Workarounds involve using middleware with a fake 'default' locale or using third-party libraries like next-intl with localePrefix: 'always'."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/18419"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-built-in-prefixdefaultlocale-configuration-option-in-next-js-i18n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-built-in-prefixdefaultlocale-configuration-option-in-next-js-i18n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-built-in-prefixdefaultlocale-configuration-option-in-next-js-i18n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a built-in prefixDefaultLocale configuration option in Next.js i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, there is no official prefixDefaultLocale configuration option in Next.js's native i18n settings. The default locale always has no prefix by default. Workarounds involve using middleware with a fake 'default' locale or using third-party libraries like next-intl with localePrefix: 'always'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/18419" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1v6XSs" prefix="r5232" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11808404573994750079"],"question":[0,"What locale identifier format does Next.js use for i18n configuration?"],"answer":[0,"Next.js uses UTS Locale Identifiers, which are compatible with IETF BCP 47 language tags. The format is language-region-script (e.g., 'en-US', 'fr', 'nl-NL'), where region and script are optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-locale-identifier-format-does-next-js-use-for-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-locale-identifier-format-does-next-js-use-for-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-locale-identifier-format-does-next-js-use-for-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What locale identifier format does Next.js use for i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses UTS Locale Identifiers, which are compatible with IETF BCP 47 language tags. The format is language-region-script (e.g., 'en-US', 'fr', 'nl-NL'), where region and script are optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1B2UXT" prefix="r5233" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11958113814603748559"],"question":[0,"What happens when using domain routing and no domain matches the incoming request?"],"answer":[0,"If no domain matches, the middleware will fall back to default locale matching based on prefixes (e.g., on localhost for local development)."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/24991"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-using-domain-routing-and-no-domain-matches-the-incoming-reques"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-using-domain-routing-and-no-domain-matches-the-incoming-reques" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-using-domain-routing-and-no-domain-matches-the-incoming-reques" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when using domain routing and no domain matches the incoming request?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If no domain matches, the middleware will fall back to default locale matching based on prefixes (e.g., on localhost for local development).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/24991" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1BMuoJ" prefix="r5234" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13456437685465762295"],"question":[0,"Does the default locale have a prefix in Next.js sub-path routing?"],"answer":[0,"No, the default locale does not have a prefix. For example, with defaultLocale: 'en-US', the URLs would be /blog (default locale, no prefix), /fr/blog (French), /nl-NL/blog (Dutch)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-default-locale-have-a-prefix-in-next-js-sub-path-routing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-default-locale-have-a-prefix-in-next-js-sub-path-routing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-default-locale-have-a-prefix-in-next-js-sub-path-routing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the default locale have a prefix in Next.js sub-path routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the default locale does not have a prefix. For example, with defaultLocale: 'en-US', the URLs would be /blog (default locale, no prefix), /fr/blog (French), /nl-NL/blog (Dutch).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1TLuJ8" prefix="r5235" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13588221783571492901"],"question":[0,"Is Next.js i18n routing compatible with output: 'export' for static HTML export?"],"answer":[0,"No, internationalized routing does not integrate with output: 'export' as it does not leverage the Next.js routing layer. This feature requires a Node.js server or dynamic logic that cannot be computed during the build process."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"is-next-js-i18n-routing-compatible-with-output-export-for-static-html-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-next-js-i18n-routing-compatible-with-output-export-for-static-html-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-next-js-i18n-routing-compatible-with-output-export-for-static-html-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is Next.js i18n routing compatible with output: 'export' for static HTML export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, internationalized routing does not integrate with output: 'export' as it does not leverage the Next.js routing layer. This feature requires a Node.js server or dynamic logic that cannot be computed during the build process.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wPmCB" prefix="r5236" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13648962001554334843"],"question":[0,"Are redirects and rewrites in next.config.js automatically prefixed with locales when i18n is configured?"],"answer":[0,"Yes, when leveraging i18n support, each source and destination in redirects and rewrites is automatically prefixed to handle the configured locales unless you add locale: false to the redirect or rewrite."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"are-redirects-and-rewrites-in-next-config-js-automatically-prefixed-with-locales"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-redirects-and-rewrites-in-next-config-js-automatically-prefixed-with-locales" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-redirects-and-rewrites-in-next-config-js-automatically-prefixed-with-locales" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are redirects and rewrites in next.config.js automatically prefixed with locales when i18n is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, when leveraging i18n support, each source and destination in redirects and rewrites is automatically prefixed to handle the configured locales unless you add locale: false to the redirect or rewrite.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YaMuI" prefix="r5237" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14955483722467170141"],"question":[0,"What HTTP header does Next.js use for automatic locale detection?"],"answer":[0,"Next.js uses the Accept-Language header to automatically detect which locale the user prefers when they visit the application root."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-header-does-next-js-use-for-automatic-locale-detection"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-header-does-next-js-use-for-automatic-locale-detection" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-header-does-next-js-use-for-automatic-locale-detection" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP header does Next.js use for automatic locale detection?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses the Accept-Language header to automatically detect which locale the user prefers when they visit the application root.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1TR4X3" prefix="r5238" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14962528596278849956"],"question":[0,"What happens when a user visits the application root (/) with Next.js i18n and automatic locale detection enabled?"],"answer":[0,"Next.js will automatically detect which locale the user prefers based on the Accept-Language header and the current domain. If a locale other than the default locale is detected, the user will be redirected to the locale-prefixed path when using sub-path routing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-user-visits-the-application-root-with-next-js-i18n-and-autom"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-user-visits-the-application-root-with-next-js-i18n-and-autom" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-user-visits-the-application-root-with-next-js-i18n-and-autom" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a user visits the application root (/) with Next.js i18n and automatic locale detection enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will automatically detect which locale the user prefers based on the Accept-Language header and the current domain. If a locale other than the default locale is detected, the user will be redirected to the locale-prefixed path when using sub-path routing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-component-type-decision-criteria" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Component Type Decision Criteria</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZcI5GF" prefix="r5239" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"580135009378212860"],"question":[0,"Can you use React Context (createContext) in Server Components?"],"answer":[0,"No. React context is not supported in Server Components. createContext only works in Client Components, so components using context providers must be marked with 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/context-in-server-component"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-react-context-createcontext-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-react-context-createcontext-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-react-context-createcontext-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use React Context (createContext) in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. React context is not supported in Server Components. createContext only works in Client Components, so components using context providers must be marked with 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/context-in-server-component" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="19KeDK" prefix="r5240" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1179829670809962316"],"question":[0,"Do Server Components re-render on navigation?"],"answer":[0,"No. Layouts (which are Server Components by default) do not re-render on navigation. They preserve state, remain interactive, and can be cached and reused to avoid unnecessary computation when navigating between pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-components-re-render-on-navigation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-components-re-render-on-navigation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-components-re-render-on-navigation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Components re-render on navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Layouts (which are Server Components by default) do not re-render on navigation. They preserve state, remain interactive, and can be cached and reused to avoid unnecessary computation when navigating between pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20oOKE" prefix="r5241" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1676550019210043055"],"question":[0,"What does the 'use client' directive declare in terms of module boundaries?"],"answer":[0,"The 'use client' directive declares a boundary between the Server and Client module graphs (trees). It defines the client-server boundary, and components exported from such a file serve as entry points to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-use-client-directive-declare-in-terms-of-module-boundaries"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-use-client-directive-declare-in-terms-of-module-boundaries" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-use-client-directive-declare-in-terms-of-module-boundaries" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the 'use client' directive declare in terms of module boundaries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use client' directive declares a boundary between the Server and Client module graphs (trees). It defines the client-server boundary, and components exported from such a file serve as entry points to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1myfVg" prefix="r5242" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2331566618833319273"],"question":[0,"Where must the 'use client' directive be placed in a file?"],"answer":[0,"The 'use client' directive must be placed at the top of the file, before any imports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-use-client-directive-be-placed-in-a-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-use-client-directive-be-placed-in-a-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-use-client-directive-be-placed-in-a-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the 'use client' directive be placed in a file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use client' directive must be placed at the top of the file, before any imports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22mW3b" prefix="r5243" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3378764661368974911"],"question":[0,"Can you use event handlers like onClick and onChange in Server Components?"],"answer":[0,"No. Event handlers like onClick and onChange require the component to run in the browser and cannot be used in Server Components. Components using event handlers must be marked with 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-event-handlers-like-onclick-and-onchange-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-event-handlers-like-onclick-and-onchange-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-event-handlers-like-onclick-and-onchange-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use event handlers like onClick and onChange in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Event handlers like onClick and onChange require the component to run in the browser and cannot be used in Server Components. Components using event handlers must be marked with 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1x0rCX" prefix="r5244" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3676650677955561781"],"question":[0,"What are the performance benefits of using Server Components for data fetching?"],"answer":[0,"Server Components allow you to: (1) fetch data closer to the data source, improving performance by reducing fetch time and client requests, (2) query databases directly without an additional API layer, (3) keep expensive data fetches and logic on the server, only sending the result to the client, and (4) improve First Contentful Paint (FCP)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/fetching-data"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-performance-benefits-of-using-server-components-for-data-fetching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-performance-benefits-of-using-server-components-for-data-fetching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-performance-benefits-of-using-server-components-for-data-fetching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the performance benefits of using Server Components for data fetching?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Components allow you to: (1) fetch data closer to the data source, improving performance by reducing fetch time and client requests, (2) query databases directly without an additional API layer, (3) keep expensive data fetches and logic on the server, only sending the result to the client, and (4) improve First Contentful Paint (FCP).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/fetching-data" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="E7SNJ" prefix="r5245" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4509266833669284437"],"question":[0,"Can you access browser APIs like localStorage, window, or Navigator.geolocation in Server Components?"],"answer":[0,"No. Browser-only APIs like localStorage, window, and Navigator.geolocation cannot be accessed in Server Components. Components requiring browser APIs must be marked with 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-access-browser-apis-like-localstorage-window-or-navigator-geolocation-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-access-browser-apis-like-localstorage-window-or-navigator-geolocation-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-access-browser-apis-like-localstorage-window-or-navigator-geolocation-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you access browser APIs like localStorage, window, or Navigator.geolocation in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Browser-only APIs like localStorage, window, and Navigator.geolocation cannot be accessed in Server Components. Components requiring browser APIs must be marked with 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ofzSH" prefix="r5246" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5802299217382976445"],"question":[0,"What is the recommended pattern for nesting Server Components within Client Components?"],"answer":[0,"Use the children/composition pattern. Pass Server Components as children or props to Client Components rather than importing them directly. This allows Server Components to be rendered on the server ahead of time, with the resulting RSC payload containing references for where Client Components should be rendered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-pattern-for-nesting-server-components-within-client-comp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-pattern-for-nesting-server-components-within-client-comp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-pattern-for-nesting-server-components-within-client-comp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended pattern for nesting Server Components within Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the children/composition pattern. Pass Server Components as children or props to Client Components rather than importing them directly. This allows Server Components to be rendered on the server ahead of time, with the resulting RSC payload containing references for where Client Components should be rendered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27JBaD" prefix="r5247" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6179502902880128650"],"question":[0,"If you're building a component library, where should you add the 'use client' directive?"],"answer":[0,"Add the 'use client' directive to entry points that rely on client-only features. This lets users import components into Server Components without needing to create wrappers. Note that some bundlers might strip out 'use client' directives, requiring additional configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"if-you-re-building-a-component-library-where-should-you-add-the-use-client-direc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="if-you-re-building-a-component-library-where-should-you-add-the-use-client-direc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#if-you-re-building-a-component-library-where-should-you-add-the-use-client-direc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">If you're building a component library, where should you add the 'use client' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add the 'use client' directive to entry points that rely on client-only features. This lets users import components into Server Components without needing to create wrappers. Note that some bundlers might strip out 'use client' directives, requiring additional configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GoGsL" prefix="r5248" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7446151236341313097"],"question":[0,"Can you define multiple 'use client' entry points in your application?"],"answer":[0,"Yes. You can define multiple 'use client' entry points in your React Component tree. This allows you to split your application into multiple client bundles (or branches)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-define-multiple-use-client-entry-points-in-your-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-define-multiple-use-client-entry-points-in-your-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-define-multiple-use-client-entry-points-in-your-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you define multiple 'use client' entry points in your application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can define multiple 'use client' entry points in your React Component tree. This allows you to split your application into multiple client bundles (or branches).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="WJKJb" prefix="r5249" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8222732309023461721"],"question":[0,"How do Server Components affect JavaScript bundle size?"],"answer":[0,"Server Components allow you to keep large dependencies that would previously impact the client JavaScript bundle size on the server. This is particularly beneficial for users with slower internet or less powerful devices."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-server-components-affect-javascript-bundle-size"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-server-components-affect-javascript-bundle-size" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-server-components-affect-javascript-bundle-size" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do Server Components affect JavaScript bundle size?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Components allow you to keep large dependencies that would previously impact the client JavaScript bundle size on the server. This is particularly beneficial for users with slower internet or less powerful devices.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HqbxW" prefix="r5250" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8476428270594420515"],"question":[0,"What types of props can be passed from Server Components to Client Components?"],"answer":[0,"Props passed from Server Components to Client Components must be serializable by React. This means the props need to be in a format that React can serialize when sending data from the server to the client. Functions cannot be passed as props because they are not serializable."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-props-can-be-passed-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-props-can-be-passed-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-props-can-be-passed-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of props can be passed from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Props passed from Server Components to Client Components must be serializable by React. This means the props need to be in a format that React can serialize when sending data from the server to the client. Functions cannot be passed as props because they are not serializable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ztf9kB" prefix="r5251" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11439836819807601864"],"question":[0,"What should you do with third-party components that rely on client-only features but don't have the 'use client' directive?"],"answer":[0,"Wrap third-party components that rely on client-only features (like useState) in your own Client Components if they don't already have the 'use client' directive. Trying to use them directly in a Server Component will cause an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-do-with-third-party-components-that-rely-on-client-only-features"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-do-with-third-party-components-that-rely-on-client-only-features" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-do-with-third-party-components-that-rely-on-client-only-features" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you do with third-party components that rely on client-only features but don't have the 'use client' directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Wrap third-party components that rely on client-only features (like useState) in your own Client Components if they don't already have the 'use client' directive. Trying to use them directly in a Server Component will cause an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zc8VfK" prefix="r5252" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11463778255536563105"],"question":[0,"Do you need to add 'use client' to every file that contains Client Components?"],"answer":[0,"No. You only need to add the 'use client' directive to the files whose components you want to render directly within Server Components. Once a file is marked with 'use client', all its imports and child components are automatically considered part of the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"do-you-need-to-add-use-client-to-every-file-that-contains-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-you-need-to-add-use-client-to-every-file-that-contains-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-you-need-to-add-use-client-to-every-file-that-contains-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do you need to add 'use client' to every file that contains Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You only need to add the 'use client' directive to the files whose components you want to render directly within Server Components. Once a file is marked with 'use client', all its imports and child components are automatically considered part of the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2w0IbV" prefix="r5253" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11509108230268008643"],"question":[0,"Does wrapping your app with a Context Provider marked as 'use client' make your entire application client-side?"],"answer":[0,"No. When a Context Provider is marked with 'use client', it becomes an isolated Client module. Server Components passed as children to the provider remain server-rendered. The React Server can serialize the VDOM representation and put a slot/reference where the provider goes without opting the entire subtree into client components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"does-wrapping-your-app-with-a-context-provider-marked-as-use-client-make-your-en"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-wrapping-your-app-with-a-context-provider-marked-as-use-client-make-your-en" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-wrapping-your-app-with-a-context-provider-marked-as-use-client-make-your-en" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does wrapping your app with a Context Provider marked as 'use client' make your entire application client-side?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When a Context Provider is marked with 'use client', it becomes an isolated Client module. Server Components passed as children to the provider remain server-rendered. The React Server can serialize the VDOM representation and put a slot/reference where the provider goes without opting the entire subtree into client components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="bNVvD" prefix="r5254" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11644117039207663933"],"question":[0,"Can you import a Server Component directly inside a Client Component?"],"answer":[0,"No. You cannot import a Server Component directly inside a Client Component. However, you can pass Server Components as props (such as children) to Client Components using the composition pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-import-a-server-component-directly-inside-a-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-import-a-server-component-directly-inside-a-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-import-a-server-component-directly-inside-a-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you import a Server Component directly inside a Client Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot import a Server Component directly inside a Client Component. However, you can pass Server Components as props (such as children) to Client Components using the composition pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vMNfp" prefix="r5255" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12701134605776544270"],"question":[0,"What are the specific use cases listed in Next.js documentation for when to use Server Components?"],"answer":[0,"Server Components should be used for: (1) Fetching data from databases or APIs close to the source, (2) Using API keys, tokens, and other secrets without exposing them to the client, (3) Reducing the amount of JavaScript sent to the browser, and (4) Improving the First Contentful Paint (FCP) and streaming content progressively to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-specific-use-cases-listed-in-next-js-documentation-for-when-to-use-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-specific-use-cases-listed-in-next-js-documentation-for-when-to-use-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-specific-use-cases-listed-in-next-js-documentation-for-when-to-use-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the specific use cases listed in Next.js documentation for when to use Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Components should be used for: (1) Fetching data from databases or APIs close to the source, (2) Using API keys, tokens, and other secrets without exposing them to the client, (3) Reducing the amount of JavaScript sent to the browser, and (4) Improving the First Contentful Paint (FCP) and streaming content progressively to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z15bRbK" prefix="r5256" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12713901110027374998"],"question":[0,"What happens to all modules imported into a file marked with 'use client'?"],"answer":[0,"Once a file is marked with 'use client', all other modules imported into it, including child components, are considered part of the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-all-modules-imported-into-a-file-marked-with-use-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-all-modules-imported-into-a-file-marked-with-use-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-all-modules-imported-into-a-file-marked-with-use-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to all modules imported into a file marked with 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Once a file is marked with 'use client', all other modules imported into it, including child components, are considered part of the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27Uihi" prefix="r5257" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13384831115630011842"],"question":[0,"Can you use React hooks like useState and useEffect in Server Components?"],"answer":[0,"No. React hooks like useState, useEffect, useReducer, and other hooks cannot be used in Server Components because they rely on client-side execution and the React rendering lifecycle. You must mark components using these hooks with 'use client'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/react-client-hook-in-server-component"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-react-hooks-like-usestate-and-useeffect-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-react-hooks-like-usestate-and-useeffect-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-react-hooks-like-usestate-and-useeffect-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use React hooks like useState and useEffect in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. React hooks like useState, useEffect, useReducer, and other hooks cannot be used in Server Components because they rely on client-side execution and the React rendering lifecycle. You must mark components using these hooks with 'use client'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/react-client-hook-in-server-component" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1jSpeV" prefix="r5258" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13970206093358415805"],"question":[0,"Where should context providers be rendered in the component tree for optimal performance?"],"answer":[0,"Render providers as deep as possible in the tree, wrapping only {children} instead of the entire document. This makes it easier for Next.js to optimize the static parts of Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-context-providers-be-rendered-in-the-component-tree-for-optimal-per"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-context-providers-be-rendered-in-the-component-tree-for-optimal-per" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-context-providers-be-rendered-in-the-component-tree-for-optimal-per" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should context providers be rendered in the component tree for optimal performance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Render providers as deep as possible in the tree, wrapping only {children} instead of the entire document. This makes it easier for Next.js to optimize the static parts of Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZYYiaD" prefix="r5259" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14237701963428706904"],"question":[0,"What is the recommended approach for minimizing client JavaScript bundle size when using 'use client'?"],"answer":[0,"Add 'use client' to specific interactive components instead of marking large parts of your UI as Client Components. Move 'use client' boundaries down the component tree to isolate only the interactive elements that require client-side capabilities."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-minimizing-client-javascript-bundle-size-wh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-minimizing-client-javascript-bundle-size-wh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-minimizing-client-javascript-bundle-size-wh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for minimizing client JavaScript bundle size when using 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add 'use client' to specific interactive components instead of marking large parts of your UI as Client Components. Move 'use client' boundaries down the component tree to isolate only the interactive elements that require client-side capabilities.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2kzTUb" prefix="r5260" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15004754805415819268"],"question":[0,"What are the security benefits of using Server Components?"],"answer":[0,"Server Components allow you to keep sensitive data and logic on the server, such as API keys, tokens, and other secrets, without the risk of exposing them to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-security-benefits-of-using-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-security-benefits-of-using-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-security-benefits-of-using-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the security benefits of using Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Components allow you to keep sensitive data and logic on the server, such as API keys, tokens, and other secrets, without the risk of exposing them to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="edge-runtime-use-cases-trade-offs" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Edge Runtime > Use Cases & Trade-offs</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZVYmlb" prefix="r5261" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"901726294955173650"],"question":[0,"What is the primary use case for Node.js runtime (Serverless) according to Next.js documentation?"],"answer":[0,"Serverless is ideal if you need a scalable solution that can handle more complex computational loads than the Edge Runtime."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-primary-use-case-for-node-js-runtime-serverless-according-to-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-primary-use-case-for-node-js-runtime-serverless-according-to-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-primary-use-case-for-node-js-runtime-serverless-according-to-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the primary use case for Node.js runtime (Serverless) according to Next.js documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Serverless is ideal if you need a scalable solution that can handle more complex computational loads than the Edge Runtime.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1TKRHQ" prefix="r5262" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1995823815726496896"],"question":[0,"How do you enable Node.js runtime in middleware?"],"answer":[0,"Set runtime: 'nodejs' in the config export. Example: export const config = { runtime: 'nodejs' };"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-enable-node-js-runtime-in-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-enable-node-js-runtime-in-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-enable-node-js-runtime-in-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you enable Node.js runtime in middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set runtime: 'nodejs' in the config export. Example: export const config = { runtime: 'nodejs' };</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9ozTh" prefix="r5263" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2045454876460610896"],"question":[0,"What is the official Next.js recommendation regarding runtime choice for rendering applications?"],"answer":[0,"We recommend using the Node.js runtime for rendering your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-official-next-js-recommendation-regarding-runtime-choice-for-renderi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-official-next-js-recommendation-regarding-runtime-choice-for-renderi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-official-next-js-recommendation-regarding-runtime-choice-for-renderi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the official Next.js recommendation regarding runtime choice for rendering applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>We recommend using the Node.js runtime for rendering your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Y9uei" prefix="r5264" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2142891247211733805"],"question":[0,"What is the typical cold start time for Node.js Serverless Functions compared to Edge Runtime?"],"answer":[0,"It can take hundreds of milliseconds for Serverless Functions to boot up before they begin processing requests, and depending on the amount of traffic your site receives, this could be a frequent occurrence as the functions are not frequently 'warm'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-cold-start-time-for-node-js-serverless-functions-compared-to"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-cold-start-time-for-node-js-serverless-functions-compared-to" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-cold-start-time-for-node-js-serverless-functions-compared-to" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical cold start time for Node.js Serverless Functions compared to Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It can take hundreds of milliseconds for Serverless Functions to boot up before they begin processing requests, and depending on the amount of traffic your site receives, this could be a frequent occurrence as the functions are not frequently 'warm'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZpNo5q" prefix="r5265" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2327665163254435176"],"question":[0,"In which Next.js version did Node.js runtime support for middleware become stable?"],"answer":[0,"Next.js 15.5. Node.js runtime support for middleware was introduced as experimental in 15.2 and became stable in Next.js 15.5."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-5"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-node-js-runtime-support-for-middleware-become-stabl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-node-js-runtime-support-for-middleware-become-stabl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-node-js-runtime-support-for-middleware-become-stabl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did Node.js runtime support for middleware become stable?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 15.5. Node.js runtime support for middleware was introduced as experimental in 15.2 and became stable in Next.js 15.5.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZCT4YJ" prefix="r5266" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2639315662366846597"],"question":[0,"Can you use runtime = 'edge' with Cache Components in Next.js?"],"answer":[0,"No. Using runtime: 'edge' is not supported for Cache Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-runtime-edge-with-cache-components-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-runtime-edge-with-cache-components-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-runtime-edge-with-cache-components-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use runtime = 'edge' with Cache Components in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Using runtime: 'edge' is not supported for Cache Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22AgxE" prefix="r5267" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4117970501760584403"],"question":[0,"Can you use the runtime configuration option in Proxy (middleware) files?"],"answer":[0,"No. The runtime configuration option cannot be used in Proxy files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-the-runtime-configuration-option-in-proxy-middleware-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-the-runtime-configuration-option-in-proxy-middleware-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-the-runtime-configuration-option-in-proxy-middleware-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use the runtime configuration option in Proxy (middleware) files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The runtime configuration option cannot be used in Proxy files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1EgzLf" prefix="r5268" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5273636054382753380"],"question":[0,"Does the Edge Runtime support Incremental Static Regeneration (ISR)?"],"answer":[0,"No. The Edge Runtime does not support Incremental Static Regeneration (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-edge-runtime-support-incremental-static-regeneration-isr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-edge-runtime-support-incremental-static-regeneration-isr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-edge-runtime-support-incremental-static-regeneration-isr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Edge Runtime support Incremental Static Regeneration (ISR)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The Edge Runtime does not support Incremental Static Regeneration (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zf2ha0" prefix="r5269" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5649052038810920018"],"question":[0,"Is the revalidate configuration available when using runtime = 'edge'?"],"answer":[0,"No. The revalidate value is not available when using runtime = 'edge'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-revalidate-configuration-available-when-using-runtime-edge"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-revalidate-configuration-available-when-using-runtime-edge" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-revalidate-configuration-available-when-using-runtime-edge" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the revalidate configuration available when using runtime = 'edge'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The revalidate value is not available when using runtime = 'edge'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1AEH9B" prefix="r5270" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5883125425488587645"],"question":[0,"When deploying to Vercel, what requirement exists for environment variables to be available in Edge Runtime?"],"answer":[0,"When deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their name is prefixed with NEXT_PUBLIC_. It's strongly recommended to manage environment variables in Project Settings instead, from where all environment variables are available."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/configuring/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"when-deploying-to-vercel-what-requirement-exists-for-environment-variables-to-be"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-deploying-to-vercel-what-requirement-exists-for-environment-variables-to-be" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-deploying-to-vercel-what-requirement-exists-for-environment-variables-to-be" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When deploying to Vercel, what requirement exists for environment variables to be available in Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When deploying to Vercel, environment variables in .env* files will not be made available to Edge Runtime unless their name is prefixed with NEXT_PUBLIC_. It's strongly recommended to manage environment variables in Project Settings instead, from where all environment variables are available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/configuring/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sKR9x" prefix="r5271" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6208303732715785815"],"question":[0,"What are the two valid values for the runtime configuration option?"],"answer":[0,"'nodejs' (default) or 'edge'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-valid-values-for-the-runtime-configuration-option"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-valid-values-for-the-runtime-configuration-option" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-valid-values-for-the-runtime-configuration-option" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two valid values for the runtime configuration option?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'nodejs' (default) or 'edge'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pyi09" prefix="r5272" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6769907936740839660"],"question":[0,"What is the typical code size limit for Edge Runtime on Vercel's free/hobby plans?"],"answer":[0,"1 MB. Code executed in the Edge Runtime on Vercel cannot exceed between 1 MB and 4 MB, with the limit varying depending on your deployment infrastructure and plan. Free/Hobby plans have a 1 MB size limit for Edge Functions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-code-size-limit-for-edge-runtime-on-vercel-s-free-hobby-plan"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-code-size-limit-for-edge-runtime-on-vercel-s-free-hobby-plan" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-code-size-limit-for-edge-runtime-on-vercel-s-free-hobby-plan" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical code size limit for Edge Runtime on Vercel's free/hobby plans?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>1 MB. Code executed in the Edge Runtime on Vercel cannot exceed between 1 MB and 4 MB, with the limit varying depending on your deployment infrastructure and plan. Free/Hobby plans have a 1 MB size limit for Edge Functions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="iISgt" prefix="r5273" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7724584995128897368"],"question":[0,"Can both Node.js and Edge runtimes support streaming in Next.js?"],"answer":[0,"Yes. Both runtimes can support streaming depending on your deployment adapter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-both-node-js-and-edge-runtimes-support-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-both-node-js-and-edge-runtimes-support-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-both-node-js-and-edge-runtimes-support-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can both Node.js and Edge runtimes support streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Both runtimes can support streaming depending on your deployment adapter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="138CE6" prefix="r5274" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8007226798521002797"],"question":[0,"What dynamic code evaluation methods are prohibited in the Edge Runtime?"],"answer":[0,"eval(), new Function(evalString), WebAssembly.compile, and WebAssembly.instantiate are prohibited."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-dynamic-code-evaluation-methods-are-prohibited-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-dynamic-code-evaluation-methods-are-prohibited-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-dynamic-code-evaluation-methods-are-prohibited-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What dynamic code evaluation methods are prohibited in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>eval(), new Function(evalString), WebAssembly.compile, and WebAssembly.instantiate are prohibited.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="4SJb0" prefix="r5275" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8064652179183182334"],"question":[0,"Can you use require() directly in the Edge Runtime?"],"answer":[0,"No. Calling require directly is not allowed. Use ES Modules instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-require-directly-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-require-directly-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-require-directly-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use require() directly in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Calling require directly is not allowed. Use ES Modules instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z136nAn" prefix="r5276" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9169933972064738289"],"question":[0,"What is the primary use case for Edge Runtime according to Next.js documentation?"],"answer":[0,"The Edge Runtime is ideal if you need to deliver dynamic, personalized content at low latency with small, simple functions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-primary-use-case-for-edge-runtime-according-to-next-js-documentation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-primary-use-case-for-edge-runtime-according-to-next-js-documentation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-primary-use-case-for-edge-runtime-according-to-next-js-documentation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the primary use case for Edge Runtime according to Next.js documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Edge Runtime is ideal if you need to deliver dynamic, personalized content at low latency with small, simple functions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1K6YDx" prefix="r5277" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9768173545423516722"],"question":[0,"What is the default runtime for Next.js middleware?"],"answer":[0,"Middleware defaults to using the Edge runtime. Next.js Middleware uses the Edge Runtime by default for better performance, as having a lightweight runtime is critical to ensure low latency when running before every request."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-next-js-middleware"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-next-js-middleware" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-next-js-middleware" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Middleware defaults to using the Edge runtime. Next.js Middleware uses the Edge Runtime by default for better performance, as having a lightweight runtime is critical to ensure low latency when running before every request.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CXCI3" prefix="r5278" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10068759955426806616"],"question":[0,"Can you use node_modules packages in the Edge Runtime?"],"answer":[0,"Yes, but only if they implement ES Modules and do not use native Node.js APIs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-node-modules-packages-in-the-edge-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-node-modules-packages-in-the-edge-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-node-modules-packages-in-the-edge-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use node_modules packages in the Edge Runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, but only if they implement ES Modules and do not use native Node.js APIs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JpaV0" prefix="r5279" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10315129099889604031"],"question":[0,"What configuration option allows you to exempt specific files from Edge Runtime's dynamic code evaluation restrictions?"],"answer":[0,"unstable_allowDynamic - accepts a glob, or an array of globs, ignoring dynamic code evaluation for specific files. The globs are relative to your application root folder."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/edge"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-option-allows-you-to-exempt-specific-files-from-edge-runtime-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-option-allows-you-to-exempt-specific-files-from-edge-runtime-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-option-allows-you-to-exempt-specific-files-from-edge-runtime-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration option allows you to exempt specific files from Edge Runtime's dynamic code evaluation restrictions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>unstable_allowDynamic - accepts a glob, or an array of globs, ignoring dynamic code evaluation for specific files. The globs are relative to your application root folder.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/edge" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ORuFs" prefix="r5280" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13226512837551950665"],"question":[0,"In which Next.js version did the Edge Runtime become stable for API routes?"],"answer":[0,"Next.js 13.1 (released December 22, 2022). With Next.js 13.1, the Edge Runtime is now stable for API routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-1"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-did-the-edge-runtime-become-stable-for-api-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-did-the-edge-runtime-become-stable-for-api-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-did-the-edge-runtime-become-stable-for-api-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version did the Edge Runtime become stable for API routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.1 (released December 22, 2022). With Next.js 13.1, the Edge Runtime is now stable for API routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-1" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="P4a5H" prefix="r5281" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13779864477728528931"],"question":[0,"What is the default runtime for API Routes in Next.js?"],"answer":[0,"The default runtime for API Routes is 'nodejs'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-runtime-for-api-routes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-runtime-for-api-routes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-runtime-for-api-routes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default runtime for API Routes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default runtime for API Routes is 'nodejs'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2q9jSY" prefix="r5282" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14231186525791128267"],"question":[0,"Does self-hosted Edge Runtime require edge infrastructure or multi-region deployment?"],"answer":[0,"No. The runtime does not require running 'at the edge' and works in a single-region server. Middleware works self-hosted with zero configuration when deploying using next start. Additional configuration and infrastructure are required to run Middleware in multiple regions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/deploying"]]],"topic":[0,"nextjs"],"slug":[0,"does-self-hosted-edge-runtime-require-edge-infrastructure-or-multi-region-deploy"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-self-hosted-edge-runtime-require-edge-infrastructure-or-multi-region-deploy" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-self-hosted-edge-runtime-require-edge-infrastructure-or-multi-region-deploy" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does self-hosted Edge Runtime require edge infrastructure or multi-region deployment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The runtime does not require running 'at the edge' and works in a single-region server. Middleware works self-hosted with zero configuration when deploying using next start. Additional configuration and infrastructure are required to run Middleware in multiple regions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/deploying" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="internationalization-seo-metadata" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Internationalization > SEO & Metadata</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZolWYN" prefix="r5283" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1263891851499202786"],"question":[0,"Does Next.js support the x-default hreflang value in the alternates.languages metadata property?"],"answer":[0,"While not officially documented as a separate property, you can include 'x-default' as a key directly in the alternates.languages object (e.g., `'x-default': 'https://example.com'`) to generate the x-default hreflang tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/76729"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-support-the-x-default-hreflang-value-in-the-alternates-languages-me"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-support-the-x-default-hreflang-value-in-the-alternates-languages-me" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-support-the-x-default-hreflang-value-in-the-alternates-languages-me" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js support the x-default hreflang value in the alternates.languages metadata property?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>While not officially documented as a separate property, you can include 'x-default' as a key directly in the alternates.languages object (e.g., <code>'x-default': 'https://example.com'</code>) to generate the x-default hreflang tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/76729" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FjzK5" prefix="r5284" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1426699384531337244"],"question":[0,"Should metadata that doesn't depend on runtime information use the static metadata object or generateMetadata?"],"answer":[0,"It should be defined using the static metadata object rather than generateMetadata. This is more efficient as Next.js can optimize static metadata at build time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"should-metadata-that-doesn-t-depend-on-runtime-information-use-the-static-metada"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-metadata-that-doesn-t-depend-on-runtime-information-use-the-static-metada" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-metadata-that-doesn-t-depend-on-runtime-information-use-the-static-metada" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should metadata that doesn't depend on runtime information use the static metadata object or generateMetadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It should be defined using the static metadata object rather than generateMetadata. This is more efficient as Next.js can optimize static metadata at build time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27Kcrj" prefix="r5285" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1763188197213554039"],"question":[0,"Does Next.js metadata API support og:locale:alternate tags?"],"answer":[0,"No. The `<meta property=\"og:locale:alternate\" content=\"\" />` tag is not currently supported in the metadata object and generateMetadata function."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/55497"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-metadata-api-support-og-locale-alternate-tags"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-metadata-api-support-og-locale-alternate-tags" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-metadata-api-support-og-locale-alternate-tags" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js metadata API support og:locale:alternate tags?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The <code><meta property="og:locale:alternate" content="" /></code> tag is not currently supported in the metadata object and generateMetadata function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/55497" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tBsmD" prefix="r5286" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2404452246280071948"],"question":[0,"What is the exact property name to specify alternate language URLs in Next.js App Router metadata?"],"answer":[0,"The property is `alternates.languages` (not `alternates.hreflang`). The languages property accepts an object mapping language codes to URLs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-property-name-to-specify-alternate-language-urls-in-next-js-ap"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-property-name-to-specify-alternate-language-urls-in-next-js-ap" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-property-name-to-specify-alternate-language-urls-in-next-js-ap" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact property name to specify alternate language URLs in Next.js App Router metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The property is <code>alternates.languages</code> (not <code>alternates.hreflang</code>). The languages property accepts an object mapping language codes to URLs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xr3EJ" prefix="r5287" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3399509664971822960"],"question":[0,"Where is metadataBase typically set in a Next.js App Router project?"],"answer":[0,"metadataBase is typically set in the root app/layout.js to apply to URL-based metadata fields across all routes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"where-is-metadatabase-typically-set-in-a-next-js-app-router-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-is-metadatabase-typically-set-in-a-next-js-app-router-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-is-metadatabase-typically-set-in-a-next-js-app-router-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where is metadataBase typically set in a Next.js App Router project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>metadataBase is typically set in the root app/layout.js to apply to URL-based metadata fields across all routes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SlNwt" prefix="r5288" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4021458016340666442"],"question":[0,"What middleware matcher pattern should be used to skip opengraph-image paths in i18n routing?"],"answer":[0,"Use a pattern like `'/((?!api|_next|_vercel|.*/opengraph-image|.*\\..*).*)'` to exclude opengraph-image paths from internationalization middleware processing."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/55497"]]],"topic":[0,"nextjs"],"slug":[0,"what-middleware-matcher-pattern-should-be-used-to-skip-opengraph-image-paths-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-middleware-matcher-pattern-should-be-used-to-skip-opengraph-image-paths-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-middleware-matcher-pattern-should-be-used-to-skip-opengraph-image-paths-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What middleware matcher pattern should be used to skip opengraph-image paths in i18n routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use a pattern like <code>'/((?!api|_next|_vercel|.*/opengraph-image|.*\..*).*)'</code> to exclude opengraph-image paths from internationalization middleware processing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/55497" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2ohUcA" prefix="r5289" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4140277039884154070"],"question":[0,"How do you set canonical URLs dynamically with locale segments in Next.js App Router?"],"answer":[0,"Use generateMetadata with params: `return { alternates: { canonical: `https://example.com/${params.locale}/path/${params.id}` } }`. This generates a locale-aware canonical tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-set-canonical-urls-dynamically-with-locale-segments-in-next-js-app-ro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-set-canonical-urls-dynamically-with-locale-segments-in-next-js-app-ro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-set-canonical-urls-dynamically-with-locale-segments-in-next-js-app-ro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you set canonical URLs dynamically with locale segments in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use generateMetadata with params: <code>return { alternates: { canonical: </code><a href="https://example.com/$%7Bparams.locale%7D/path/$%7Bparams.id%7D%60">https://example.com/${params.locale}/path/${params.id}`</a> } }`. This generates a locale-aware canonical tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z195Smb" prefix="r5290" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4408821374909010912"],"question":[0,"Does Next.js App Router have built-in internationalized routing support?"],"answer":[0,"No. With the release of the App Router, internationalized routing has been removed as a built-in Next.js feature. You need to implement it manually or use third-party libraries like next-intl."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-app-router-have-built-in-internationalized-routing-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-app-router-have-built-in-internationalized-routing-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-app-router-have-built-in-internationalized-routing-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js App Router have built-in internationalized routing support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. With the release of the App Router, internationalized routing has been removed as a built-in Next.js feature. You need to implement it manually or use third-party libraries like next-intl.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1U0RvI" prefix="r5291" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4704949787516577224"],"question":[0,"What configuration properties are available in the i18n object in next.config.js for Pages Router?"],"answer":[0,"The i18n object supports: `locales` (array of all supported locales), `defaultLocale` (the default locale), `localeDetection` (boolean, defaults to true), and optionally `domains` (for domain-based routing)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-configuration-properties-are-available-in-the-i18n-object-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-configuration-properties-are-available-in-the-i18n-object-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-configuration-properties-are-available-in-the-i18n-object-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What configuration properties are available in the i18n object in next.config.js for Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The i18n object supports: <code>locales</code> (array of all supported locales), <code>defaultLocale</code> (the default locale), <code>localeDetection</code> (boolean, defaults to true), and optionally <code>domains</code> (for domain-based routing).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nSRxx" prefix="r5292" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6403798249545315133"],"question":[0,"Why might OpenGraph metadata not work at the root domain for internationalized Next.js sites?"],"answer":[0,"Social media crawlers don't send Accept-Language headers, so automatic locale detection doesn't work. OpenGraph metadata may only exist at locale-specific paths (e.g., /en, /fr) but not at the root domain without a locale prefix."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/55497"]]],"topic":[0,"nextjs"],"slug":[0,"why-might-opengraph-metadata-not-work-at-the-root-domain-for-internationalized-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-might-opengraph-metadata-not-work-at-the-root-domain-for-internationalized-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-might-opengraph-metadata-not-work-at-the-root-domain-for-internationalized-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why might OpenGraph metadata not work at the root domain for internationalized Next.js sites?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Social media crawlers don't send Accept-Language headers, so automatic locale detection doesn't work. OpenGraph metadata may only exist at locale-specific paths (e.g., /en, /fr) but not at the root domain without a locale prefix.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/55497" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2KfcH" prefix="r5293" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8018070053633220061"],"question":[0,"How do you internationalize dynamic OpenGraph images in Next.js?"],"answer":[0,"In your opengraph-image route, use `getTranslations` from next-intl/server with the locale parameter: `const t = await getTranslations({locale, namespace: 'OpenGraphImage'})`, then use translations in the ImageResponse component."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-intl-docs.vercel.app/docs/environments/metadata-route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-internationalize-dynamic-opengraph-images-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-internationalize-dynamic-opengraph-images-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-internationalize-dynamic-opengraph-images-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you internationalize dynamic OpenGraph images in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In your opengraph-image route, use <code>getTranslations</code> from next-intl/server with the locale parameter: <code>const t = await getTranslations({locale, namespace: 'OpenGraphImage'})</code>, then use translations in the ImageResponse component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-intl-docs.vercel.app/docs/environments/metadata-route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-intl-docs.vercel.app</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2qBSDt" prefix="r5294" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9009731476536752980"],"question":[0,"Is metadataBase required when using relative URLs in alternates.languages?"],"answer":[0,"Yes. Using a relative path in alternates.languages without configuring a metadataBase will cause a build error. However, if you provide absolute URLs, metadataBase will be ignored and is not required."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"is-metadatabase-required-when-using-relative-urls-in-alternates-languages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-metadatabase-required-when-using-relative-urls-in-alternates-languages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-metadatabase-required-when-using-relative-urls-in-alternates-languages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is metadataBase required when using relative URLs in alternates.languages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Using a relative path in alternates.languages without configuring a metadataBase will cause a build error. However, if you provide absolute URLs, metadataBase will be ignored and is not required.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1KO0R3" prefix="r5295" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9502439800107772596"],"question":[0,"What is the TypeScript type definition for alternates.languages in Next.js metadata?"],"answer":[0,"The type is `Languages<null | string | URL | AlternateLinkDescriptor[]>`, which means you can provide null, a string URL, a URL object, or an array of AlternateLinkDescriptor objects for each language code."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/62909"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typescript-type-definition-for-alternates-languages-in-next-js-metad"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typescript-type-definition-for-alternates-languages-in-next-js-metad" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typescript-type-definition-for-alternates-languages-in-next-js-metad" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the TypeScript type definition for alternates.languages in Next.js metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The type is <code>Languages<null | string | URL | AlternateLinkDescriptor[]></code>, which means you can provide null, a string URL, a URL object, or an array of AlternateLinkDescriptor objects for each language code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/62909" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2uTmBA" prefix="r5296" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9812304159887447174"],"question":[0,"Does Next.js automatically add hreflang meta tags for internationalized pages?"],"answer":[0,"No. Next.js doesn't know about variants of a page so it's up to you to add the hreflang meta tags using next/head (Pages Router) or the alternates.languages property in metadata (App Router)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-automatically-add-hreflang-meta-tags-for-internationalized-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-automatically-add-hreflang-meta-tags-for-internationalized-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-automatically-add-hreflang-meta-tags-for-internationalized-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js automatically add hreflang meta tags for internationalized pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Next.js doesn't know about variants of a page so it's up to you to add the hreflang meta tags using next/head (Pages Router) or the alternates.languages property in metadata (App Router).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qbQf7" prefix="r5297" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10024587621508875648"],"question":[0,"Where should robots.js be placed in a Next.js App Router project with i18n?"],"answer":[0,"robots.js must be placed at the app root level (app/robots.js), not inside the [locale] folder. If placed inside [locale], it won't work properly."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/amannn/next-intl/discussions/264"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-robots-js-be-placed-in-a-next-js-app-router-project-with-i18n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-robots-js-be-placed-in-a-next-js-app-router-project-with-i18n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-robots-js-be-placed-in-a-next-js-app-router-project-with-i18n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should robots.js be placed in a Next.js App Router project with i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>robots.js must be placed at the app root level (app/robots.js), not inside the [locale] folder. If placed inside [locale], it won't work properly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/amannn/next-intl/discussions/264" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17SqMc" prefix="r5298" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10809877525254087680"],"question":[0,"How can you generate locale-specific paths in robots.txt for all supported locales?"],"answer":[0,"Read the host from headers using `headers().get('x-forwarded-host') || headers().get('host')` and dynamically generate paths for all locales. You can also use a helper function that maps paths across all locale prefixes."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/amannn/next-intl/discussions/264"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-generate-locale-specific-paths-in-robots-txt-for-all-supported-local"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-generate-locale-specific-paths-in-robots-txt-for-all-supported-local" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-generate-locale-specific-paths-in-robots-txt-for-all-supported-local" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you generate locale-specific paths in robots.txt for all supported locales?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Read the host from headers using <code>headers().get('x-forwarded-host') || headers().get('host')</code> and dynamically generate paths for all locales. You can also use a helper function that maps paths across all locale prefixes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/amannn/next-intl/discussions/264" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="160abL" prefix="r5299" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10821083852285211885"],"question":[0,"When does Next.js Pages Router automatically detect and redirect users based on their locale preference?"],"answer":[0,"When a user visits the application root (generally /), Next.js will try to automatically detect which locale the user prefers based on the Accept-Language header and the current domain, then redirect them to the appropriate locale-prefixed path or domain."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-next-js-pages-router-automatically-detect-and-redirect-users-based-on-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-next-js-pages-router-automatically-detect-and-redirect-users-based-on-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-next-js-pages-router-automatically-detect-and-redirect-users-based-on-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does Next.js Pages Router automatically detect and redirect users based on their locale preference?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a user visits the application root (generally /), Next.js will try to automatically detect which locale the user prefers based on the Accept-Language header and the current domain, then redirect them to the appropriate locale-prefixed path or domain.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z4GdGG" prefix="r5300" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11525364320056384958"],"question":[0,"What HTML element does Next.js generate when you configure alternates.languages in metadata?"],"answer":[0,"Next.js generates `<link rel=\"alternate\" hreflang=\"[language-code]\" href=\"[url]\" />` tags for each language variant specified in the alternates.languages object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-element-does-next-js-generate-when-you-configure-alternates-languages-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-element-does-next-js-generate-when-you-configure-alternates-languages-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-element-does-next-js-generate-when-you-configure-alternates-languages-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML element does Next.js generate when you configure alternates.languages in metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js generates <code><link rel="alternate" hreflang="[language-code]" href="[url]" /></code> tags for each language variant specified in the alternates.languages object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vD8BB" prefix="r5301" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11543259565581182114"],"question":[0,"What happens when localeDetection is set to false in Next.js Pages Router i18n config?"],"answer":[0,"When localeDetection is set to false, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale based domain or locale path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-localedetection-is-set-to-false-in-next-js-pages-router-i18n-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-localedetection-is-set-to-false-in-next-js-pages-router-i18n-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-localedetection-is-set-to-false-in-next-js-pages-router-i18n-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when localeDetection is set to false in Next.js Pages Router i18n config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When localeDetection is set to false, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale based domain or locale path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1soPHH" prefix="r5302" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12326109647407874444"],"question":[0,"What locale format should be used for the openGraph.locale metadata property in Next.js?"],"answer":[0,"Use underscore format like 'en_US' (not hyphen format like 'en-US'). This follows the Open Graph protocol specification which uses underscores to separate language and region codes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"what-locale-format-should-be-used-for-the-opengraph-locale-metadata-property-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-locale-format-should-be-used-for-the-opengraph-locale-metadata-property-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-locale-format-should-be-used-for-the-opengraph-locale-metadata-property-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What locale format should be used for the openGraph.locale metadata property in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use underscore format like 'en_US' (not hyphen format like 'en-US'). This follows the Open Graph protocol specification which uses underscores to separate language and region codes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-metadata" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UPPyD" prefix="r5303" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13126033806520043926"],"question":[0,"What is the recommended approach for generating multilingual sitemaps in Next.js App Router?"],"answer":[0,"Use the built-in app/sitemap.ts functionality and map routes with flatMap to generate entries for each locale, including alternates with language variations using the xhtml schema."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/oikon/implementing-multilingual-sitemap-with-next-intl-in-nextjs-app-router-1354"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-generating-multilingual-sitemaps-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-generating-multilingual-sitemaps-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-generating-multilingual-sitemaps-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for generating multilingual sitemaps in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the built-in app/sitemap.ts functionality and map routes with flatMap to generate entries for each locale, including alternates with language variations using the xhtml schema.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/oikon/implementing-multilingual-sitemap-with-next-intl-in-nextjs-app-router-1354" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB3YKp" prefix="r5304" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14849782269338932405"],"question":[0,"How do you internationalize metadata in generateMetadata with next-intl?"],"answer":[0,"Use `getTranslations` from 'next-intl/server' and pass the locale from params explicitly: `const t = await getTranslations({locale, namespace: 'Metadata'})`. This makes the metadata handler eligible for static rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-intl.dev/docs/environments/actions-metadata-route-handlers"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-internationalize-metadata-in-generatemetadata-with-next-intl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-internationalize-metadata-in-generatemetadata-with-next-intl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-internationalize-metadata-in-generatemetadata-with-next-intl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you internationalize metadata in generateMetadata with next-intl?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use <code>getTranslations</code> from 'next-intl/server' and pass the locale from params explicitly: <code>const t = await getTranslations({locale, namespace: 'Metadata'})</code>. This makes the metadata handler eligible for static rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-intl.dev/docs/environments/actions-metadata-route-handlers" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-intl.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="internationalization-locale-configuration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Internationalization > Locale Configuration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="WcquS" prefix="r5305" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1327033817606050397"],"question":[0,"What is the purpose of the http field in the domains array?"],"answer":[0,"The http field (when set to true) is an optional field that can be used to test locale domains locally with http instead of https."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-http-field-in-the-domains-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-http-field-in-the-domains-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-http-field-in-the-domains-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the http field in the domains array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The http field (when set to true) is an optional field that can be used to test locale domains locally with http instead of https.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z11w3VP" prefix="r5306" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1889492578760301637"],"question":[0,"Must subdomains be included in the domain value for domain routing?"],"answer":[0,"Yes. Subdomains must be included in the domain value to be matched, e.g. 'fr.example.com' or 'www.example.com' if that is the expected hostname."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"must-subdomains-be-included-in-the-domain-value-for-domain-routing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-subdomains-be-included-in-the-domain-value-for-domain-routing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-subdomains-be-included-in-the-domain-value-for-domain-routing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must subdomains be included in the domain value for domain routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Subdomains must be included in the domain value to be matched, e.g. 'fr.example.com' or '<a href="http://www.example.com">www.example.com</a>' if that is the expected hostname.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1oOLdJ" prefix="r5307" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2308311801092460231"],"question":[0,"What is the workaround to add a prefix to the default locale using Next.js 12 and Middleware?"],"answer":[0,"Add a 'default' locale intentionally to your configuration with locales: ['default', 'en', 'de', 'fr'], defaultLocale: 'default', and localeDetection: false, then use Middleware to implement custom routing rules that redirect from the 'default' locale to your actual default locale with a prefix."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-workaround-to-add-a-prefix-to-the-default-locale-using-next-js-12-an"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-workaround-to-add-a-prefix-to-the-default-locale-using-next-js-12-an" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-workaround-to-add-a-prefix-to-the-default-locale-using-next-js-12-an" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the workaround to add a prefix to the default locale using Next.js 12 and Middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add a 'default' locale intentionally to your configuration with locales: ['default', 'en', 'de', 'fr'], defaultLocale: 'default', and localeDetection: false, then use Middleware to implement custom routing rules that redirect from the 'default' locale to your actual default locale with a prefix.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1N9TmN" prefix="r5308" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2332760619394246749"],"question":[0,"What is the maximum number of locale items allowed in the locales array?"],"answer":[0,"100 locale items. Exceeding this limit will result in an invalid i18n config error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/invalid-i18n-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-locale-items-allowed-in-the-locales-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-locale-items-allowed-in-the-locales-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-locale-items-allowed-in-the-locales-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of locale items allowed in the locales array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>100 locale items. Exceeding this limit will result in an invalid i18n config error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/invalid-i18n-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAcg7F" prefix="r5309" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2444609796892253112"],"question":[0,"What is the recommended approach to reduce build time for dynamic pages with multiple locales?"],"answer":[0,"Use a fallback mode (fallback: true or fallback: 'blocking' in getStaticPaths). This allows you to return only the most popular paths and locales from getStaticPaths for prerendering during the build, and Next.js will build the remaining pages at runtime as they are requested."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-to-reduce-build-time-for-dynamic-pages-with-mul"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-to-reduce-build-time-for-dynamic-pages-with-mul" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-to-reduce-build-time-for-dynamic-pages-with-mul" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach to reduce build time for dynamic pages with multiple locales?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use a fallback mode (fallback: true or fallback: 'blocking' in getStaticPaths). This allows you to return only the most popular paths and locales from getStaticPaths for prerendering during the build, and Next.js will build the remaining pages at runtime as they are requested.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mbgYV" prefix="r5310" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2834074919730624829"],"question":[0,"What are the two required fields in the i18n configuration object?"],"answer":[0,"locales (array of all locales you want to support) and defaultLocale (the default locale used when visiting a non-locale prefixed path)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/invalid-i18n-config"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-required-fields-in-the-i18n-configuration-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-required-fields-in-the-i18n-configuration-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-required-fields-in-the-i18n-configuration-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two required fields in the i18n configuration object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>locales (array of all locales you want to support) and defaultLocale (the default locale used when visiting a non-locale prefixed path)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/invalid-i18n-config" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZrK9iL" prefix="r5311" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3781756455213098030"],"question":[0,"What cookie name does Next.js use to store locale preferences?"],"answer":[0,"NEXT_LOCALE. The middleware can access the locale from this cookie using req.cookies.get('NEXT_LOCALE')?.value"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-name-does-next-js-use-to-store-locale-preferences"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-name-does-next-js-use-to-store-locale-preferences" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-name-does-next-js-use-to-store-locale-preferences" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie name does Next.js use to store locale preferences?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>NEXT_LOCALE. The middleware can access the locale from this cookie using req.cookies.get('NEXT_LOCALE')?.value</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2o8Uma" prefix="r5312" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5264401781258999720"],"question":[0,"What three locale-related properties are available in the getStaticProps context parameter?"],"answer":[0,"locale (contains the active locale), locales (contains all supported locales), and defaultLocale (contains the configured default locale). These are only present if i18n is enabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-locale-related-properties-are-available-in-the-getstaticprops-context"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-locale-related-properties-are-available-in-the-getstaticprops-context" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-locale-related-properties-are-available-in-the-getstaticprops-context" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three locale-related properties are available in the getStaticProps context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>locale (contains the active locale), locales (contains all supported locales), and defaultLocale (contains the configured default locale). These are only present if i18n is enabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1AWcd6" prefix="r5313" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6271333882149293606"],"question":[0,"What fields are required in each domain object within the domains array?"],"answer":[0,"domain (the domain name as a string) and defaultLocale (the default locale for that domain as a string). The http and locales fields are optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-fields-are-required-in-each-domain-object-within-the-domains-array"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-fields-are-required-in-each-domain-object-within-the-domains-array" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-fields-are-required-in-each-domain-object-within-the-domains-array" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What fields are required in each domain object within the domains array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>domain (the domain name as a string) and defaultLocale (the default locale for that domain as a string). The http and locales fields are optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="x9lDS" prefix="r5314" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6516721080461354815"],"question":[0,"What happens when a user with Accept-Language header 'fr;q=0.9' visits example.com if example.fr is configured as the domain for the fr locale?"],"answer":[0,"They will be redirected to example.fr since that domain handles the fr locale by default (assuming localeDetection is enabled)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-user-with-accept-language-header-fr-q-0-9-visits-example-com"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-user-with-accept-language-header-fr-q-0-9-visits-example-com" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-user-with-accept-language-header-fr-q-0-9-visits-example-com" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a user with Accept-Language header 'fr;q=0.9' visits example.com if example.fr is configured as the domain for the fr locale?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>They will be redirected to example.fr since that domain handles the fr locale by default (assuming localeDetection is enabled).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jvj5O" prefix="r5315" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6844016960244826410"],"question":[0,"What happens when localeDetection is set to false?"],"answer":[0,"Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale based domain or locale path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-localedetection-is-set-to-false"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-localedetection-is-set-to-false" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-localedetection-is-set-to-false" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when localeDetection is set to false?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale based domain or locale path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lbLs0" prefix="r5316" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7196135795387218619"],"question":[0,"Does the active locale get automatically prepended to Link hrefs when i18n is configured?"],"answer":[0,"Yes. The active locale is automatically prepended to Link hrefs by default when i18n is configured in next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-active-locale-get-automatically-prepended-to-link-hrefs-when-i18n-is-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-active-locale-get-automatically-prepended-to-link-hrefs-when-i18n-is-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-active-locale-get-automatically-prepended-to-link-hrefs-when-i18n-is-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the active locale get automatically prepended to Link hrefs when i18n is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The active locale is automatically prepended to Link hrefs by default when i18n is configured in next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IY7qj" prefix="r5317" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9493652382589178062"],"question":[0,"In which Next.js version was built-in i18n routing support introduced?"],"answer":[0,"Next.js v10.0.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-built-in-i18n-routing-support-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-built-in-i18n-routing-support-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-built-in-i18n-routing-support-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was built-in i18n routing support introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js v10.0.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="V3pqh" prefix="r5318" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9814521329918691765"],"question":[0,"What three locale-related properties are available in the getServerSideProps context parameter?"],"answer":[0,"locale (contains the currently active locale), locales (contains all configured locales), and defaultLocale (contains the configured default locale). These are only present if i18n is enabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-locale-related-properties-are-available-in-the-getserversideprops-con"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-locale-related-properties-are-available-in-the-getserversideprops-con" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-locale-related-properties-are-available-in-the-getserversideprops-con" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three locale-related properties are available in the getServerSideProps context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>locale (contains the currently active locale), locales (contains all configured locales), and defaultLocale (contains the configured default locale). These are only present if i18n is enabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="27IkYz" prefix="r5319" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10225557381210995367"],"question":[0,"Is the built-in i18n configuration in next.config.js available in the App Router?"],"answer":[0,"No. The built-in i18n Next.js features (i18n config in next.config.js) are not available in the App Router. The locale, locales, defaultLocales, and domainLocales values have been removed from the App Router because built-in i18n Next.js features are no longer necessary in the app directory. You must use middleware and dynamic route segments instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-built-in-i18n-configuration-in-next-config-js-available-in-the-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-built-in-i18n-configuration-in-next-config-js-available-in-the-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-built-in-i18n-configuration-in-next-config-js-available-in-the-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the built-in i18n configuration in next.config.js available in the App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The built-in i18n Next.js features (i18n config in next.config.js) are not available in the App Router. The locale, locales, defaultLocales, and domainLocales values have been removed from the App Router because built-in i18n Next.js features are no longer necessary in the app directory. You must use middleware and dynamic route segments instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VpTFK" prefix="r5320" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11009673054465245218"],"question":[0,"What parameter can you pass to router.push() to specify a different locale?"],"answer":[0,"Pass a locale property in the options object (third parameter). Example: router.push('/another', '/another', { locale: 'fr' })"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameter-can-you-pass-to-router-push-to-specify-a-different-locale"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameter-can-you-pass-to-router-push-to-specify-a-different-locale" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameter-can-you-pass-to-router-push-to-specify-a-different-locale" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameter can you pass to router.push() to specify a different locale?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pass a locale property in the options object (third parameter). Example: router.push('/another', '/another', { locale: 'fr' })</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sbFz1" prefix="r5321" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11038273573143914339"],"question":[0,"What two locale-related properties are available in the getStaticPaths context parameter?"],"answer":[0,"locales (configured locales array) and defaultLocale (configured default locale)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-locale-related-properties-are-available-in-the-getstaticpaths-context-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-locale-related-properties-are-available-in-the-getstaticpaths-context-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-locale-related-properties-are-available-in-the-getstaticpaths-context-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two locale-related properties are available in the getStaticPaths context parameter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>locales (configured locales array) and defaultLocale (configured default locale)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2mcr28" prefix="r5322" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11528089483798640559"],"question":[0,"Is the i18n configuration compatible with output: 'export' in next.config.js?"],"answer":[0,"No. When you define i18n in your next.config.js along with output: 'export', this combination is not supported. The built-in i18n routing feature requires server-side logic that is incompatible with fully static exports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/export-no-i18n"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-i18n-configuration-compatible-with-output-export-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-i18n-configuration-compatible-with-output-export-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-i18n-configuration-compatible-with-output-export-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the i18n configuration compatible with output: 'export' in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When you define i18n in your next.config.js along with output: 'export', this combination is not supported. The built-in i18n routing feature requires server-side logic that is incompatible with fully static exports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/export-no-i18n" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5ACMB" prefix="r5323" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12362872163410301625"],"question":[0,"How do you disable automatic locale prefixing in next/link?"],"answer":[0,"Set locale={false} on the Link component. When false, href has to include the locale as the default behavior is disabled. Example: <Link href=\"/fr/about\" locale={false}>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/link"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-disable-automatic-locale-prefixing-in-next-link"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-disable-automatic-locale-prefixing-in-next-link" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-disable-automatic-locale-prefixing-in-next-link" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you disable automatic locale prefixing in next/link?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set locale={false} on the Link component. When false, href has to include the locale as the default behavior is disabled. Example: <Link href="/fr/about" locale={false}></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/link" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16ShAY" prefix="r5324" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13193170093128201124"],"question":[0,"Can you return a locale field from getStaticPaths when i18n is configured?"],"answer":[0,"Yes. You can return a locale field alongside the params object in the paths array to specify which locale you want to render for each path, like: { params: { slug: 'post-1' }, locale: 'en-US' }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-return-a-locale-field-from-getstaticpaths-when-i18n-is-configured"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-return-a-locale-field-from-getstaticpaths-when-i18n-is-configured" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-return-a-locale-field-from-getstaticpaths-when-i18n-is-configured" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you return a locale field from getStaticPaths when i18n is configured?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can return a locale field alongside the params object in the paths array to specify which locale you want to render for each path, like: { params: { slug: 'post-1' }, locale: 'en-US' }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1kNAEm" prefix="r5325" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14055045177983407146"],"question":[0,"Does the default locale have a URL prefix in sub-path routing?"],"answer":[0,"No. The default locale does not have a prefix. For example, if en-US is the default locale, /blog will be used instead of /en-US/blog."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-default-locale-have-a-url-prefix-in-sub-path-routing"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-default-locale-have-a-url-prefix-in-sub-path-routing" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-default-locale-have-a-url-prefix-in-sub-path-routing" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the default locale have a URL prefix in sub-path routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The default locale does not have a prefix. For example, if en-US is the default locale, /blog will be used instead of /en-US/blog.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zHDh1" prefix="r5326" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14985913631107119744"],"question":[0,"Are static pages (Automatically Statically Optimized and non-dynamic getStaticProps pages) generated for all locales?"],"answer":[0,"Yes. A version of the page will be generated for each locale configured in the i18n settings."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"are-static-pages-automatically-statically-optimized-and-non-dynamic-getstaticpro"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-static-pages-automatically-statically-optimized-and-non-dynamic-getstaticpro" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-static-pages-automatically-statically-optimized-and-non-dynamic-getstaticpro" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are static pages (Automatically Statically Optimized and non-dynamic getStaticProps pages) generated for all locales?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. A version of the page will be generated for each locale configured in the i18n settings.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="deploying-containerized-deployment" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Deploying > Containerized Deployment</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZndhuB" prefix="r5327" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1348836676708315572"],"question":[0,"What typical Docker image size reduction can be achieved using Next.js standalone mode?"],"answer":[0,"Standalone mode can reduce image size from over 500MB-2GB to 150-230MB, achieving 75-90% reduction depending on dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/angojay/optimizing-nextjs-docker-images-with-standalone-mode-2nnh"]]],"topic":[0,"nextjs"],"slug":[0,"what-typical-docker-image-size-reduction-can-be-achieved-using-next-js-standalon"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-typical-docker-image-size-reduction-can-be-achieved-using-next-js-standalon" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-typical-docker-image-size-reduction-can-be-achieved-using-next-js-standalon" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What typical Docker image size reduction can be achieved using Next.js standalone mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Standalone mode can reduce image size from over 500MB-2GB to 150-230MB, achieving 75-90% reduction depending on dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/angojay/optimizing-nextjs-docker-images-with-standalone-mode-2nnh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gNdpo" prefix="r5328" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1876100505644833183"],"question":[0,"What package is required for Next.js Image Optimization in standalone mode?"],"answer":[0,"The `sharp` package must be installed in production. Add `RUN npm i sharp` in the runner stage of your Dockerfile, or set `NEXT_SHARP_PATH` environment variable to its location."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sharp-missing-in-production"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-is-required-for-next-js-image-optimization-in-standalone-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-is-required-for-next-js-image-optimization-in-standalone-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-is-required-for-next-js-image-optimization-in-standalone-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package is required for Next.js Image Optimization in standalone mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>sharp</code> package must be installed in production. Add <code>RUN npm i sharp</code> in the runner stage of your Dockerfile, or set <code>NEXT_SHARP_PATH</code> environment variable to its location.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sharp-missing-in-production" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16p9Kc" prefix="r5329" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2043992533255713209"],"question":[0,"What three COPY commands are required in a Next.js standalone Docker build?"],"answer":[0,"`COPY --from=builder /app/.next/standalone ./`, `COPY --from=builder /app/.next/static ./.next/static`, and `COPY --from=builder /app/public ./public`"],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/angojay/optimizing-nextjs-docker-images-with-standalone-mode-2nnh"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-copy-commands-are-required-in-a-next-js-standalone-docker-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-copy-commands-are-required-in-a-next-js-standalone-docker-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-copy-commands-are-required-in-a-next-js-standalone-docker-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three COPY commands are required in a Next.js standalone Docker build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>COPY --from=builder /app/.next/standalone ./</code>, <code>COPY --from=builder /app/.next/static ./.next/static</code>, and <code>COPY --from=builder /app/public ./public</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/angojay/optimizing-nextjs-docker-images-with-standalone-mode-2nnh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2v6lbh" prefix="r5330" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3054614771559166016"],"question":[0,"What NODE_ENV value should be set for Next.js production Docker builds?"],"answer":[0,"`ENV NODE_ENV=production` - This prevents dev dependencies from being installed and optimizes the build for production."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.simplr.sh/posts/next-js-docker-deployment/"]]],"topic":[0,"nextjs"],"slug":[0,"what-node-env-value-should-be-set-for-next-js-production-docker-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-node-env-value-should-be-set-for-next-js-production-docker-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-node-env-value-should-be-set-for-next-js-production-docker-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What NODE_ENV value should be set for Next.js production Docker builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>ENV NODE_ENV=production</code> - This prevents dev dependencies from being installed and optimizes the build for production.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.simplr.sh/posts/next-js-docker-deployment/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.simplr.sh</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1m9EdO" prefix="r5331" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4192158899744765929"],"question":[0,"Do Docker deployments support all Next.js features?"],"answer":[0,"Yes, Docker deployments support all Next.js features. Next.js can be deployed to any provider that supports Docker containers, including Kubernetes and cloud providers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/deploying"]]],"topic":[0,"nextjs"],"slug":[0,"do-docker-deployments-support-all-next-js-features"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-docker-deployments-support-all-next-js-features" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-docker-deployments-support-all-next-js-features" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Docker deployments support all Next.js features?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Docker deployments support all Next.js features. Next.js can be deployed to any provider that supports Docker containers, including Kubernetes and cloud providers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/deploying" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nBetB" prefix="r5332" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4568256636176154271"],"question":[0,"What is the correct USER command for running Next.js as non-root in Docker?"],"answer":[0,"`USER nextjs` - This switches from root to the nextjs user (UID 1001) created earlier in the Dockerfile for security purposes."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.simplr.sh/posts/next-js-docker-deployment/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-correct-user-command-for-running-next-js-as-non-root-in-docker"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-correct-user-command-for-running-next-js-as-non-root-in-docker" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-correct-user-command-for-running-next-js-as-non-root-in-docker" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the correct USER command for running Next.js as non-root in Docker?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>USER nextjs</code> - This switches from root to the nextjs user (UID 1001) created earlier in the Dockerfile for security purposes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.simplr.sh/posts/next-js-docker-deployment/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.simplr.sh</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uwYGa" prefix="r5333" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5320534239373588280"],"question":[0,"What base Docker image is used in the official Next.js with-docker example?"],"answer":[0,"The official example uses `node:20-alpine` as the base image for its lightweight size (~70MB vs ~300MB for full images)."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile"]]],"topic":[0,"nextjs"],"slug":[0,"what-base-docker-image-is-used-in-the-official-next-js-with-docker-example"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-base-docker-image-is-used-in-the-official-next-js-with-docker-example" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-base-docker-image-is-used-in-the-official-next-js-with-docker-example" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What base Docker image is used in the official Next.js with-docker example?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The official example uses <code>node:20-alpine</code> as the base image for its lightweight size (~70MB vs ~300MB for full images).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27JRa" prefix="r5334" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5381743345472696326"],"question":[0,"What file does Next.js standalone mode generate to run the application?"],"answer":[0,"A minimal `server.js` file is automatically generated in the `.next/standalone` folder, which can be run with `node server.js` instead of `next start`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/output"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-does-next-js-standalone-mode-generate-to-run-the-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-does-next-js-standalone-mode-generate-to-run-the-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-does-next-js-standalone-mode-generate-to-run-the-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file does Next.js standalone mode generate to run the application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A minimal <code>server.js</code> file is automatically generated in the <code>.next/standalone</code> folder, which can be run with <code>node server.js</code> instead of <code>next start</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/output" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YheJn" prefix="r5335" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5490210924756964299"],"question":[0,"What is the correct docker run command syntax for port mapping in Next.js?"],"answer":[0,"`docker run -p 3000:3000 <image-name>` where the format is `-p HOST_PORT:CONTAINER_PORT`. The first 3000 is your machine's port, the second is the container's port."],"confidence":[0,0.95],"sources":[1,[[0,"https://markus.oberlehner.net/blog/running-nextjs-with-docker"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-correct-docker-run-command-syntax-for-port-mapping-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-correct-docker-run-command-syntax-for-port-mapping-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-correct-docker-run-command-syntax-for-port-mapping-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the correct docker run command syntax for port mapping in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>docker run -p 3000:3000 <image-name></code> where the format is <code>-p HOST_PORT:CONTAINER_PORT</code>. The first 3000 is your machine's port, the second is the container's port.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://markus.oberlehner.net/blog/running-nextjs-with-docker" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>markus.oberlehner.net</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSPeQ3" prefix="r5336" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5512053184665797841"],"question":[0,"What are the three common stage names used in Next.js multi-stage Docker builds?"],"answer":[0,"The three stages are: `deps` (dependencies installation), `builder` (build execution), and `runner` (final production image)."],"confidence":[0,0.95],"sources":[1,[[0,"https://johnnymetz.com/posts/dockerize-nextjs-app/"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-common-stage-names-used-in-next-js-multi-stage-docker-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-common-stage-names-used-in-next-js-multi-stage-docker-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-common-stage-names-used-in-next-js-multi-stage-docker-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three common stage names used in Next.js multi-stage Docker builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three stages are: <code>deps</code> (dependencies installation), <code>builder</code> (build execution), and <code>runner</code> (final production image).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://johnnymetz.com/posts/dockerize-nextjs-app/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>johnnymetz.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qYtXs" prefix="r5337" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6011079613485776121"],"question":[0,"What Next.js configuration setting is required to enable standalone output mode for Docker deployments?"],"answer":[0,"Set `output: \"standalone\"` in your next.config.js file. This creates a folder at .next/standalone which can be deployed on its own without installing node_modules."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js/output"]]],"topic":[0,"nextjs"],"slug":[0,"what-next-js-configuration-setting-is-required-to-enable-standalone-output-mode-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-next-js-configuration-setting-is-required-to-enable-standalone-output-mode-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-next-js-configuration-setting-is-required-to-enable-standalone-output-mode-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What Next.js configuration setting is required to enable standalone output mode for Docker deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Set <code>output: "standalone"</code> in your next.config.js file. This creates a folder at .next/standalone which can be deployed on its own without installing node_modules.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js/output" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ztz017" prefix="r5338" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6339210736832638975"],"question":[0,"What does the --chown flag do in Next.js Docker COPY commands?"],"answer":[0,"`COPY --from=builder --chown=nextjs:nodejs` changes ownership during the copy process, ensuring files are owned by the non-root nextjs:nodejs user for security."],"confidence":[0,0.95],"sources":[1,[[0,"https://markus.oberlehner.net/blog/running-nextjs-with-docker"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-chown-flag-do-in-next-js-docker-copy-commands"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-chown-flag-do-in-next-js-docker-copy-commands" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-chown-flag-do-in-next-js-docker-copy-commands" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the --chown flag do in Next.js Docker COPY commands?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>COPY --from=builder --chown=nextjs:nodejs</code> changes ownership during the copy process, ensuring files are owned by the non-root nextjs:nodejs user for security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://markus.oberlehner.net/blog/running-nextjs-with-docker" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>markus.oberlehner.net</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGYfF0" prefix="r5339" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6827900368443649064"],"question":[0,"What npm install flag should be avoided when installing Sharp in Docker?"],"answer":[0,"Remove the `--ignore-scripts` flag from npm install commands. The correct command is `npm install --production --frozen-lockfile` without `--ignore-scripts`, to ensure Sharp installs properly."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/59460"]]],"topic":[0,"nextjs"],"slug":[0,"what-npm-install-flag-should-be-avoided-when-installing-sharp-in-docker"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-npm-install-flag-should-be-avoided-when-installing-sharp-in-docker" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-npm-install-flag-should-be-avoided-when-installing-sharp-in-docker" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What npm install flag should be avoided when installing Sharp in Docker?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Remove the <code>--ignore-scripts</code> flag from npm install commands. The correct command is <code>npm install --production --frozen-lockfile</code> without <code>--ignore-scripts</code>, to ensure Sharp installs properly.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/59460" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnoxBH" prefix="r5340" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7746283068721036183"],"question":[0,"How does the Next.js Docker example detect which package manager to use?"],"answer":[0,"It checks for lockfiles: if `yarn.lock` exists, runs `yarn --frozen-lockfile`; if `package-lock.json` exists, runs `npm ci`; if `pnpm-lock.yaml` exists, runs `corepack enable pnpm && pnpm i --frozen-lockfile`."],"confidence":[0,0.95],"sources":[1,[[0,"https://dev.to/sliplane/understanding-nextjs-docker-images-2g08"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-the-next-js-docker-example-detect-which-package-manager-to-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-the-next-js-docker-example-detect-which-package-manager-to-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-the-next-js-docker-example-detect-which-package-manager-to-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does the Next.js Docker example detect which package manager to use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It checks for lockfiles: if <code>yarn.lock</code> exists, runs <code>yarn --frozen-lockfile</code>; if <code>package-lock.json</code> exists, runs <code>npm ci</code>; if <code>pnpm-lock.yaml</code> exists, runs <code>corepack enable pnpm && pnpm i --frozen-lockfile</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dev.to/sliplane/understanding-nextjs-docker-images-2g08" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dev.to</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vBWiR" prefix="r5341" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10120206927196609590"],"question":[0,"What three entries are essential in a .dockerignore file for Next.js?"],"answer":[0,"`node_modules`, `.next`, and `.git` - These prevent unnecessary files from being copied into the Docker build context."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/selfup/nextjs-docker/blob/master/.dockerignore"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-entries-are-essential-in-a-dockerignore-file-for-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-entries-are-essential-in-a-dockerignore-file-for-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-entries-are-essential-in-a-dockerignore-file-for-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three entries are essential in a .dockerignore file for Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>node_modules</code>, <code>.next</code>, and <code>.git</code> - These prevent unnecessary files from being copied into the Docker build context.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/selfup/nextjs-docker/blob/master/.dockerignore" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="26BrMJ" prefix="r5342" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10155724658900921250"],"question":[0,"What command enables pnpm in a Docker container using Corepack?"],"answer":[0,"`RUN corepack enable` or `RUN corepack enable pnpm`. For a specific version: `RUN corepack prepare pnpm@7.15.0 --activate`."],"confidence":[0,0.95],"sources":[1,[[0,"https://pnpm.io/docker"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-enables-pnpm-in-a-docker-container-using-corepack"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-enables-pnpm-in-a-docker-container-using-corepack" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-enables-pnpm-in-a-docker-container-using-corepack" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command enables pnpm in a Docker container using Corepack?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>RUN corepack enable</code> or <code>RUN corepack enable pnpm</code>. For a specific version: <code>RUN corepack prepare pnpm@7.15.0 --activate</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://pnpm.io/docker" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>pnpm.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEC5st" prefix="r5343" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10303235049088621503"],"question":[0,"What package must be installed on Alpine-based Docker images for Next.js compatibility?"],"answer":[0,"Install libc6-compat using the command `RUN apk add --no-cache libc6-compat`. This provides compatibility for glibc-dependent Node.js packages that may not work with Alpine's musl libc."],"confidence":[0,0.95],"sources":[1,[[0,"https://dawchihliou.github.io/articles/lean-docker-images-for-nextjs"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-must-be-installed-on-alpine-based-docker-images-for-next-js-compati"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-must-be-installed-on-alpine-based-docker-images-for-next-js-compati" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-must-be-installed-on-alpine-based-docker-images-for-next-js-compati" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package must be installed on Alpine-based Docker images for Next.js compatibility?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Install libc6-compat using the command <code>RUN apk add --no-cache libc6-compat</code>. This provides compatibility for glibc-dependent Node.js packages that may not work with Alpine's musl libc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://dawchihliou.github.io/articles/lean-docker-images-for-nextjs" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>dawchihliou.github.io</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1wAbDK" prefix="r5344" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10456579064280596883"],"question":[0,"What is the exact docker build command syntax for a Next.js application?"],"answer":[0,"`docker build -t nextjs-docker .` builds the image, and `docker run -p 3000:3000 nextjs-docker` runs the container with port mapping."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/deploying"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-docker-build-command-syntax-for-a-next-js-application"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-docker-build-command-syntax-for-a-next-js-application" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-docker-build-command-syntax-for-a-next-js-application" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact docker build command syntax for a Next.js application?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>docker build -t nextjs-docker .</code> builds the image, and <code>docker run -p 3000:3000 nextjs-docker</code> runs the container with port mapping.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/deploying" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vy16M" prefix="r5345" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11956514280532382137"],"question":[0,"What UID and GID values are conventionally used for the non-root nextjs user in Docker?"],"answer":[0,"UID 1001 for the nextjs user and GID 1001 for the nodejs group, created with `RUN addgroup --system --gid 1001 nodejs` and `RUN adduser --system --uid 1001 nextjs`."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.simplr.sh/posts/next-js-docker-deployment/"]]],"topic":[0,"nextjs"],"slug":[0,"what-uid-and-gid-values-are-conventionally-used-for-the-non-root-nextjs-user-in-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-uid-and-gid-values-are-conventionally-used-for-the-non-root-nextjs-user-in-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-uid-and-gid-values-are-conventionally-used-for-the-non-root-nextjs-user-in-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What UID and GID values are conventionally used for the non-root nextjs user in Docker?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>UID 1001 for the nextjs user and GID 1001 for the nodejs group, created with <code>RUN addgroup --system --gid 1001 nodejs</code> and <code>RUN adduser --system --uid 1001 nextjs</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.simplr.sh/posts/next-js-docker-deployment/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.simplr.sh</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="S4JWb" prefix="r5346" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12758211853434528394"],"question":[0,"What PORT environment variable can be set to customize the Next.js server port in Docker?"],"answer":[0,"`ENV PORT=3000` - The PORT environment variable can be changed to run Next.js on a different port, though 3000 is the default."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/29464"]]],"topic":[0,"nextjs"],"slug":[0,"what-port-environment-variable-can-be-set-to-customize-the-next-js-server-port-i"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-port-environment-variable-can-be-set-to-customize-the-next-js-server-port-i" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-port-environment-variable-can-be-set-to-customize-the-next-js-server-port-i" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What PORT environment variable can be set to customize the Next.js server port in Docker?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>ENV PORT=3000</code> - The PORT environment variable can be changed to run Next.js on a different port, though 3000 is the default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/29464" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdhPsJ" prefix="r5347" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13133059975057374606"],"question":[0,"What is the default port number that Next.js applications listen on in Docker containers?"],"answer":[0,"Port 3000 is the default port. This is typically exposed in the Dockerfile with `EXPOSE 3000` and used in the docker run command as `-p 3000:3000`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/deploying"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-port-number-that-next-js-applications-listen-on-in-docker-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-port-number-that-next-js-applications-listen-on-in-docker-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-port-number-that-next-js-applications-listen-on-in-docker-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default port number that Next.js applications listen on in Docker containers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Port 3000 is the default port. This is typically exposed in the Dockerfile with <code>EXPOSE 3000</code> and used in the docker run command as <code>-p 3000:3000</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/deploying" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ecYeb" prefix="r5348" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15097991594940452882"],"question":[0,"What is the purpose of the --no-cache flag in the Alpine apk add command?"],"answer":[0,"The `--no-cache` flag in `RUN apk add --no-cache libc6-compat` prevents Alpine's package manager from caching the package index, keeping the Docker image size smaller."],"confidence":[0,0.95],"sources":[1,[[0,"https://medium.com/@lucaslauriano.souza/why-you-should-use-run-apk-add-no-cache-libc6-compat-docker-with-node-js-6028a12d0ac5"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-no-cache-flag-in-the-alpine-apk-add-command"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-no-cache-flag-in-the-alpine-apk-add-command" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-no-cache-flag-in-the-alpine-apk-add-command" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the --no-cache flag in the Alpine apk add command?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>--no-cache</code> flag in <code>RUN apk add --no-cache libc6-compat</code> prevents Alpine's package manager from caching the package index, keeping the Docker image size smaller.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://medium.com/@lucaslauriano.souza/why-you-should-use-run-apk-add-no-cache-libc6-compat-docker-with-node-js-6028a12d0ac5" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>medium.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-component-composition-patterns" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Component Composition Patterns</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 22 questions </span> </div> <div class="space-y-4"> <astro-island uid="YBm85" prefix="r5349" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2666383230852636820"],"question":[0,"Where should Context providers be rendered for optimal Next.js performance?"],"answer":[0,"You should render providers as deep as possible in the tree. For example, having ThemeProvider only wrap {children} instead of the entire <html> document. This makes it easier for Next.js to optimize the static parts of your Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-context-providers-be-rendered-for-optimal-next-js-performance"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-context-providers-be-rendered-for-optimal-next-js-performance" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-context-providers-be-rendered-for-optimal-next-js-performance" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should Context providers be rendered for optimal Next.js performance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should render providers as deep as possible in the tree. For example, having ThemeProvider only wrap {children} instead of the entire <html> document. This makes it easier for Next.js to optimize the static parts of your Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1aarSH" prefix="r5350" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2855271601393754792"],"question":[0,"Are layouts in Next.js nested by default?"],"answer":[0,"Yes. By default, layouts in the folder hierarchy are also nested, which means they wrap child layouts via their children prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/layouts-and-pages"]]],"topic":[0,"nextjs"],"slug":[0,"are-layouts-in-next-js-nested-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-layouts-in-next-js-nested-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-layouts-in-next-js-nested-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are layouts in Next.js nested by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. By default, layouts in the folder hierarchy are also nested, which means they wrap child layouts via their children prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/layouts-and-pages" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Znlz1o" prefix="r5351" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2878224159577223357"],"question":[0,"When using the children prop pattern with Client Components, when does the Client Component know what the children will be?"],"answer":[0,"The Client Component doesn't know that children will eventually be filled in by the result of a Server Component. Its only responsibility is to decide where children will eventually be placed. The Server Component children are rendered on the server ahead of time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"when-using-the-children-prop-pattern-with-client-components-when-does-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-using-the-children-prop-pattern-with-client-components-when-does-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-using-the-children-prop-pattern-with-client-components-when-does-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When using the children prop pattern with Client Components, when does the Client Component know what the children will be?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Client Component doesn't know that children will eventually be filled in by the result of a Server Component. Its only responsibility is to decide where children will eventually be placed. The Server Component children are rendered on the server ahead of time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Fmd0Y" prefix="r5352" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3652974172029925075"],"question":[0,"How do you use a third-party component that relies on client-only features but lacks 'use client'?"],"answer":[0,"You can wrap it in your own Client Component with the 'use client' directive. This enables its use within Server Components without errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-use-a-third-party-component-that-relies-on-client-only-features-but-l"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-use-a-third-party-component-that-relies-on-client-only-features-but-l" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-use-a-third-party-component-that-relies-on-client-only-features-but-l" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you use a third-party component that relies on client-only features but lacks 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can wrap it in your own Client Component with the 'use client' directive. This enables its use within Server Components without errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1W8Myz" prefix="r5353" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3872951866802170322"],"question":[0,"What package marks modules that contain client-only logic?"],"answer":[0,"The 'client-only' package can be used to mark modules that contain client-only logic, such as code that accesses the window object. This prevents accidental usage in Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-marks-modules-that-contain-client-only-logic"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-marks-modules-that-contain-client-only-logic" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-marks-modules-that-contain-client-only-logic" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package marks modules that contain client-only logic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'client-only' package can be used to mark modules that contain client-only logic, such as code that accesses the window object. This prevents accidental usage in Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdsR0V" prefix="r5354" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3884519565261533229"],"question":[0,"What does the RSC Payload contain?"],"answer":[0,"The RSC Payload contains: (1) The rendered result of Server Components, (2) Placeholders for where Client Components should be rendered and references to their JavaScript files, and (3) Any props passed from a Server Component to a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-rsc-payload-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-rsc-payload-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-rsc-payload-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the RSC Payload contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload contains: (1) The rendered result of Server Components, (2) Placeholders for where Client Components should be rendered and references to their JavaScript files, and (3) Any props passed from a Server Component to a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1RsF7r" prefix="r5355" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5523482834455556996"],"question":[0,"What does the 'use client' directive define in Next.js?"],"answer":[0,"The 'use client' directive is used to declare a boundary between the Server and Client module graphs (or trees). It marks the entry point for components to render on the client side."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-use-client-directive-define-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-use-client-directive-define-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-use-client-directive-define-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the 'use client' directive define in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use client' directive is used to declare a boundary between the Server and Client module graphs (or trees). It marks the entry point for components to render on the client side.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1XYByS" prefix="r5356" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6413123160636454613"],"question":[0,"What is the RSC Payload in Next.js?"],"answer":[0,"The RSC Payload (React Server Components Payload) is a compact binary representation of the rendered React Server Components tree. It's used by React on the client to update the browser's DOM and reconcile the Client and Server Component trees."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-rsc-payload-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-rsc-payload-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-rsc-payload-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the RSC Payload in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC Payload (React Server Components Payload) is a compact binary representation of the rendered React Server Components tree. It's used by React on the client to update the browser's DOM and reconcile the Client and Server Component trees.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YY6bg" prefix="r5357" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6993456024868456781"],"question":[0,"What is the recommended strategy for reducing Client JavaScript bundle size?"],"answer":[0,"Move Client Components down your component tree to the leaves where possible. Add 'use client' to specific interactive components instead of marking large parts of your UI as Client Components. For example, keep static elements (logo, links) as Server Components and only mark interactive parts (search bar) as Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-strategy-for-reducing-client-javascript-bundle-size"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-strategy-for-reducing-client-javascript-bundle-size" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-strategy-for-reducing-client-javascript-bundle-size" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended strategy for reducing Client JavaScript bundle size?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Move Client Components down your component tree to the leaves where possible. Add 'use client' to specific interactive components instead of marking large parts of your UI as Client Components. For example, keep static elements (logo, links) as Server Components and only mark interactive parts (search bar) as Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ge1PN" prefix="r5358" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8451377471722220213"],"question":[0,"Can you import a Server Component into a Client Component module?"],"answer":[0,"No. You cannot import a Server Component into a Client Component module since it would require a new request back to the server. This pattern is not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-import-a-server-component-into-a-client-component-module"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-import-a-server-component-into-a-client-component-module" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-import-a-server-component-into-a-client-component-module" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you import a Server Component into a Client Component module?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot import a Server Component into a Client Component module since it would require a new request back to the server. This pattern is not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z22HWsR" prefix="r5359" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8701770801126821195"],"question":[0,"What package can you use to prevent server-only code from being imported into Client Components?"],"answer":[0,"You can use the 'server-only' package. Import it at the top of files containing server-only code, and it will give developers a build-time error if they accidentally import that module into a Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-can-you-use-to-prevent-server-only-code-from-being-imported-into-cl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-can-you-use-to-prevent-server-only-code-from-being-imported-into-cl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-can-you-use-to-prevent-server-only-code-from-being-imported-into-cl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package can you use to prevent server-only code from being imported into Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use the 'server-only' package. Import it at the top of files containing server-only code, and it will give developers a build-time error if they accidentally import that module into a Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14ehId" prefix="r5360" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9041080132613089945"],"question":[0,"Which environment variables are included in the client JavaScript bundle?"],"answer":[0,"Only environment variables prefixed with NEXT_PUBLIC_ are included in the client bundle. Non-NEXT_PUBLIC_ environment variables are only available in the Node.js environment and aren't accessible to the browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/environment-variables"]]],"topic":[0,"nextjs"],"slug":[0,"which-environment-variables-are-included-in-the-client-javascript-bundle"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-environment-variables-are-included-in-the-client-javascript-bundle" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-environment-variables-are-included-in-the-client-javascript-bundle" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which environment variables are included in the client JavaScript bundle?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only environment variables prefixed with NEXT_PUBLIC_ are included in the client bundle. Non-NEXT_PUBLIC_ environment variables are only available in the Node.js environment and aren't accessible to the browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/environment-variables" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1qtNxe" prefix="r5361" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9248198420455016350"],"question":[0,"In the interleaving pattern, when are Server Components rendered relative to Client Components?"],"answer":[0,"The child Server Component can be rendered on the server, well before the Client Component is rendered on the client. Server Components are rendered ahead of time, and the Client Components are rendered after."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"in-the-interleaving-pattern-when-are-server-components-rendered-relative-to-clie"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-the-interleaving-pattern-when-are-server-components-rendered-relative-to-clie" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-the-interleaving-pattern-when-are-server-components-rendered-relative-to-clie" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In the interleaving pattern, when are Server Components rendered relative to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The child Server Component can be rendered on the server, well before the Client Component is rendered on the client. Server Components are rendered ahead of time, and the Client Components are rendered after.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SezgW" prefix="r5362" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9520985101773719951"],"question":[0,"Can Client Components be async functions in Next.js?"],"answer":[0,"No. React Client Components do not support async functions. If you need async data fetching, convert to a Server Component or use React hooks (like useEffect) for client-side data fetching."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/no-async-client-component"]]],"topic":[0,"nextjs"],"slug":[0,"can-client-components-be-async-functions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-client-components-be-async-functions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-client-components-be-async-functions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Client Components be async functions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. React Client Components do not support async functions. If you need async data fetching, convert to a Server Component or use React hooks (like useEffect) for client-side data fetching.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/no-async-client-component" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zvxl8c" prefix="r5363" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9893859433804617543"],"question":[0,"What serialization requirement exists for props passed to Client Components?"],"answer":[0,"Props passed to Client Components need to be serializable by React. Functions and complex objects cannot be passed directly - only data that React can serialize when sending from server to client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-serialization-requirement-exists-for-props-passed-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-serialization-requirement-exists-for-props-passed-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-serialization-requirement-exists-for-props-passed-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What serialization requirement exists for props passed to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Props passed to Client Components need to be serializable by React. Functions and complex objects cannot be passed directly - only data that React can serialize when sending from server to client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1tgzUg" prefix="r5364" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10492503969170783911"],"question":[0,"How are Client Components rendered during subsequent navigations after the initial load?"],"answer":[0,"During subsequent navigations, Client Components render entirely on the client without server HTML. The RSC Payload is prefetched and cached for use during navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-client-components-rendered-during-subsequent-navigations-after-the-initi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-client-components-rendered-during-subsequent-navigations-after-the-initi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-client-components-rendered-during-subsequent-navigations-after-the-initi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are Client Components rendered during subsequent navigations after the initial load?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During subsequent navigations, Client Components render entirely on the client without server HTML. The RSC Payload is prefetched and cached for use during navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zn9uV" prefix="r5365" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10616002511694548057"],"question":[0,"What should library authors do if their components rely on client-only features?"],"answer":[0,"Library authors should add the 'use client' directive to entry points that rely on client-only features. This lets users import components into Server Components without needing to create wrappers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-library-authors-do-if-their-components-rely-on-client-only-features"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-library-authors-do-if-their-components-rely-on-client-only-features" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-library-authors-do-if-their-components-rely-on-client-only-features" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should library authors do if their components rely on client-only features?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Library authors should add the 'use client' directive to entry points that rely on client-only features. This lets users import components into Server Components without needing to create wrappers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="oMgpD" prefix="r5366" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13420881364138670131"],"question":[0,"Can you define multiple 'use client' entry points in your React Component tree?"],"answer":[0,"Yes. You can define multiple 'use client' entry points in your React Component tree. This allows you to split your application into multiple client bundles (or branches)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-define-multiple-use-client-entry-points-in-your-react-component-tree"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-define-multiple-use-client-entry-points-in-your-react-component-tree" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-define-multiple-use-client-entry-points-in-your-react-component-tree" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you define multiple 'use client' entry points in your React Component tree?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can define multiple 'use client' entry points in your React Component tree. This allows you to split your application into multiple client bundles (or branches).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vmd33" prefix="r5367" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14303498124602012136"],"question":[0,"What is the common pattern name for passing Server Components to Client Components?"],"answer":[0,"A common pattern is to use the React children prop to create a 'slot' in your Client Component. This allows you to pass Server Components as children from a parent Server Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-common-pattern-name-for-passing-server-components-to-client-componen"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-common-pattern-name-for-passing-server-components-to-client-componen" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-common-pattern-name-for-passing-server-components-to-client-componen" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the common pattern name for passing Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A common pattern is to use the React children prop to create a 'slot' in your Client Component. This allows you to pass Server Components as children from a parent Server Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RawuB" prefix="r5368" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14504390589336949957"],"question":[0,"Can Server Components import Client Components?"],"answer":[0,"Yes. Server Components can import Client Components. This is the standard and recommended pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-components-import-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-components-import-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-components-import-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Components import Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Components can import Client Components. This is the standard and recommended pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6r1Ka" prefix="r5369" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14733442748277743906"],"question":[0,"During initial page load, what three steps occur in the rendering flow?"],"answer":[0,"1) HTML provides a non-interactive preview, 2) The RSC Payload reconciles the Client and Server Component trees, and 3) JavaScript hydrates Client Components to add interactivity."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"during-initial-page-load-what-three-steps-occur-in-the-rendering-flow"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="during-initial-page-load-what-three-steps-occur-in-the-rendering-flow" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#during-initial-page-load-what-three-steps-occur-in-the-rendering-flow" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">During initial page load, what three steps occur in the rendering flow?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>HTML provides a non-interactive preview, 2) The RSC Payload reconciles the Client and Server Component trees, and 3) JavaScript hydrates Client Components to add interactivity.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="d48lT" prefix="r5370" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14734994883630584548"],"question":[0,"Can you pass functions as props to Client Components?"],"answer":[0,"No. Functions are not serializable, so you cannot pass functions as props directly to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-functions-as-props-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-functions-as-props-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-functions-as-props-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass functions as props to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Functions are not serializable, so you cannot pass functions as props directly to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="deploying-platform-adapters" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Deploying > Platform Adapters</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 21 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1TNhn" prefix="r5371" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"125043106261951575"],"question":[0,"Can distDir point to a directory outside the Next.js project?"],"answer":[0,"No, distDir should not leave your project directory. Paths like '../../build' that would place the build folder outside your project are not allowed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"can-distdir-point-to-a-directory-outside-the-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-distdir-point-to-a-directory-outside-the-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-distdir-point-to-a-directory-outside-the-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can distDir point to a directory outside the Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, distDir should not leave your project directory. Paths like '../../build' that would place the build folder outside your project are not allowed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NJvch" prefix="r5372" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"157448032698595161"],"question":[0,"What are the three arrays contained in the rewrites object passed to adapters?"],"answer":[0,"The rewrites object contains three arrays: beforeFiles (checked before all files), afterFiles (checked after pages/public files but before dynamic routes), and fallback (checked after both pages/public files and dynamic routes)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-arrays-contained-in-the-rewrites-object-passed-to-adapters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-arrays-contained-in-the-rewrites-object-passed-to-adapters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-arrays-contained-in-the-rewrites-object-passed-to-adapters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three arrays contained in the rewrites object passed to adapters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The rewrites object contains three arrays: beforeFiles (checked before all files), afterFiles (checked after pages/public files but before dynamic routes), and fallback (checked after both pages/public files and dynamic routes).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmBwE0" prefix="r5373" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"177542642852121237"],"question":[0,"How many official platform adapters are listed in the Next.js documentation?"],"answer":[0,"Seven platform adapters are listed: Appwrite Sites, AWS Amplify Hosting, Cloudflare, Deno Deploy, Firebase App Hosting, Netlify, and Vercel."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/deploying"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-official-platform-adapters-are-listed-in-the-next-js-documentation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-official-platform-adapters-are-listed-in-the-next-js-documentation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-official-platform-adapters-are-listed-in-the-next-js-documentation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many official platform adapters are listed in the Next.js documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Seven platform adapters are listed: Appwrite Sites, AWS Amplify Hosting, Cloudflare, Deno Deploy, Firebase App Hosting, Netlify, and Vercel.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/deploying" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1acGnb" prefix="r5374" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"670058258630289289"],"question":[0,"What are the two required and optional methods in the NextAdapter interface?"],"answer":[0,"The NextAdapter interface requires a `name` property (string) and has two optional methods: `modifyConfig` (called before build to modify configuration) and `onBuildComplete` (called after build completion with route and output information)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-required-and-optional-methods-in-the-nextadapter-interface"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-required-and-optional-methods-in-the-nextadapter-interface" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-required-and-optional-methods-in-the-nextadapter-interface" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two required and optional methods in the NextAdapter interface?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The NextAdapter interface requires a <code>name</code> property (string) and has two optional methods: <code>modifyConfig</code> (called before build to modify configuration) and <code>onBuildComplete</code> (called after build completion with route and output information).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rnpyp" prefix="r5375" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"684584342344045711"],"question":[0,"What parameters does the modifyConfig method receive?"],"answer":[0,"The modifyConfig method receives the complete config object (NextConfigComplete) and a context object containing a `phase` property."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-parameters-does-the-modifyconfig-method-receive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-parameters-does-the-modifyconfig-method-receive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-parameters-does-the-modifyconfig-method-receive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What parameters does the modifyConfig method receive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The modifyConfig method receives the complete config object (NextConfigComplete) and a context object containing a <code>phase</code> property.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zr3w43" prefix="r5376" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1182721736474641559"],"question":[0,"What phase is next.config.js loaded with when running 'next dev' locally?"],"answer":[0,"When running 'next dev' locally, next.config.js is loaded in PHASE_DEVELOPMENT_SERVER mode."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-phase-is-next-config-js-loaded-with-when-running-next-dev-locally"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-phase-is-next-config-js-loaded-with-when-running-next-dev-locally" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-phase-is-next-config-js-loaded-with-when-running-next-dev-locally" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What phase is next.config.js loaded with when running 'next dev' locally?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When running 'next dev' locally, next.config.js is loaded in PHASE_DEVELOPMENT_SERVER mode.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2tQlyx" prefix="r5377" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1904779057421586892"],"question":[0,"What properties does each output object in the adapter outputs contain?"],"answer":[0,"Each output object contains: id (string), runtime ('nodejs' or 'edge'), pathname (string), config (with maxDuration, expiration, revalidate), assets (Record mapping files to absolute paths), filePath (string), type (RouteType enum), and optional fallbackID and allowQuery properties."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-each-output-object-in-the-adapter-outputs-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-each-output-object-in-the-adapter-outputs-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-each-output-object-in-the-adapter-outputs-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does each output object in the adapter outputs contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each output object contains: id (string), runtime ('nodejs' or 'edge'), pathname (string), config (with maxDuration, expiration, revalidate), assets (Record mapping files to absolute paths), filePath (string), type (RouteType enum), and optional fallbackID and allowQuery properties.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HIOok" prefix="r5378" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2560716039361186261"],"question":[0,"How do you import phase constants in next.config.js?"],"answer":[0,"Phase constants are imported from 'next/constants': `const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-import-phase-constants-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-import-phase-constants-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-import-phase-constants-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you import phase constants in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Phase constants are imported from 'next/constants': <code>const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="840Nc" prefix="r5379" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2711354826376425357"],"question":[0,"How do you configure an adapter in next.config.js?"],"answer":[0,"You configure an adapter using the experimental.adapterPath option with require.resolve(): `experimental: { adapterPath: require.resolve('./my-adapter.js') }`"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-configure-an-adapter-in-next-config-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-configure-an-adapter-in-next-config-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-configure-an-adapter-in-next-config-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you configure an adapter in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You configure an adapter using the experimental.adapterPath option with require.resolve(): <code>experimental: { adapterPath: require.resolve('./my-adapter.js') }</code></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1syQJK" prefix="r5380" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3955578557841746949"],"question":[0,"What are the four route manifest types provided to adapters in the routes object?"],"answer":[0,"The four route manifest types are: headers (Array<ManifestHeaderRoute>), redirects (Array<ManifestRedirectRoute>), rewrites (object with beforeFiles/afterFiles/fallback arrays), and dynamicRoutes (ReadonlyArray<ManifestRoute>)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-route-manifest-types-provided-to-adapters-in-the-routes-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-route-manifest-types-provided-to-adapters-in-the-routes-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-route-manifest-types-provided-to-adapters-in-the-routes-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four route manifest types provided to adapters in the routes object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The four route manifest types are: headers (Array<ManifestHeaderRoute>), redirects (Array<ManifestRedirectRoute>), rewrites (object with beforeFiles/afterFiles/fallback arrays), and dynamicRoutes (ReadonlyArray<ManifestRoute>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="x8WsO" prefix="r5381" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5055716097644869358"],"question":[0,"What environment variable can platforms use to set a default adapter?"],"answer":[0,"Platforms can set a default adapter using the NEXT_ADAPTER_PATH environment variable."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/77740"]]],"topic":[0,"nextjs"],"slug":[0,"what-environment-variable-can-platforms-use-to-set-a-default-adapter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-environment-variable-can-platforms-use-to-set-a-default-adapter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-environment-variable-can-platforms-use-to-set-a-default-adapter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What environment variable can platforms use to set a default adapter?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Platforms can set a default adapter using the NEXT_ADAPTER_PATH environment variable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/77740" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZYWp3R" prefix="r5382" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7022441125354290258"],"question":[0,"Which takes precedence: the NEXT_ADAPTER_PATH environment variable or the adapterPath in next.config?"],"answer":[0,"Any adapter explicitly configured by the user in next.config will take precedence over the one provided via the NEXT_ADAPTER_PATH environment variable."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/77740"]]],"topic":[0,"nextjs"],"slug":[0,"which-takes-precedence-the-next-adapter-path-environment-variable-or-the-adapter"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-takes-precedence-the-next-adapter-path-environment-variable-or-the-adapter" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-takes-precedence-the-next-adapter-path-environment-variable-or-the-adapter" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which takes precedence: the NEXT_ADAPTER_PATH environment variable or the adapterPath in next.config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Any adapter explicitly configured by the user in next.config will take precedence over the one provided via the NEXT_ADAPTER_PATH environment variable.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/77740" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZEo94E" prefix="r5383" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7241725214911882814"],"question":[0,"What are the common use cases listed for Build Adapters?"],"answer":[0,"Common use cases include: deployment platform integration, asset processing, monitoring integration, custom bundling, build validation, and route generation to generate platform-specific routing configs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-common-use-cases-listed-for-build-adapters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-common-use-cases-listed-for-build-adapters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-common-use-cases-listed-for-build-adapters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the common use cases listed for Build Adapters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Common use cases include: deployment platform integration, asset processing, monitoring integration, custom bundling, build validation, and route generation to generate platform-specific routing configs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3AvXG" prefix="r5384" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7750838233707115012"],"question":[0,"When are configured adapters utilized in Next.js?"],"answer":[0,"Configured adapters are only utilized during builds to prevent conflicts in the development environment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-configured-adapters-utilized-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-configured-adapters-utilized-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-configured-adapters-utilized-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are configured adapters utilized in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Configured adapters are only utilized during builds to prevent conflicts in the development environment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="20Svr1" prefix="r5385" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8971312368485808242"],"question":[0,"What return types does the modifyConfig method support?"],"answer":[0,"The modifyConfig method can return either `Promise<NextConfigComplete>` or `NextConfigComplete`, supporting both synchronous and asynchronous implementations."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-return-types-does-the-modifyconfig-method-support"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-return-types-does-the-modifyconfig-method-support" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-return-types-does-the-modifyconfig-method-support" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What return types does the modifyConfig method support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The modifyConfig method can return either <code>Promise<NextConfigComplete></code> or <code>NextConfigComplete</code>, supporting both synchronous and asynchronous implementations.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2d4X21" prefix="r5386" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10055026353766746079"],"question":[0,"What properties does the onBuildComplete context object contain?"],"answer":[0,"The context object contains: routes (headers, redirects, rewrites, dynamicRoutes), outputs (AdapterOutputs), projectDir (string), repoRoot (string), distDir (string), config (NextConfigComplete), and nextVersion (string)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-properties-does-the-onbuildcomplete-context-object-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-properties-does-the-onbuildcomplete-context-object-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-properties-does-the-onbuildcomplete-context-object-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What properties does the onBuildComplete context object contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The context object contains: routes (headers, redirects, rewrites, dynamicRoutes), outputs (AdapterOutputs), projectDir (string), repoRoot (string), distDir (string), config (NextConfigComplete), and nextVersion (string).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqTCKH" prefix="r5387" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10679016242784737878"],"question":[0,"Is the name property required or optional in the NextAdapter interface?"],"answer":[0,"The name property is required in the NextAdapter interface."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-name-property-required-or-optional-in-the-nextadapter-interface"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-name-property-required-or-optional-in-the-nextadapter-interface" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-name-property-required-or-optional-in-the-nextadapter-interface" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the name property required or optional in the NextAdapter interface?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The name property is required in the NextAdapter interface.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1P1SS6" prefix="r5388" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11868042068749436577"],"question":[0,"In which Next.js version was the Build Adapters API first introduced as alpha?"],"answer":[0,"The Build Adapters API was first introduced as alpha in Next.js 16."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-16"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-build-adapters-api-first-introduced-as-alpha"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-build-adapters-api-first-introduced-as-alpha" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-build-adapters-api-first-introduced-as-alpha" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the Build Adapters API first introduced as alpha?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Build Adapters API was first introduced as alpha in Next.js 16.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zr9rQG" prefix="r5389" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11976646771982816686"],"question":[0,"What is the pathname value for middleware output type in adapters?"],"answer":[0,"The middleware output type always has pathname set to '/_middleware'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-pathname-value-for-middleware-output-type-in-adapters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-pathname-value-for-middleware-output-type-in-adapters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-pathname-value-for-middleware-output-type-in-adapters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the pathname value for middleware output type in adapters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware output type always has pathname set to '/_middleware'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/adapterPath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsJJ8K" prefix="r5390" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12622715851557984279"],"question":[0,"What are the five possible phase values in Next.js?"],"answer":[0,"The five phase constants are: 'phase-export', 'phase-production-build', 'phase-production-server', 'phase-development-server', and 'phase-test'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/config/next-config-js"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-five-possible-phase-values-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-five-possible-phase-values-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-five-possible-phase-values-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the five possible phase values in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The five phase constants are: 'phase-export', 'phase-production-build', 'phase-production-server', 'phase-development-server', and 'phase-test'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/config/next-config-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="rWiTE" prefix="r5391" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14660560473310728865"],"question":[0,"What is the default value of distDir in Next.js?"],"answer":[0,"The default build directory is '.next'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-distdir-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-distdir-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-distdir-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of distDir in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default build directory is '.next'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/distDir" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-and-client-components-client-component-boundaries" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server and Client Components > Client Component Boundaries</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 21 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1wpgCp" prefix="r5392" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"223466690823867170"],"question":[0,"What happens to child components and modules imported into a file marked with 'use client'?"],"answer":[0,"All child components and modules imported into a file with 'use client' are considered part of the client bundle, regardless of whether they contain interactive logic."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-child-components-and-modules-imported-into-a-file-marked-with-us"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-child-components-and-modules-imported-into-a-file-marked-with-us" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-child-components-and-modules-imported-into-a-file-marked-with-us" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to child components and modules imported into a file marked with 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>All child components and modules imported into a file with 'use client' are considered part of the client bundle, regardless of whether they contain interactive logic.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZzRXIU" prefix="r5393" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"677062655143416021"],"question":[0,"What was the bundle size reduction achieved when applying the Next.js 14.2 tree-shaking optimization to react-aria-components?"],"answer":[0,"Testing the optimization on react-aria-components reduced the final bundle size by 51.3%."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-was-the-bundle-size-reduction-achieved-when-applying-the-next-js-14-2-tree-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-was-the-bundle-size-reduction-achieved-when-applying-the-next-js-14-2-tree-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-was-the-bundle-size-reduction-achieved-when-applying-the-next-js-14-2-tree-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What was the bundle size reduction achieved when applying the Next.js 14.2 tree-shaking optimization to react-aria-components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Testing the optimization on react-aria-components reduced the final bundle size by 51.3%.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZTpzKw" prefix="r5394" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"969815743965516697"],"question":[0,"What is the recommended pattern for including Server Components within Client Components?"],"answer":[0,"Pass Server Components as props (commonly using the children prop) to Client Components. In a parent Server Component, you import both components and pass the Server Component as a child of the Client Component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-pattern-for-including-server-components-within-client-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-pattern-for-including-server-components-within-client-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-pattern-for-including-server-components-within-client-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended pattern for including Server Components within Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Pass Server Components as props (commonly using the children prop) to Client Components. In a parent Server Component, you import both components and pass the Server Component as a child of the Client Component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZDQWY3" prefix="r5395" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1577454738640854853"],"question":[0,"Where should you render context providers in the component tree for optimal performance?"],"answer":[0,"You should render providers as deep as possible in the tree rather than wrapping the entire document, which makes it easier for Next.js to optimize the static parts of your Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-you-render-context-providers-in-the-component-tree-for-optimal-perf"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-you-render-context-providers-in-the-component-tree-for-optimal-perf" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-you-render-context-providers-in-the-component-tree-for-optimal-perf" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should you render context providers in the component tree for optimal performance?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should render providers as deep as possible in the tree rather than wrapping the entire document, which makes it easier for Next.js to optimize the static parts of your Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13J7d9" prefix="r5396" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1653264603898019736"],"question":[0,"What types of props can be passed from Server Components to Client Components?"],"answer":[0,"Props passed from Server Components to Client Components must be serializable by React. This supports a superset of JSON but excludes functions and custom class instances."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-props-can-be-passed-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-props-can-be-passed-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-props-can-be-passed-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of props can be passed from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Props passed from Server Components to Client Components must be serializable by React. This supports a superset of JSON but excludes functions and custom class instances.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="29honj" prefix="r5397" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2229045284413904819"],"question":[0,"What tree-shaking optimization was introduced in Next.js 14.2 for Client Component boundaries?"],"answer":[0,"Next.js 14.2 introduced an optimization that allows for tree-shaking unused exports at the boundary between Server and Client Components. Importing a single component from a file that has 'use client' no longer includes all the other exports from that file in the bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-tree-shaking-optimization-was-introduced-in-next-js-14-2-for-client-compone"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-tree-shaking-optimization-was-introduced-in-next-js-14-2-for-client-compone" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-tree-shaking-optimization-was-introduced-in-next-js-14-2-for-client-compone" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What tree-shaking optimization was introduced in Next.js 14.2 for Client Component boundaries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 14.2 introduced an optimization that allows for tree-shaking unused exports at the boundary between Server and Client Components. Importing a single component from a file that has 'use client' no longer includes all the other exports from that file in the bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Dnks4" prefix="r5398" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2288985963613652130"],"question":[0,"What defines the boundary between Server and Client module graphs?"],"answer":[0,"The 'use client' directive at the top of a file defines the boundary between Server and Client module graphs. Components exported from files with this directive serve as entry points to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-defines-the-boundary-between-server-and-client-module-graphs"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-defines-the-boundary-between-server-and-client-module-graphs" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-defines-the-boundary-between-server-and-client-module-graphs" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What defines the boundary between Server and Client module graphs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use client' directive at the top of a file defines the boundary between Server and Client module graphs. Components exported from files with this directive serve as entry points to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1zQcFk" prefix="r5399" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2711944260754187221"],"question":[0,"Can you use React Context in Server Components?"],"answer":[0,"No. Context cannot be created or consumed directly within Server Components. Context providers must be marked as Client Components by adding 'use client' at the top of the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-react-context-in-server-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-react-context-in-server-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-react-context-in-server-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use React Context in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Context cannot be created or consumed directly within Server Components. Context providers must be marked as Client Components by adding 'use client' at the top of the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ogqmS" prefix="r5400" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2795831439538848654"],"question":[0,"What is the recommended approach to reduce client JavaScript bundle size when using 'use client'?"],"answer":[0,"Add 'use client' to specific interactive components instead of marking large parts of your UI as Client Components. Move Client Components down your component tree to minimize the client bundle size."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-to-reduce-client-javascript-bundle-size-when-us"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-to-reduce-client-javascript-bundle-size-when-us" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-to-reduce-client-javascript-bundle-size-when-us" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach to reduce client JavaScript bundle size when using 'use client'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add 'use client' to specific interactive components instead of marking large parts of your UI as Client Components. Move Client Components down your component tree to minimize the client bundle size.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="g7Akp" prefix="r5401" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3291097634950076003"],"question":[0,"When Server Components are passed as children props to Client Components, when are they rendered?"],"answer":[0,"The child Server Component can be rendered on the server, well before the Client Component is rendered on the client. All Server Components will be rendered on the server ahead of time, including those passed as props."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"when-server-components-are-passed-as-children-props-to-client-components-when-ar"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-server-components-are-passed-as-children-props-to-client-components-when-ar" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-server-components-are-passed-as-children-props-to-client-components-when-ar" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When Server Components are passed as children props to Client Components, when are they rendered?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The child Server Component can be rendered on the server, well before the Client Component is rendered on the client. All Server Components will be rendered on the server ahead of time, including those passed as props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="w9Bpo" prefix="r5402" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3906100317697755319"],"question":[0,"What is the cascading effect of adding 'use client' to a file?"],"answer":[0,"When you add 'use client' to a file, it creates a cascading effect throughout the component tree. Any modules imported into that Client Component automatically become part of the client bundle, regardless of whether they contain interactive logic."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-cascading-effect-of-adding-use-client-to-a-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-cascading-effect-of-adding-use-client-to-a-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-cascading-effect-of-adding-use-client-to-a-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the cascading effect of adding 'use client' to a file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When you add 'use client' to a file, it creates a cascading effect throughout the component tree. Any modules imported into that Client Component automatically become part of the client bundle, regardless of whether they contain interactive logic.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WFMYB" prefix="r5403" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4282626120407061394"],"question":[0,"What package can you use to prevent accidentally importing server-only code into Client Components?"],"answer":[0,"You can use the 'server-only' package to prevent server-only code (like API keys) from being accidentally imported into Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-can-you-use-to-prevent-accidentally-importing-server-only-code-into"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-can-you-use-to-prevent-accidentally-importing-server-only-code-into" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-can-you-use-to-prevent-accidentally-importing-server-only-code-into" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package can you use to prevent accidentally importing server-only code into Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use the 'server-only' package to prevent server-only code (like API keys) from being accidentally imported into Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="277fxc" prefix="r5404" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4506154371707174145"],"question":[0,"If a third-party library provider doesn't include the 'use client' directive, how can you use it in Server Components?"],"answer":[0,"You can wrap the third-party provider in your own Client Component that has the 'use client' directive, then render that wrapper component inside Server Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"if-a-third-party-library-provider-doesn-t-include-the-use-client-directive-how-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="if-a-third-party-library-provider-doesn-t-include-the-use-client-directive-how-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#if-a-third-party-library-provider-doesn-t-include-the-use-client-directive-how-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">If a third-party library provider doesn't include the 'use client' directive, how can you use it in Server Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can wrap the third-party provider in your own Client Component that has the 'use client' directive, then render that wrapper component inside Server Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WKgcx" prefix="r5405" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5454565079294594677"],"question":[0,"Do you need to add 'use client' to every component that needs to run on the client?"],"answer":[0,"No. You only need to add 'use client' to the files whose components you want to render directly within Server Components. Once you define the boundary, all child components and modules imported into it are considered part of the client bundle."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"do-you-need-to-add-use-client-to-every-component-that-needs-to-run-on-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-you-need-to-add-use-client-to-every-component-that-needs-to-run-on-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-you-need-to-add-use-client-to-every-component-that-needs-to-run-on-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do you need to add 'use client' to every component that needs to run on the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You only need to add 'use client' to the files whose components you want to render directly within Server Components. Once you define the boundary, all child components and modules imported into it are considered part of the client bundle.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NERG2" prefix="r5406" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8187948761813444039"],"question":[0,"What does the RSC (React Server Component) payload contain?"],"answer":[0,"The RSC payload is a compact binary representation of the rendered React Server Components tree. It contains the rendered result of Server Components and placeholders (or holes) for where Client Components should be rendered and references to their JavaScript files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-rsc-react-server-component-payload-contain"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-rsc-react-server-component-payload-contain" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-rsc-react-server-component-payload-contain" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the RSC (React Server Component) payload contain?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The RSC payload is a compact binary representation of the rendered React Server Components tree. It contains the rendered result of Server Components and placeholders (or holes) for where Client Components should be rendered and references to their JavaScript files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="23oXwK" prefix="r5407" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8539826517144397985"],"question":[0,"Can you pass functions as props from Server Components to Client Components?"],"answer":[0,"No. Functions are not serializable and cannot be passed as props from Server Components to Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-client"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-pass-functions-as-props-from-server-components-to-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-pass-functions-as-props-from-server-components-to-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-pass-functions-as-props-from-server-components-to-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you pass functions as props from Server Components to Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Functions are not serializable and cannot be passed as props from Server Components to Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-client" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tvkdx" prefix="r5408" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8893603684736219370"],"question":[0,"Can you import a Server Component directly into a Client Component module?"],"answer":[0,"No. You cannot import a Server Component into a Client Component module because it would require a new request back to the server during client-side rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-import-a-server-component-directly-into-a-client-component-module"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-import-a-server-component-directly-into-a-client-component-module" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-import-a-server-component-directly-into-a-client-component-module" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you import a Server Component directly into a Client Component module?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. You cannot import a Server Component into a Client Component module because it would require a new request back to the server during client-side rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/composition-patterns" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1odwlG" prefix="r5409" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10173661074564772530"],"question":[0,"How are Client Components rendered on subsequent navigations after the initial page load?"],"answer":[0,"On subsequent navigations, Client Components are rendered entirely on the client, without the server-rendered HTML."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-client-components-rendered-on-subsequent-navigations-after-the-initial-p"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-client-components-rendered-on-subsequent-navigations-after-the-initial-p" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-client-components-rendered-on-subsequent-navigations-after-the-initial-p" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are Client Components rendered on subsequent navigations after the initial page load?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>On subsequent navigations, Client Components are rendered entirely on the client, without the server-rendered HTML.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1K02XQ" prefix="r5410" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13376557264801210292"],"question":[0,"What happens during the initial page load with the RSC payload?"],"answer":[0,"The HTML is used to immediately show a fast non-interactive initial preview of the route. The React Server Components Payload is used to reconcile the Client and Server Component trees and update the DOM. The JavaScript instructions are used to hydrate Client Components and make their UI interactive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-during-the-initial-page-load-with-the-rsc-payload"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-during-the-initial-page-load-with-the-rsc-payload" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-during-the-initial-page-load-with-the-rsc-payload" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens during the initial page load with the RSC payload?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The HTML is used to immediately show a fast non-interactive initial preview of the route. The React Server Components Payload is used to reconcile the Client and Server Component trees and update the DOM. The JavaScript instructions are used to hydrate Client Components and make their UI interactive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1med92" prefix="r5411" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13900892230634995013"],"question":[0,"What responsibility does a Client Component have when receiving Server Components as children props?"],"answer":[0,"The Client Component doesn't know that children will eventually be filled in by the result of a Server Component. Its only responsibility is to decide where children will eventually be placed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/server-and-client-components"]]],"topic":[0,"nextjs"],"slug":[0,"what-responsibility-does-a-client-component-have-when-receiving-server-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-responsibility-does-a-client-component-have-when-receiving-server-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-responsibility-does-a-client-component-have-when-receiving-server-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What responsibility does a Client Component have when receiving Server Components as children props?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Client Component doesn't know that children will eventually be filled in by the result of a Server Component. Its only responsibility is to decide where children will eventually be placed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/server-and-client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1THJ8z" prefix="r5412" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15046994710904144611"],"question":[0,"Where must the 'use client' directive be placed in a file?"],"answer":[0,"The 'use client' directive must be placed at the top of the file, above your imports."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/rendering/client-components"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-use-client-directive-be-placed-in-a-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-use-client-directive-be-placed-in-a-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-use-client-directive-be-placed-in-a-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the 'use client' directive be placed in a file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The 'use client' directive must be placed at the top of the file, above your imports.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/rendering/client-components" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="error-handling-client-side-error-handling" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Error Handling > Client-Side Error Handling</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 21 questions </span> </div> <div class="space-y-4"> <astro-island uid="2vuPRR" prefix="r5413" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"799221635678189677"],"question":[0,"What is the recommended alternative to metadata exports in global-error.js?"],"answer":[0,"You can use the React <title> component directly in your JSX."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-alternative-to-metadata-exports-in-global-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-alternative-to-metadata-exports-in-global-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-alternative-to-metadata-exports-in-global-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended alternative to metadata exports in global-error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can use the React <title> component directly in your JSX.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1NJF54" prefix="r5414" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1069504302838448363"],"question":[0,"When are error boundaries designed to catch errors?"],"answer":[0,"Error boundaries are designed to catch errors during rendering to show a fallback UI instead of crashing the whole app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"when-are-error-boundaries-designed-to-catch-errors"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-are-error-boundaries-designed-to-catch-errors" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-are-error-boundaries-designed-to-catch-errors" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When are error boundaries designed to catch errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error boundaries are designed to catch errors during rendering to show a fallback UI instead of crashing the whole app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13uXhF" prefix="r5415" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1084532911533798465"],"question":[0,"What file extensions are supported for Next.js error boundary files?"],"answer":[0,"Next.js supports .js, .jsx, or .tsx file extensions for error files (error.js, error.jsx, or error.tsx)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-are-supported-for-next-js-error-boundary-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-are-supported-for-next-js-error-boundary-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-are-supported-for-next-js-error-boundary-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions are supported for Next.js error boundary files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports .js, .jsx, or .tsx file extensions for error files (error.js, error.jsx, or error.tsx).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zh0VW2" prefix="r5416" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2496654209469862146"],"question":[0,"What types of components can error.js catch errors from?"],"answer":[0,"Error files are useful for catching unexpected errors that occur in Server Components and Client Components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-types-of-components-can-error-js-catch-errors-from"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-types-of-components-can-error-js-catch-errors-from" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-types-of-components-can-error-js-catch-errors-from" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What types of components can error.js catch errors from?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error files are useful for catching unexpected errors that occur in Server Components and Client Components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16W4Qd" prefix="r5417" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2833149494586786222"],"question":[0,"Can an error.js file catch errors thrown in layout.js in the same segment?"],"answer":[0,"No, an error.js boundary will not handle errors thrown in a layout.js component in the same segment because the error boundary is nested inside that layout's component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"can-an-error-js-file-catch-errors-thrown-in-layout-js-in-the-same-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-an-error-js-file-catch-errors-thrown-in-layout-js-in-the-same-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-an-error-js-file-catch-errors-thrown-in-layout-js-in-the-same-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can an error.js file catch errors thrown in layout.js in the same segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, an error.js boundary will not handle errors thrown in a layout.js component in the same segment because the error boundary is nested inside that layout's component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KNWz" prefix="r5418" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2850127791393325294"],"question":[0,"How often is global-error.js likely to be triggered?"],"answer":[0,"It is unlikely to be triggered often as root components are typically less dynamic, and other error.js boundaries will catch most errors."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-often-is-global-error-js-likely-to-be-triggered"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-often-is-global-error-js-likely-to-be-triggered" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-often-is-global-error-js-likely-to-be-triggered" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How often is global-error.js likely to be triggered?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is unlikely to be triggered often as root components are typically less dynamic, and other error.js boundaries will catch most errors.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1U5RML" prefix="r5419" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3362807591174079532"],"question":[0,"What directive must be included in a Next.js error.js file?"],"answer":[0,"Error boundaries must be Client Components, so the 'use client' directive is mandatory at the top of error.js files."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-must-be-included-in-a-next-js-error-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-must-be-included-in-a-next-js-error-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-must-be-included-in-a-next-js-error-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive must be included in a Next.js error.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error boundaries must be Client Components, so the 'use client' directive is mandatory at the top of error.js files.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Rgz9O" prefix="r5420" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4275829917138165697"],"question":[0,"What HTML tags must global-error.js include?"],"answer":[0,"Global error UI must define its own <html> and <body> tags since it replaces the root layout when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-tags-must-global-error-js-include"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-tags-must-global-error-js-include" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-tags-must-global-error-js-include" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML tags must global-error.js include?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Global error UI must define its own <html> and <body> tags since it replaces the root layout when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2r5WkE" prefix="r5421" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5454979683525876139"],"question":[0,"What information is included in error messages in Next.js development mode?"],"answer":[0,"During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-information-is-included-in-error-messages-in-next-js-development-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-information-is-included-in-error-messages-in-next-js-development-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-information-is-included-in-error-messages-in-next-js-development-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What information is included in error messages in Next.js development mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During development, the Error object forwarded to the client will be serialized and include the message of the original error for easier debugging.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2vDWGQ" prefix="r5422" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5482356032218703571"],"question":[0,"How do you handle errors in a layout.js component?"],"answer":[0,"Place an error.js file in the layout's parent segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-handle-errors-in-a-layout-js-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-handle-errors-in-a-layout-js-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-handle-errors-in-a-layout-js-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you handle errors in a layout.js component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place an error.js file in the layout's parent segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="4KBF9" prefix="r5423" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5698526958150556985"],"question":[0,"What does error.js wrap in the Next.js routing structure?"],"answer":[0,"error.js wraps a route segment and its nested children in a React Error Boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-error-js-wrap-in-the-next-js-routing-structure"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-error-js-wrap-in-the-next-js-routing-structure" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-error-js-wrap-in-the-next-js-routing-structure" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does error.js wrap in the Next.js routing structure?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>error.js wraps a route segment and its nested children in a React Error Boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1blIwz" prefix="r5424" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6673085899061715936"],"question":[0,"How should you handle errors in event handlers in Next.js?"],"answer":[0,"Catch the error manually and store it using useState or useReducer, then update the UI to inform the user."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-handle-errors-in-event-handlers-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-handle-errors-in-event-handlers-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-handle-errors-in-event-handlers-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you handle errors in event handlers in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Catch the error manually and store it using useState or useReducer, then update the UI to inform the user.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1apdmu" prefix="r5425" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6710338423035285777"],"question":[0,"What information is included in error messages in Next.js production mode?"],"answer":[0,"During production, the Error object forwarded to the client only includes a generic message and digest property. Specific error details are stripped to avoid leaking sensitive information."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-information-is-included-in-error-messages-in-next-js-production-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-information-is-included-in-error-messages-in-next-js-production-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-information-is-included-in-error-messages-in-next-js-production-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What information is included in error messages in Next.js production mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During production, the Error object forwarded to the client only includes a generic message and digest property. Specific error details are stripped to avoid leaking sensitive information.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1OpkOS" prefix="r5426" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6817210351539498314"],"question":[0,"What are the exact props that a Next.js error component receives?"],"answer":[0,"Error components receive two props: 'error' with type 'Error & { digest?: string }' (the caught error with optional digest identifier), and 'reset' which is a function with type '() => void' that attempts to re-render the segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-props-that-a-next-js-error-component-receives"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-props-that-a-next-js-error-component-receives" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-props-that-a-next-js-error-component-receives" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact props that a Next.js error component receives?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Error components receive two props: 'error' with type 'Error & { digest?: string }' (the caught error with optional digest identifier), and 'reset' which is a function with type '() => void' that attempts to re-render the segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NNcoX" prefix="r5427" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9342462381151345427"],"question":[0,"Do Next.js error boundaries catch errors inside event handlers?"],"answer":[0,"No, error boundaries don't catch errors inside event handlers because they run after rendering, not during rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-error-boundaries-catch-errors-inside-event-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-error-boundaries-catch-errors-inside-event-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-error-boundaries-catch-errors-inside-event-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js error boundaries catch errors inside event handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, error boundaries don't catch errors inside event handlers because they run after rendering, not during rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aGOgY" prefix="r5428" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10725461835118092077"],"question":[0,"Is it recommended to define a root error.js even if global-error.js exists?"],"answer":[0,"Yes, even if a global-error.js is defined, it is still recommended to define a root error.js whose fallback component will be rendered within the root layout, which includes globally shared UI and branding."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"is-it-recommended-to-define-a-root-error-js-even-if-global-error-js-exists"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-it-recommended-to-define-a-root-error-js-even-if-global-error-js-exists" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-it-recommended-to-define-a-root-error-js-even-if-global-error-js-exists" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is it recommended to define a root error.js even if global-error.js exists?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, even if a global-error.js is defined, it is still recommended to define a root error.js whose fallback component will be rendered within the root layout, which includes globally shared UI and branding.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZO3tx5" prefix="r5429" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10996636474477694866"],"question":[0,"Do Next.js error boundaries catch errors in async code?"],"answer":[0,"No, error boundaries don't handle errors in async code because they run after rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-next-js-error-boundaries-catch-errors-in-async-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-next-js-error-boundaries-catch-errors-in-async-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-next-js-error-boundaries-catch-errors-in-async-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Next.js error boundaries catch errors in async code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, error boundaries don't handle errors in async code because they run after rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5mHTF" prefix="r5430" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13697331325889604084"],"question":[0,"What does the reset() function do in a Next.js error component?"],"answer":[0,"When executed, the reset() function will try to re-render the Error boundary's contents. If successful, the fallback error component is replaced with the result of the re-render."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-reset-function-do-in-a-next-js-error-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-reset-function-do-in-a-next-js-error-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-reset-function-do-in-a-next-js-error-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the reset() function do in a Next.js error component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When executed, the reset() function will try to re-render the Error boundary's contents. If successful, the fallback error component is replaced with the result of the re-render.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Tsobm" prefix="r5431" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13928045956417014030"],"question":[0,"What is global-error.js described as in Next.js documentation?"],"answer":[0,"global-error.js is the least granular error UI and can be considered 'catch-all' error handling for the whole application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-global-error-js-described-as-in-next-js-documentation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-global-error-js-described-as-in-next-js-documentation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-global-error-js-described-as-in-next-js-documentation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is global-error.js described as in Next.js documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>global-error.js is the least granular error UI and can be considered 'catch-all' error handling for the whole application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJshV1" prefix="r5432" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14803439698692750643"],"question":[0,"Can you use metadata or generateMetadata exports in global-error.js?"],"answer":[0,"No, error boundaries must be Client Components, which means that metadata and generateMetadata exports are not supported in global-error.jsx."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-metadata-or-generatemetadata-exports-in-global-error-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-metadata-or-generatemetadata-exports-in-global-error-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-metadata-or-generatemetadata-exports-in-global-error-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use metadata or generateMetadata exports in global-error.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, error boundaries must be Client Components, which means that metadata and generateMetadata exports are not supported in global-error.jsx.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2sQY7m" prefix="r5433" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14832291081010106494"],"question":[0,"How can you test error boundaries in Next.js during development?"],"answer":[0,"React DevTools allow you to manually toggle Error boundaries to test error states."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-test-error-boundaries-in-next-js-during-development"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-test-error-boundaries-in-next-js-during-development" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-test-error-boundaries-in-next-js-during-development" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you test error boundaries in Next.js during development?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>React DevTools allow you to manually toggle Error boundaries to test error states.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="loading-ui-and-streaming-streaming-behavior" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Loading UI and Streaming > Streaming Behavior</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 20 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1xpqTw" prefix="r5434" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"527786422574423328"],"question":[0,"What is the default regex pattern for htmlLimitedBots in Next.js?"],"answer":[0,"The default list includes Google crawlers (e.g. Mediapartners-Google, AdsBot-Google, Google-PageRenderer), Bingbot, Twitterbot, and Slackbot. The complete list is maintained in the Next.js repository."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-regex-pattern-for-htmllimitedbots-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-regex-pattern-for-htmllimitedbots-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-regex-pattern-for-htmllimitedbots-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default regex pattern for htmlLimitedBots in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default list includes Google crawlers (e.g. Mediapartners-Google, AdsBot-Google, Google-PageRenderer), Bingbot, Twitterbot, and Slackbot. The complete list is maintained in the Next.js repository.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16005t" prefix="r5435" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1073347052936573724"],"question":[0,"Does loading.js accept any parameters or props?"],"answer":[0,"No. Loading UI components do not accept any parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"does-loading-js-accept-any-parameters-or-props"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-loading-js-accept-any-parameters-or-props" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-loading-js-accept-any-parameters-or-props" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does loading.js accept any parameters or props?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Loading UI components do not accept any parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="285564" prefix="r5436" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2809952323771296587"],"question":[0,"What HTTP status code does redirect() return in contexts other than Server Actions?"],"answer":[0,"In contexts other than Server Actions, redirect() returns a 307 HTTP redirect response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-in-contexts-other-than-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-in-contexts-other-than-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-in-contexts-other-than-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return in contexts other than Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In contexts other than Server Actions, redirect() returns a 307 HTTP redirect response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZE2lXE" prefix="r5437" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3438364888177950749"],"question":[0,"Can errors be communicated to the client during streaming after headers are sent?"],"answer":[0,"Yes. The server can still communicate errors or issues to the client within the streamed content itself, for example when using redirect or notFound, even though the response status code cannot be updated after streaming started."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"can-errors-be-communicated-to-the-client-during-streaming-after-headers-are-sent"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-errors-be-communicated-to-the-client-during-streaming-after-headers-are-sent" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-errors-be-communicated-to-the-client-during-streaming-after-headers-are-sent" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can errors be communicated to the client during streaming after headers are sent?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The server can still communicate errors or issues to the client within the streamed content itself, for example when using redirect or notFound, even though the response status code cannot be updated after streaming started.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSGyLO" prefix="r5438" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3580683113371503915"],"question":[0,"When does response body streaming begin in Next.js?"],"answer":[0,"Response body streaming begins when a Suspense fallback renders or when a Server Component suspends under a Suspense boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-response-body-streaming-begin-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-response-body-streaming-begin-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-response-body-streaming-begin-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does response body streaming begin in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Response body streaming begins when a Suspense fallback renders or when a Server Component suspends under a Suspense boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dWrH9" prefix="r5439" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4385893312225959031"],"question":[0,"In what version of Next.js was the htmlLimitedBots configuration introduced?"],"answer":[0,"The htmlLimitedBots configuration was introduced in Next.js version 15.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-version-of-next-js-was-the-htmllimitedbots-configuration-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-version-of-next-js-was-the-htmllimitedbots-configuration-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-version-of-next-js-was-the-htmllimitedbots-configuration-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what version of Next.js was the htmlLimitedBots configuration introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The htmlLimitedBots configuration was introduced in Next.js version 15.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NDVCO" prefix="r5440" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5214081956098653067"],"question":[0,"How long are loading.js files cached by default in the Client Router Cache?"],"answer":[0,"loading.js files remain cached for 5 minutes by default, or the value of the staleTimes.static configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15"]]],"topic":[0,"nextjs"],"slug":[0,"how-long-are-loading-js-files-cached-by-default-in-the-client-router-cache"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-long-are-loading-js-files-cached-by-default-in-the-client-router-cache" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-long-are-loading-js-files-cached-by-default-in-the-client-router-cache" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How long are loading.js files cached by default in the Client Router Cache?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js files remain cached for 5 minutes by default, or the value of the staleTimes.static configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2e74Kn" prefix="r5441" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7451898352099995131"],"question":[0,"Are both Node.js and Edge runtimes supported for streaming in Next.js?"],"answer":[0,"Yes. The App Router supports streaming with Suspense for both Node.js and Edge runtimes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"are-both-node-js-and-edge-runtimes-supported-for-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-both-node-js-and-edge-runtimes-supported-for-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-both-node-js-and-edge-runtimes-supported-for-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are both Node.js and Edge runtimes supported for streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. The App Router supports streaming with Suspense for both Node.js and Edge runtimes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1SwguU" prefix="r5442" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8965448943503880573"],"question":[0,"How does Next.js handle metadata for bots that cannot execute JavaScript during streaming?"],"answer":[0,"For bots that only scrape static HTML and cannot execute JavaScript (like Twitterbot), Next.js resolves generateMetadata before streaming UI, and metadata is placed in the head of the initial HTML. Next.js automatically detects user agents to choose between blocking and streaming behavior."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-metadata-for-bots-that-cannot-execute-javascript-during-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-metadata-for-bots-that-cannot-execute-javascript-during-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-metadata-for-bots-that-cannot-execute-javascript-during-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle metadata for bots that cannot execute JavaScript during streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For bots that only scrape static HTML and cannot execute JavaScript (like Twitterbot), Next.js resolves generateMetadata before streaming UI, and metadata is placed in the head of the initial HTML. Next.js automatically detects user agents to choose between blocking and streaming behavior.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mhwDj" prefix="r5443" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9926227189168874297"],"question":[0,"Is navigation interruptible when using streaming in Next.js?"],"answer":[0,"Yes. Navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load before navigating to another route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"is-navigation-interruptible-when-using-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-navigation-interruptible-when-using-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-navigation-interruptible-when-using-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is navigation interruptible when using streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load before navigating to another route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aOpgA" prefix="r5444" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10175725858608116848"],"question":[0,"When was streaming metadata (allowing UI to be sent before generateMetadata completes) introduced in Next.js?"],"answer":[0,"Streaming metadata was introduced in Next.js 15.2, allowing the initial UI to be sent to the browser even before generateMetadata has completed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-15-2"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-streaming-metadata-allowing-ui-to-be-sent-before-generatemetadata-compl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-streaming-metadata-allowing-ui-to-be-sent-before-generatemetadata-compl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-streaming-metadata-allowing-ui-to-be-sent-before-generatemetadata-compl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was streaming metadata (allowing UI to be sent before generateMetadata completes) introduced in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Streaming metadata was introduced in Next.js 15.2, allowing the initial UI to be sent to the browser even before generateMetadata has completed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-15-2" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1w0qDM" prefix="r5445" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10544525898280257086"],"question":[0,"How does loading.js wrap page content?"],"answer":[0,"loading.js will automatically wrap the page.js file and any children below in a <Suspense> boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-loading-js-wrap-page-content"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-loading-js-wrap-page-content" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-loading-js-wrap-page-content" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does loading.js wrap page content?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js will automatically wrap the page.js file and any children below in a <Suspense> boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kQum8" prefix="r5446" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10662943998762379283"],"question":[0,"How can you disable metadata streaming for all user agents in Next.js?"],"answer":[0,"You can disable metadata streaming for all user agents by setting htmlLimitedBots: /.*/ in your next.config.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-disable-metadata-streaming-for-all-user-agents-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-disable-metadata-streaming-for-all-user-agents-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-disable-metadata-streaming-for-all-user-agents-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you disable metadata streaming for all user agents in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can disable metadata streaming for all user agents by setting htmlLimitedBots: /.*/ in your next.config.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WsRuR" prefix="r5447" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11023886503226392364"],"question":[0,"When was the App Router marked as stable for production use in Next.js?"],"answer":[0,"The App Router was marked as stable for production use in Next.js 13.4, released in May 2023."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-13-4"]]],"topic":[0,"nextjs"],"slug":[0,"when-was-the-app-router-marked-as-stable-for-production-use-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-was-the-app-router-marked-as-stable-for-production-use-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-was-the-app-router-marked-as-stable-for-production-use-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When was the App Router marked as stable for production use in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The App Router was marked as stable for production use in Next.js 13.4, released in May 2023.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-13-4" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z10dVuw" prefix="r5448" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11408719777231780102"],"question":[0,"What are the parameters accepted by the redirect() function?"],"answer":[0,"redirect() accepts two parameters: 'path' (string, required) - the destination URL supporting relative or absolute paths, and 'type' (optional, 'replace' | 'push') - defaults to 'replace' except in Server Actions where it defaults to 'push'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-parameters-accepted-by-the-redirect-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-parameters-accepted-by-the-redirect-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-parameters-accepted-by-the-redirect-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the parameters accepted by the redirect() function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect() accepts two parameters: 'path' (string, required) - the destination URL supporting relative or absolute paths, and 'type' (optional, 'replace' | 'push') - defaults to 'replace' except in Server Actions where it defaults to 'push'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfBgVc" prefix="r5449" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12140459662671344173"],"question":[0,"Is streaming supported with Next.js static exports?"],"answer":[0,"No. Streaming is not supported for static exports. It is only supported on Node.js servers, Docker containers, and platform-specific adapters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-streaming-supported-with-next-js-static-exports"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-streaming-supported-with-next-js-static-exports" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-streaming-supported-with-next-js-static-exports" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is streaming supported with Next.js static exports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Streaming is not supported for static exports. It is only supported on Node.js servers, Docker containers, and platform-specific adapters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29k0VX" prefix="r5450" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12215639315944941397"],"question":[0,"Where should notFound() be called to ensure a proper 404 HTTP status code instead of 200?"],"answer":[0,"notFound() should be placed before Suspense boundaries and before any await that may suspend. This ensures notFound() is called before streaming begins, allowing for a proper 404 status code instead of 200."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-notfound-be-called-to-ensure-a-proper-404-http-status-code-instead-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-notfound-be-called-to-ensure-a-proper-404-http-status-code-instead-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-notfound-be-called-to-ensure-a-proper-404-http-status-code-instead-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should notFound() be called to ensure a proper 404 HTTP status code instead of 200?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>notFound() should be placed before Suspense boundaries and before any await that may suspend. This ensures notFound() is called before streaming begins, allowing for a proper 404 status code instead of 200.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZQSTag" prefix="r5451" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12338262832147874656"],"question":[0,"In what version of Next.js was loading.js introduced?"],"answer":[0,"loading.js was introduced in Next.js version 13.0.0 as part of the App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"in-what-version-of-next-js-was-loading-js-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-what-version-of-next-js-was-loading-js-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-what-version-of-next-js-was-loading-js-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In what version of Next.js was loading.js introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js was introduced in Next.js version 13.0.0 as part of the App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1w74wS" prefix="r5452" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13382711791382545416"],"question":[0,"What HTTP status code does redirect() return when used in a Server Action?"],"answer":[0,"When used in a Server Action, redirect() returns a 303 (See Other) HTTP redirect response."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-when-used-in-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-when-used-in-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-when-used-in-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect() return when used in a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When used in a Server Action, redirect() returns a 303 (See Other) HTTP redirect response.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16uiKD" prefix="r5453" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14903679412066644800"],"question":[0,"What HTTP status code does Next.js return when streaming a response?"],"answer":[0,"Next.js returns a 200 status code when streaming to signal that the request was successful. The status code cannot be changed after streaming has started because the response headers have already been sent to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-return-when-streaming-a-response"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-return-when-streaming-a-response" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-return-when-streaming-a-response" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js return when streaming a response?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js returns a 200 status code when streaming to signal that the request was successful. The status code cannot be changed after streaming has started because the response headers have already been sent to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="fast-refresh" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Fast Refresh</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 20 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1r6emQ" prefix="r5454" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"568302727049261114"],"question":[0,"Will a useEffect with an empty dependency array re-run during Fast Refresh?"],"answer":[0,"Yes. Even a useEffect with an empty array of dependencies would still re-run once during Fast Refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"will-a-useeffect-with-an-empty-dependency-array-re-run-during-fast-refresh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="will-a-useeffect-with-an-empty-dependency-array-re-run-during-fast-refresh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#will-a-useeffect-with-an-empty-dependency-array-re-run-during-fast-refresh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Will a useEffect with an empty dependency array re-run during Fast Refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Even a useEffect with an empty array of dependencies would still re-run once during Fast Refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1QiyyP" prefix="r5455" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1876825056436199102"],"question":[0,"Are imports case-sensitive with Fast Refresh?"],"answer":[0,"Yes. Imports are case sensitive, and both fast and full refresh can fail when your import doesn't match the actual filename. For example, './header' vs './Header' would cause issues."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"are-imports-case-sensitive-with-fast-refresh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-imports-case-sensitive-with-fast-refresh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-imports-case-sensitive-with-fast-refresh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are imports case-sensitive with Fast Refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Imports are case sensitive, and both fast and full refresh can fail when your import doesn't match the actual filename. For example, './header' vs './Header' would cause issues.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IneBh" prefix="r5456" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3820940391184812621"],"question":[0,"What React feature does Next.js Fast Refresh integrate with?"],"answer":[0,"Fast Refresh deeply integrates into React itself via React Refresh, allowing Next.js to perform predictable precision updates to your React component tree."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/blog/next-9-4"]]],"topic":[0,"nextjs"],"slug":[0,"what-react-feature-does-next-js-fast-refresh-integrate-with"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-react-feature-does-next-js-fast-refresh-integrate-with" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-react-feature-does-next-js-fast-refresh-integrate-with" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What React feature does Next.js Fast Refresh integrate with?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Fast Refresh deeply integrates into React itself via React Refresh, allowing Next.js to perform predictable precision updates to your React component tree.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/blog/next-9-4" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27PuJr" prefix="r5457" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3871152634150280199"],"question":[0,"In which version of Next.js was Fast Refresh first enabled by default?"],"answer":[0,"Fast Refresh is enabled by default in all Next.js applications on version 9.4 or newer. It was introduced in the Next.js 9.4 release on May 11, 2020."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-of-next-js-was-fast-refresh-first-enabled-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-of-next-js-was-fast-refresh-first-enabled-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-of-next-js-was-fast-refresh-first-enabled-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version of Next.js was Fast Refresh first enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Fast Refresh is enabled by default in all Next.js applications on version 9.4 or newer. It was introduced in the Next.js 9.4 release on May 11, 2020.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1LEfCk" prefix="r5458" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4445890648028643763"],"question":[0,"What happens when a file exports both a React component and other constants?"],"answer":[0,"If a file contains mixed exports (React components alongside non-component exports like constants), it can cause Fast Refresh to reset state on every edit. The recommendation is to migrate the constant to a separate file and import it into both files to re-enable Fast Refresh."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-file-exports-both-a-react-component-and-other-constants"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-file-exports-both-a-react-component-and-other-constants" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-file-exports-both-a-react-component-and-other-constants" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a file exports both a React component and other constants?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If a file contains mixed exports (React components alongside non-component exports like constants), it can cause Fast Refresh to reset state on every edit. The recommendation is to migrate the constant to a separate file and import it into both files to re-enable Fast Refresh.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1lFjLd" prefix="r5459" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5091962352181564478"],"question":[0,"Does Fast Refresh preserve local state in class components?"],"answer":[0,"No. Local state is not preserved for class components (only function components and Hooks preserve state)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"does-fast-refresh-preserve-local-state-in-class-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-fast-refresh-preserve-local-state-in-class-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-fast-refresh-preserve-local-state-in-class-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Fast Refresh preserve local state in class components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Local state is not preserved for class components (only function components and Hooks preserve state).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="OCcky" prefix="r5460" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5531096078630445421"],"question":[0,"When is component state retained after an error occurs?"],"answer":[0,"Component state will be retained if the error did not occur during rendering. If the error did occur during rendering, React will remount your application using the updated code."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-component-state-retained-after-an-error-occurs"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-component-state-retained-after-an-error-occurs" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-component-state-retained-after-an-error-occurs" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is component state retained after an error occurs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Component state will be retained if the error did not occur during rendering. If the error did occur during rendering, React will remount your application using the updated code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z228MyO" prefix="r5461" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7452995050210493494"],"question":[0,"Can you use console.log and debugger statements in components with Fast Refresh?"],"answer":[0,"Yes. You can put console.log or debugger; into the components you edit during development. Both statements work seamlessly with Fast Refresh enabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-console-log-and-debugger-statements-in-components-with-fast-refresh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-console-log-and-debugger-statements-in-components-with-fast-refresh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-console-log-and-debugger-statements-in-components-with-fast-refresh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use console.log and debugger statements in components with Fast Refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. You can put console.log or debugger; into the components you edit during development. Both statements work seamlessly with Fast Refresh enabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gk84n" prefix="r5462" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8022801066307494816"],"question":[0,"What happens when you edit a file that only exports React components with Fast Refresh?"],"answer":[0,"If you edit a file that only exports React component(s), Fast Refresh will update the code only for that file, and re-render your component. You can edit anything in that file, including styles, rendering logic, event handlers, or effects."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-edit-a-file-that-only-exports-react-components-with-fast-r"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-edit-a-file-that-only-exports-react-components-with-fast-r" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-edit-a-file-that-only-exports-react-components-with-fast-r" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you edit a file that only exports React components with Fast Refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you edit a file that only exports React component(s), Fast Refresh will update the code only for that file, and re-render your component. You can edit anything in that file, including styles, rendering logic, event handlers, or effects.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1UGBI7" prefix="r5463" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8594273951915521899"],"question":[0,"How do error boundaries affect Fast Refresh behavior after rendering errors?"],"answer":[0,"If you have error boundaries in your app, they will retry rendering on the next edit after a rendering error. This means having an error boundary can prevent you from always getting reset to the root app state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-error-boundaries-affect-fast-refresh-behavior-after-rendering-errors"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-error-boundaries-affect-fast-refresh-behavior-after-rendering-errors" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-error-boundaries-affect-fast-refresh-behavior-after-rendering-errors" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do error boundaries affect Fast Refresh behavior after rendering errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you have error boundaries in your app, they will retry rendering on the next edit after a rendering error. This means having an error boundary can prevent you from always getting reset to the root app state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="R8nwy" prefix="r5464" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8711830943951115499"],"question":[0,"What happens to state when a Higher-Order Component returns a class component?"],"answer":[0,"Sometimes a file would export the result of calling a higher-order component like HOC(WrappedComponent). If the returned component is a class, its state will be reset."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-state-when-a-higher-order-component-returns-a-class-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-state-when-a-higher-order-component-returns-a-class-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-state-when-a-higher-order-component-returns-a-class-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to state when a Higher-Order Component returns a class component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Sometimes a file would export the result of calling a higher-order component like HOC(WrappedComponent). If the returned component is a class, its state will be reset.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnnDQU" prefix="r5465" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8713169777333908613"],"question":[0,"What is the purpose of the // @refresh reset directive?"],"answer":[0,"You can add // @refresh reset anywhere in the file you're editing. This directive is local to the file and instructs Fast Refresh to remount components defined in that file on every edit. This can be handy if you're tweaking an animation that only happens on mount."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-refresh-reset-directive"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-refresh-reset-directive" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-refresh-reset-directive" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the // @refresh reset directive?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can add // @refresh reset anywhere in the file you're editing. This directive is local to the file and instructs Fast Refresh to remount components defined in that file on every edit. This can be handy if you're tweaking an animation that only happens on mount.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZsYcX6" prefix="r5466" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8887925721788326329"],"question":[0,"Do Hook dependencies affect re-execution during Fast Refresh?"],"answer":[0,"No. Hooks with dependencies—such as useEffect, useMemo, and useCallback—will always update during Fast Refresh. Their list of dependencies will be ignored while Fast Refresh is happening."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"do-hook-dependencies-affect-re-execution-during-fast-refresh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-hook-dependencies-affect-re-execution-during-fast-refresh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-hook-dependencies-affect-re-execution-during-fast-refresh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Hook dependencies affect re-execution during Fast Refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Hooks with dependencies—such as useEffect, useMemo, and useCallback—will always update during Fast Refresh. Their list of dependencies will be ignored while Fast Refresh is happening.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZbXkQC" prefix="r5467" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9299865193406990359"],"question":[0,"Does the error overlay auto-dismiss when you fix a syntax error?"],"answer":[0,"Yes. Fixing the error will automatically dismiss the overlay without reloading the app. You don't need to manually dismiss the overlay - simply fixing the syntax error in your code and saving the file will automatically clear the error overlay."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-error-overlay-auto-dismiss-when-you-fix-a-syntax-error"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-error-overlay-auto-dismiss-when-you-fix-a-syntax-error" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-error-overlay-auto-dismiss-when-you-fix-a-syntax-error" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the error overlay auto-dismiss when you fix a syntax error?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Fixing the error will automatically dismiss the overlay without reloading the app. You don't need to manually dismiss the overlay - simply fixing the syntax error in your code and saving the file will automatically clear the error overlay.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14mkd6" prefix="r5468" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10864234252939914070"],"question":[0,"Why do anonymous arrow function exports prevent Fast Refresh from working properly?"],"answer":[0,"Anonymous arrow functions like export default () => <div />; cause Fast Refresh to not preserve local component state. Fast Refresh cannot reliably identify and track the component between edits when it's anonymous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"why-do-anonymous-arrow-function-exports-prevent-fast-refresh-from-working-proper"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-do-anonymous-arrow-function-exports-prevent-fast-refresh-from-working-proper" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-do-anonymous-arrow-function-exports-prevent-fast-refresh-from-working-proper" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why do anonymous arrow function exports prevent Fast Refresh from working properly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Anonymous arrow functions like export default () => <div />; cause Fast Refresh to not preserve local component state. Fast Refresh cannot reliably identify and track the component between edits when it's anonymous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nQtRn" prefix="r5469" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12996651494446317813"],"question":[0,"What happens when you edit a file that's imported by files outside of the React tree?"],"answer":[0,"If you edit a file that's imported by files outside of the React tree, Fast Refresh will fall back to doing a full reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-edit-a-file-that-s-imported-by-files-outside-of-the-react-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-edit-a-file-that-s-imported-by-files-outside-of-the-react-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-edit-a-file-that-s-imported-by-files-outside-of-the-react-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you edit a file that's imported by files outside of the React tree?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you edit a file that's imported by files outside of the React tree, Fast Refresh will fall back to doing a full reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1hBPRN" prefix="r5470" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13130378066699871889"],"question":[0,"How does Fast Refresh handle runtime errors?"],"answer":[0,"If you make a mistake that leads to a runtime error inside your component, you'll be greeted with a contextual overlay. Fixing the error will automatically dismiss the overlay, without reloading the app."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-fast-refresh-handle-runtime-errors"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-fast-refresh-handle-runtime-errors" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-fast-refresh-handle-runtime-errors" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Fast Refresh handle runtime errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you make a mistake that leads to a runtime error inside your component, you'll be greeted with a contextual overlay. Fixing the error will automatically dismiss the overlay, without reloading the app.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1EhhMy" prefix="r5471" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13281340642963091369"],"question":[0,"What happens to syntax errors when you fix them and save the file with Fast Refresh?"],"answer":[0,"If you make a syntax error during development, you can fix it and save the file again. The error will disappear automatically, so you won't need to reload the app. You will not lose component state."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-syntax-errors-when-you-fix-them-and-save-the-file-with-fast-refr"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-syntax-errors-when-you-fix-them-and-save-the-file-with-fast-refr" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-syntax-errors-when-you-fix-them-and-save-the-file-with-fast-refr" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to syntax errors when you fix them and save the file with Fast Refresh?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you make a syntax error during development, you can fix it and save the file again. The error will disappear automatically, so you won't need to reload the app. You will not lose component state.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ieUtO" prefix="r5472" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14467464833731319735"],"question":[0,"What happens when you edit a file with exports that aren't React components?"],"answer":[0,"If you edit a file with exports that aren't React components, Fast Refresh will re-run both that file, and the other files importing it. For example, if both Button.js and Modal.js import theme.js, editing theme.js will update both components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-you-edit-a-file-with-exports-that-aren-t-react-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-you-edit-a-file-with-exports-that-aren-t-react-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-you-edit-a-file-with-exports-that-aren-t-react-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when you edit a file with exports that aren't React components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you edit a file with exports that aren't React components, Fast Refresh will re-run both that file, and the other files importing it. For example, if both Button.js and Modal.js import theme.js, editing theme.js will update both components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1rukM1" prefix="r5473" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14784016144960482708"],"question":[0,"What component naming case is required for Fast Refresh to work properly?"],"answer":[0,"Component names must be in PascalCase and not camelCase. For example, use TextField instead of textField. If your component name is in camelCase, Fast Refresh will trigger a full page reload."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/fast-refresh-reload"]]],"topic":[0,"nextjs"],"slug":[0,"what-component-naming-case-is-required-for-fast-refresh-to-work-properly"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-component-naming-case-is-required-for-fast-refresh-to-work-properly" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-component-naming-case-is-required-for-fast-refresh-to-work-properly" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What component naming case is required for Fast Refresh to work properly?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Component names must be in PascalCase and not camelCase. For example, use TextField instead of textField. If your component name is in camelCase, Fast Refresh will trigger a full page reload.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/fast-refresh-reload" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-actions-ui-state-integration" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server Actions > UI State Integration</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 20 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2pWaH9" prefix="r5474" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"803369775654407265"],"question":[0,"What is the default redirect type in Server Actions - push or replace?"],"answer":[0,"By default, redirect uses 'push' in Server Actions, which adds a new entry to the browser history stack."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-redirect-type-in-server-actions-push-or-replace"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-redirect-type-in-server-actions-push-or-replace" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-redirect-type-in-server-actions-push-or-replace" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default redirect type in Server Actions - push or replace?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>By default, redirect uses 'push' in Server Actions, which adds a new entry to the browser history stack.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lP9HT" prefix="r5475" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1619288534057520649"],"question":[0,"How does .bind() work with Server Actions and what are its benefits?"],"answer":[0,".bind() works in both Server and Client Components and supports progressive enhancement. It allows you to pass additional arguments to a Server Action by creating a partially applied function. The first argument is the context (can be null), followed by the values to bind. This ensures bound values are encoded (unlike hidden input fields) and improves action semantics."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-bind-work-with-server-actions-and-what-are-its-benefits"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-bind-work-with-server-actions-and-what-are-its-benefits" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-bind-work-with-server-actions-and-what-are-its-benefits" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does .bind() work with Server Actions and what are its benefits?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.bind() works in both Server and Client Components and supports progressive enhancement. It allows you to pass additional arguments to a Server Action by creating a partially applied function. The first argument is the context (can be null), followed by the values to bind. This ensures bound values are encoded (unlike hidden input fields) and improves action semantics.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UsqJq" prefix="r5476" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1649235496806003429"],"question":[0,"What is the recommended profile parameter value for revalidateTag and what does it do?"],"answer":[0,"The recommended value is 'max'. With profile='max', the tag entry is marked as stale, and the next time a resource with that tag is visited, it will use stale-while-revalidate semantics - meaning stale content is served while fresh content is fetched in the background."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-profile-parameter-value-for-revalidatetag-and-what-does-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-profile-parameter-value-for-revalidatetag-and-what-does-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-profile-parameter-value-for-revalidatetag-and-what-does-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended profile parameter value for revalidateTag and what does it do?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The recommended value is 'max'. With profile='max', the tag entry is marked as stale, and the next time a resource with that tag is visited, it will use stale-while-revalidate semantics - meaning stale content is served while fresh content is fetched in the background.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24vUom" prefix="r5477" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2319404813976353099"],"question":[0,"What is the purpose of the permalink parameter in useActionState?"],"answer":[0,"The permalink is an optional string containing a unique page URL that the form modifies. For pages with dynamic content (like feeds) with progressive enhancement: if the action is a server function and the form is submitted before JavaScript loads, the browser will navigate to the permalink URL rather than the current page's URL. Once the form has hydrated, this parameter has no effect."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-purpose-of-the-permalink-parameter-in-useactionstate"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-purpose-of-the-permalink-parameter-in-useactionstate" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-purpose-of-the-permalink-parameter-in-useactionstate" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the purpose of the permalink parameter in useActionState?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The permalink is an optional string containing a unique page URL that the form modifies. For pages with dynamic content (like feeds) with progressive enhancement: if the action is a server function and the form is submitted before JavaScript loads, the browser will navigate to the permalink URL rather than the current page's URL. Once the form has hydrated, this parameter has no effect.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1fulIu" prefix="r5478" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2584322903068543611"],"question":[0,"What is the maximum character length for the path parameter in revalidatePath?"],"answer":[0,"The path parameter must not exceed 1024 characters. This value is case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-the-path-parameter-in-revalidatepath" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for the path parameter in revalidatePath?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The path parameter must not exceed 1024 characters. This value is case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z25yCa3" prefix="r5479" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3281822908588164585"],"question":[0,"Where must useFormStatus be called in relation to the form element?"],"answer":[0,"useFormStatus must be called from a component that is rendered inside a <form>. It must be defined as a child of the <form> element and will only return status for a parent <form>. It will not track status of a <form> rendered in the same component where the hook is called."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-useformstatus-be-called-in-relation-to-the-form-element"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-useformstatus-be-called-in-relation-to-the-form-element" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-useformstatus-be-called-in-relation-to-the-form-element" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must useFormStatus be called in relation to the form element?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useFormStatus must be called from a component that is rendered inside a <form>. It must be defined as a child of the <form> element and will only return status for a parent <form>. It will not track status of a <form> rendered in the same component where the hook is called.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="10UKhk" prefix="r5480" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4379228499571703261"],"question":[0,"What is updateTag and how does it differ from revalidateTag?"],"answer":[0,"updateTag is specifically designed for Server Actions to immediately expire cached data for read-your-own-writes scenarios. Unlike revalidateTag, it can only be used within Server Actions (not Route Handlers) and immediately expires the cache entry, causing the next request to be a blocking revalidate/cache miss. revalidateTag supports stale-while-revalidate behavior and can be used in both Server Actions and Route Handlers."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/updateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-updatetag-and-how-does-it-differ-from-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-updatetag-and-how-does-it-differ-from-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-updatetag-and-how-does-it-differ-from-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is updateTag and how does it differ from revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>updateTag is specifically designed for Server Actions to immediately expire cached data for read-your-own-writes scenarios. Unlike revalidateTag, it can only be used within Server Actions (not Route Handlers) and immediately expires the cache entry, causing the next request to be a blocking revalidate/cache miss. revalidateTag supports stale-while-revalidate behavior and can be used in both Server Actions and Route Handlers.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/updateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ibHT2" prefix="r5481" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4866939542702297987"],"question":[0,"What HTTP status code does redirect return in Server Actions by default?"],"answer":[0,"When used in Server Actions, redirect returns a 307 (Temporary) HTTP status code by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-redirect-return-in-server-actions-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-redirect-return-in-server-actions-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-redirect-return-in-server-actions-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does redirect return in Server Actions by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When used in Server Actions, redirect returns a 307 (Temporary) HTTP status code by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ArOdw" prefix="r5482" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4920618609724646200"],"question":[0,"Why should redirect be called outside try/catch blocks in Server Actions?"],"answer":[0,"redirect throws an error (NEXT_REDIRECT) to terminate rendering, so it should be called outside the try block when using try/catch statements. If placed inside a try block, it will be caught as an error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"why-should-redirect-be-called-outside-try-catch-blocks-in-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-should-redirect-be-called-outside-try-catch-blocks-in-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-should-redirect-be-called-outside-try-catch-blocks-in-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why should redirect be called outside try/catch blocks in Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>redirect throws an error (NEXT_REDIRECT) to terminate rendering, so it should be called outside the try block when using try/catch statements. If placed inside a try block, it will be caught as an error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z27Sir0" prefix="r5483" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5052068032550874032"],"question":[0,"Can Server Actions be defined inside Client Components?"],"answer":[0,"No, Server Actions cannot be defined in Client Components. Client Components can only import actions that use the module-level 'use server' directive. To call a Server Action in a Client Component, you must create a new file and add the 'use server' directive at the top of it."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-defined-inside-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-defined-inside-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-defined-inside-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be defined inside Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Server Actions cannot be defined in Client Components. Client Components can only import actions that use the module-level 'use server' directive. To call a Server Action in a Client Component, you must create a new file and add the 'use server' directive at the top of it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZNhqrE" prefix="r5484" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5641392468737355934"],"question":[0,"Does revalidateTag return a value?"],"answer":[0,"No, revalidateTag does not return a value (returns void)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"does-revalidatetag-return-a-value"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-revalidatetag-return-a-value" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-revalidatetag-return-a-value" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does revalidateTag return a value?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, revalidateTag does not return a value (returns void).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1qgpmc" prefix="r5485" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7958740590103107025"],"question":[0,"When calling revalidatePath before redirect in a Server Action, which should be called first?"],"answer":[0,"revalidatePath should be called before redirect. The pattern is: perform data update, call revalidatePath to revalidate the cache, then call redirect to navigate the user. This ensures the cache is updated before navigation occurs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/redirect"]]],"topic":[0,"nextjs"],"slug":[0,"when-calling-revalidatepath-before-redirect-in-a-server-action-which-should-be-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-calling-revalidatepath-before-redirect-in-a-server-action-which-should-be-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-calling-revalidatepath-before-redirect-in-a-server-action-which-should-be-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When calling revalidatePath before redirect in a Server Action, which should be called first?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>revalidatePath should be called before redirect. The pattern is: perform data update, call revalidatePath to revalidate the cache, then call redirect to navigate the user. This ensures the cache is updated before navigation occurs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/redirect" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1weLCa" prefix="r5486" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8665519793479135039"],"question":[0,"What is the previous name of useActionState in earlier React versions?"],"answer":[0,"useActionState was previously named useFormState in earlier React Canary versions as part of React DOM. It is now part of the core React package (v19.2+)."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-previous-name-of-useactionstate-in-earlier-react-versions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-previous-name-of-useactionstate-in-earlier-react-versions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-previous-name-of-useactionstate-in-earlier-react-versions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the previous name of useActionState in earlier React versions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState was previously named useFormState in earlier React Canary versions as part of React DOM. It is now part of the core React package (v19.2+).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ypJts" prefix="r5487" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9136610648597015965"],"question":[0,"What is the maximum number of tag items that can be assigned to a single cache entry?"],"answer":[0,"The maximum tag items is 128, meaning you can assign up to 128 tags to a single cache entry."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-number-of-tag-items-that-can-be-assigned-to-a-single-cache-e"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-number-of-tag-items-that-can-be-assigned-to-a-single-cache-e" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-number-of-tag-items-that-can-be-assigned-to-a-single-cache-e" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum number of tag items that can be assigned to a single cache entry?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The maximum tag items is 128, meaning you can assign up to 128 tags to a single cache entry.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1twSoy" prefix="r5488" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9402005439048592044"],"question":[0,"What is the maximum character length for a cache tag in revalidateTag?"],"answer":[0,"Cache tags must not exceed 256 characters. The tag value is also case-sensitive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidateTag"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-maximum-character-length-for-a-cache-tag-in-revalidatetag"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-maximum-character-length-for-a-cache-tag-in-revalidatetag" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-maximum-character-length-for-a-cache-tag-in-revalidatetag" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the maximum character length for a cache tag in revalidateTag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cache tags must not exceed 256 characters. The tag value is also case-sensitive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidateTag" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHbOTc" prefix="r5489" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9486191009432276709"],"question":[0,"What are the exact parameters and return values of the useActionState hook?"],"answer":[0,"useActionState accepts 3 parameters: (1) fn - the action function that receives previous state as first argument followed by normal form arguments, (2) initialState - any serializable value for initial state, (3) permalink (optional) - string containing unique page URL. It returns an array with 3 values: [state, formAction, isPending] where state is the current state value, formAction is the new action to pass to form/button, and isPending is a boolean indicating pending transition."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useActionState"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-parameters-and-return-values-of-the-useactionstate-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-parameters-and-return-values-of-the-useactionstate-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-parameters-and-return-values-of-the-useactionstate-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact parameters and return values of the useActionState hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState accepts 3 parameters: (1) fn - the action function that receives previous state as first argument followed by normal form arguments, (2) initialState - any serializable value for initial state, (3) permalink (optional) - string containing unique page URL. It returns an array with 3 values: [state, formAction, isPending] where state is the current state value, formAction is the new action to pass to form/button, and isPending is a boolean indicating pending transition.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useActionState" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1NoRQx" prefix="r5490" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9832127568499303388"],"question":[0,"What are the exact parameters and return values of the useOptimistic hook?"],"answer":[0,"useOptimistic accepts 2 parameters: (1) state - the initial value returned when no async action is pending, (2) updateFn(currentState, optimisticValue) - a pure function that receives current state and optimistic value and returns merged optimistic state. It returns an array: [optimisticState, addOptimistic] where optimisticState equals state normally but reflects updateFn result during pending actions, and addOptimistic is the dispatcher function."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react/useOptimistic"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-parameters-and-return-values-of-the-useoptimistic-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-parameters-and-return-values-of-the-useoptimistic-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-parameters-and-return-values-of-the-useoptimistic-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact parameters and return values of the useOptimistic hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useOptimistic accepts 2 parameters: (1) state - the initial value returned when no async action is pending, (2) updateFn(currentState, optimisticValue) - a pure function that receives current state and optimistic value and returns merged optimistic state. It returns an array: [optimisticState, addOptimistic] where optimisticState equals state normally but reflects updateFn result during pending actions, and addOptimistic is the dispatcher function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react/useOptimistic" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16FAzA" prefix="r5491" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11947006922474969389"],"question":[0,"Does using startTransition with Server Actions support progressive enhancement?"],"answer":[0,"No, invoking Server Actions using startTransition (without action or formAction props) disables progressive enhancement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-starttransition-with-server-actions-support-progressive-enhancement"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-starttransition-with-server-actions-support-progressive-enhancement" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-starttransition-with-server-actions-support-progressive-enhancement" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using startTransition with Server Actions support progressive enhancement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, invoking Server Actions using startTransition (without action or formAction props) disables progressive enhancement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2v4mho" prefix="r5492" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12531853784753348736"],"question":[0,"What directive is required to use hooks like useActionState, useFormStatus, and useOptimistic?"],"answer":[0,"These hooks must be used in Client Components marked with the 'use client' directive. They are React hooks that can only be used in client components, not server components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-directive-is-required-to-use-hooks-like-useactionstate-useformstatus-and-us"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-directive-is-required-to-use-hooks-like-useactionstate-useformstatus-and-us" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-directive-is-required-to-use-hooks-like-useactionstate-useformstatus-and-us" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What directive is required to use hooks like useActionState, useFormStatus, and useOptimistic?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>These hooks must be used in Client Components marked with the 'use client' directive. They are React hooks that can only be used in client components, not server components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdW6jV" prefix="r5493" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14521699551385975039"],"question":[0,"What is the difference in revalidation scope between revalidatePath type 'page' and 'layout'?"],"answer":[0,"When type is 'page', it revalidates any URL matching the provided page file but will not invalidate pages beneath the specific page (e.g., '/blog/[slug]' won't invalidate '/blog/[slug]/[author]'). When type is 'layout', it causes pages beneath with the same layout to revalidate (e.g., '/blog/[slug]/[another]' would also revalidate)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/revalidatePath"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-in-revalidation-scope-between-revalidatepath-type-page-an"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-in-revalidation-scope-between-revalidatepath-type-page-an" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-in-revalidation-scope-between-revalidatepath-type-page-an" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference in revalidation scope between revalidatePath type 'page' and 'layout'?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When type is 'page', it revalidates any URL matching the provided page file but will not invalidate pages beneath the specific page (e.g., '/blog/[slug]' won't invalidate '/blog/[slug]/[author]'). When type is 'layout', it causes pages beneath with the same layout to revalidate (e.g., '/blog/[slug]/[another]' would also revalidate).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/revalidatePath" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="static-assets" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Static Assets</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 20 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z29Ud22" prefix="r5494" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1078235885800469853"],"question":[0,"What is the default Cache-Control header for assets in the Next.js public folder?"],"answer":[0,"Cache-Control: public, max-age=0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/optimizing/static-assets"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-cache-control-header-for-assets-in-the-next-js-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-cache-control-header-for-assets-in-the-next-js-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-cache-control-header-for-assets-in-the-next-js-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Cache-Control header for assets in the Next.js public folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Cache-Control: public, max-age=0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/optimizing/static-assets" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WWvy8" prefix="r5495" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1203442780314314359"],"question":[0,"Does the assetPrefix configuration affect files in the public folder?"],"answer":[0,"No. assetPrefix covers requests to _next/static but does not influence files in the public folder. If you want to serve those assets over a CDN, you'll have to introduce the prefix yourself."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-assetprefix-configuration-affect-files-in-the-public-folder"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-assetprefix-configuration-affect-files-in-the-public-folder" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-assetprefix-configuration-affect-files-in-the-public-folder" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the assetPrefix configuration affect files in the public folder?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. assetPrefix covers requests to _next/static but does not influence files in the public folder. If you want to serve those assets over a CDN, you'll have to introduce the prefix yourself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RthdJ" prefix="r5496" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1749240580400739181"],"question":[0,"Are files added to the public folder after build time served by Next.js?"],"answer":[0,"No. Only assets that are in the public directory at build time will be served by Next.js. Files added at runtime won't be available."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/18005"]]],"topic":[0,"nextjs"],"slug":[0,"are-files-added-to-the-public-folder-after-build-time-served-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-files-added-to-the-public-folder-after-build-time-served-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-files-added-to-the-public-folder-after-build-time-served-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are files added to the public folder after build time served by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Only assets that are in the public directory at build time will be served by Next.js. Files added at runtime won't be available.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/18005" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3hVzL" prefix="r5497" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2522369023649396815"],"question":[0,"In which Next.js version was the robots.txt metadata file feature introduced?"],"answer":[0,"v13.3.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-robots-txt-metadata-file-feature-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-robots-txt-metadata-file-feature-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-robots-txt-metadata-file-feature-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the robots.txt metadata file feature introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>v13.3.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/robots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pPfFh" prefix="r5498" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3156133308138050613"],"question":[0,"What is the default qualities configuration in Next.js 16?"],"answer":[0,"[75]. This field is required starting with Next.js 16 because unrestricted access could allow malicious actors to optimize more qualities."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-qualities-configuration-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-qualities-configuration-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-qualities-configuration-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default qualities configuration in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>[75]. This field is required starting with Next.js 16 because unrestricted access could allow malicious actors to optimize more qualities.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z13xUvb" prefix="r5499" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3156816977453915938"],"question":[0,"What is the Cache-Control header for static image imports in Next.js?"],"answer":[0,"cache-control: public,max-age=31536000,immutable (31536000 seconds = 1 year)"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-cache-control-header-for-static-image-imports-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-cache-control-header-for-static-image-imports-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-cache-control-header-for-static-image-imports-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the Cache-Control header for static image imports in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>cache-control: public,max-age=31536000,immutable (31536000 seconds = 1 year)</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3Tzx4" prefix="r5500" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3362855981856478505"],"question":[0,"What is the default quality value for Next.js Image component?"],"answer":[0,"75. This is an integer between 1 and 100 that sets the quality of the optimized image."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-quality-value-for-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-quality-value-for-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-quality-value-for-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default quality value for Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol start="75"> <li>This is an integer between 1 and 100 that sets the quality of the optimized image.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1DwBnV" prefix="r5501" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6137311503779563726"],"question":[0,"For which image formats does Next.js automatically generate blurDataURL for static imports?"],"answer":[0,"JPG, PNG, WebP, and AVIF files (unless the image is animated)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"for-which-image-formats-does-next-js-automatically-generate-blurdataurl-for-stat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-which-image-formats-does-next-js-automatically-generate-blurdataurl-for-stat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-which-image-formats-does-next-js-automatically-generate-blurdataurl-for-stat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For which image formats does Next.js automatically generate blurDataURL for static imports?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>JPG, PNG, WebP, and AVIF files (unless the image is animated).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="F08SG" prefix="r5502" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6484114856239456938"],"question":[0,"What file formats are supported for icon files in Next.js App Router?"],"answer":[0,".ico, .jpg, .jpeg, .png, .svg"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-icon-files-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-icon-files-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-icon-files-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for icon files in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.ico, .jpg, .jpeg, .png, .svg</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1RjaDv" prefix="r5503" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6787781422689054473"],"question":[0,"What is the recommended size threshold for using the unoptimized prop on images?"],"answer":[0,"Less than 1KB. The unoptimized prop is useful for images that do not benefit from optimization such as small images (less than 1KB)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-size-threshold-for-using-the-unoptimized-prop-on-images"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-size-threshold-for-using-the-unoptimized-prop-on-images" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-size-threshold-for-using-the-unoptimized-prop-on-images" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended size threshold for using the unoptimized prop on images?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Less than 1KB. The unoptimized prop is useful for images that do not benefit from optimization such as small images (less than 1KB).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mrpVs" prefix="r5504" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6997581063205827545"],"question":[0,"What file formats are supported for favicon in Next.js App Router?"],"answer":[0,".ico only. The file must be named favicon.ico."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-formats-are-supported-for-favicon-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-formats-are-supported-for-favicon-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-formats-are-supported-for-favicon-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file formats are supported for favicon in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>.ico only. The file must be named favicon.ico.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1tVQEy" prefix="r5505" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8923308628105674472"],"question":[0,"What happens if a static file in public has the same name as a file in the pages directory?"],"answer":[0,"This will result in an error. The exact error message is: 'One of your public files has the same path as a page file which is not supported.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-a-static-file-in-public-has-the-same-name-as-a-file-in-the-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-a-static-file-in-public-has-the-same-name-as-a-file-in-the-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-a-static-file-in-public-has-the-same-name-as-a-file-in-the-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if a static file in public has the same name as a file in the pages directory?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>This will result in an error. The exact error message is: 'One of your public files has the same path as a page file which is not supported.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1udkkv" prefix="r5506" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9171973538672998656"],"question":[0,"Do files in the public folder undergo Webpack processing or bundling?"],"answer":[0,"No. Files in the public folder do not undergo processing or bundling by Webpack and are served as-is."],"confidence":[0,0.95],"sources":[1,[[0,"https://codedamn.com/news/nextjs/what-is-public-folder-inside-next-js"]]],"topic":[0,"nextjs"],"slug":[0,"do-files-in-the-public-folder-undergo-webpack-processing-or-bundling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-files-in-the-public-folder-undergo-webpack-processing-or-bundling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-files-in-the-public-folder-undergo-webpack-processing-or-bundling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do files in the public folder undergo Webpack processing or bundling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Files in the public folder do not undergo processing or bundling by Webpack and are served as-is.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://codedamn.com/news/nextjs/what-is-public-folder-inside-next-js" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>codedamn.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oEcYJ" prefix="r5507" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10258603092699762990"],"question":[0,"How much longer does AVIF encoding take compared to WebP?"],"answer":[0,"AVIF generally takes 50% longer to encode but it compresses 20% smaller compared to WebP."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"how-much-longer-does-avif-encoding-take-compared-to-webp"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-much-longer-does-avif-encoding-take-compared-to-webp" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-much-longer-does-avif-encoding-take-compared-to-webp" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How much longer does AVIF encoding take compared to WebP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>AVIF generally takes 50% longer to encode but it compresses 20% smaller compared to WebP.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="cMsqb" prefix="r5508" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10522825211523481668"],"question":[0,"What is the default minimumCacheTTL value in Next.js 16?"],"answer":[0,"14400 seconds (4 hours). This was increased from 60 seconds to reduce revalidation costs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-16"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-minimumcachettl-value-in-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-minimumcachettl-value-in-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-minimumcachettl-value-in-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default minimumCacheTTL value in Next.js 16?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>14400 seconds (4 hours). This was increased from 60 seconds to reduce revalidation costs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-16" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZoKvck" prefix="r5509" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11085572204054784232"],"question":[0,"What is the default minimumCacheTTL value in Next.js 15 and earlier?"],"answer":[0,"60 seconds"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-minimumcachettl-value-in-next-js-15-and-earlier"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-minimumcachettl-value-in-next-js-15-and-earlier" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-minimumcachettl-value-in-next-js-15-and-earlier" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default minimumCacheTTL value in Next.js 15 and earlier?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>60 seconds</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1WWm9N" prefix="r5510" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12930045644539705127"],"question":[0,"Where can favicon.ico be placed in Next.js App Router?"],"answer":[0,"Only in the root /app directory. Favicons can only be set in the root /app segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"where-can-favicon-ico-be-placed-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-can-favicon-ico-be-placed-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-can-favicon-ico-be-placed-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where can favicon.ico be placed in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only in the root /app directory. Favicons can only be set in the root /app segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lifhS" prefix="r5511" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12989731729670102788"],"question":[0,"Can icon and apple-icon files be placed in subdirectories of /app?"],"answer":[0,"Yes. Icon and apple-icon files can be located in /app/**/* (any subdirectory), but favicon.ico must be in the root /app directory only."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons"]]],"topic":[0,"nextjs"],"slug":[0,"can-icon-and-apple-icon-files-be-placed-in-subdirectories-of-app"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-icon-and-apple-icon-files-be-placed-in-subdirectories-of-app" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-icon-and-apple-icon-files-be-placed-in-subdirectories-of-app" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can icon and apple-icon files be placed in subdirectories of /app?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Icon and apple-icon files can be located in /app/**/* (any subdirectory), but favicon.ico must be in the root /app directory only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="TMQll" prefix="r5512" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13292320986155729960"],"question":[0,"What must the public folder be named in Next.js?"],"answer":[0,"The directory must be named `public`. The name cannot be changed and it's the only directory used to serve static assets."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-the-public-folder-be-named-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-the-public-folder-be-named-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-the-public-folder-be-named-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must the public folder be named in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The directory must be named <code>public</code>. The name cannot be changed and it's the only directory used to serve static assets.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/file-conventions/public-folder" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HvovF" prefix="r5513" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13355038664403770777"],"question":[0,"What is the default contentDispositionType value when dangerouslyAllowSVG is enabled?"],"answer":[0,"'attachment'. This forces the browser to download the image when visiting directly for added security."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-contentdispositiontype-value-when-dangerouslyallowsvg-is-ena"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-contentdispositiontype-value-when-dangerouslyallowsvg-is-ena" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-contentdispositiontype-value-when-dangerouslyallowsvg-is-ena" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default contentDispositionType value when dangerouslyAllowSVG is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>'attachment'. This forces the browser to download the image when visiting directly for added security.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="middleware-path-matching-routing-control" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Middleware > Path Matching & Routing Control</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 20 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z2jEJA1" prefix="r5514" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1279248229560643093"],"question":[0,"Does a matcher pattern like `/about` match `/about/team`?"],"answer":[0,"Yes. Matchers anchor to the path start, so `/about` matches both `/about` and `/about/team`. To match only exact paths, you need to be more specific in your pattern."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"does-a-matcher-pattern-like-about-match-about-team"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-a-matcher-pattern-like-about-match-about-team" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-a-matcher-pattern-like-about-match-about-team" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does a matcher pattern like `/about` match `/about/team`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Matchers anchor to the path start, so <code>/about</code> matches both <code>/about</code> and <code>/about/team</code>. To match only exact paths, you need to be more specific in your pattern.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2wDBkI" prefix="r5515" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2215475981617659439"],"question":[0,"What does the `?` modifier mean in middleware matcher patterns?"],"answer":[0,"The `?` modifier means zero or one segment. It allows the named parameter to be optional."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-modifier-mean-in-middleware-matcher-patterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-modifier-mean-in-middleware-matcher-patterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-modifier-mean-in-middleware-matcher-patterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the `?` modifier mean in middleware matcher patterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>?</code> modifier means zero or one segment. It allows the named parameter to be optional.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z28Ny8C" prefix="r5516" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2857800612192837408"],"question":[0,"What's the difference between NextResponse.redirect() and NextResponse.rewrite()?"],"answer":[0,"`NextResponse.redirect()` changes the URL in the browser, while `NextResponse.rewrite()` proxies the given URL while preserving the original URL in the browser."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/next-response"]]],"topic":[0,"nextjs"],"slug":[0,"what-s-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-s-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-s-the-difference-between-nextresponse-redirect-and-nextresponse-rewrite" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What's the difference between NextResponse.redirect() and NextResponse.rewrite()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code>NextResponse.redirect()</code> changes the URL in the browser, while <code>NextResponse.rewrite()</code> proxies the given URL while preserving the original URL in the browser.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/next-response" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="lNcVO" prefix="r5517" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4101748384592065356"],"question":[0,"How many middleware files are supported per Next.js project?"],"answer":[0,"Only one middleware.ts or middleware.js file is supported per project, though you can organize your middleware logic into separate modules and import them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-middleware-files-are-supported-per-next-js-project"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-middleware-files-are-supported-per-next-js-project" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-middleware-files-are-supported-per-next-js-project" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many middleware files are supported per Next.js project?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Only one middleware.ts or middleware.js file is supported per project, though you can organize your middleware logic into separate modules and import them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2h57hO" prefix="r5518" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4201500058850292876"],"question":[0,"Where should the middleware.ts or middleware.js file be located?"],"answer":[0,"The middleware file should be placed in the project root at the same level as the `pages` or `app` directories, or inside the `src` folder at the same level as your `app` folder if using src directory structure."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-middleware-ts-or-middleware-js-file-be-located"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-middleware-ts-or-middleware-js-file-be-located" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-middleware-ts-or-middleware-js-file-be-located" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the middleware.ts or middleware.js file be located?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The middleware file should be placed in the project root at the same level as the <code>pages</code> or <code>app</code> directories, or inside the <code>src</code> folder at the same level as your <code>app</code> folder if using src directory structure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1IMbcP" prefix="r5519" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5671291688509922728"],"question":[0,"What happens when middleware is not defined with a matcher and runs on all routes by default?"],"answer":[0,"If no matcher is specified, middleware will be invoked for every route in your project. It's crucial to use matchers to precisely target or exclude specific routes for performance reasons."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-middleware-is-not-defined-with-a-matcher-and-runs-on-all-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-middleware-is-not-defined-with-a-matcher-and-runs-on-all-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-middleware-is-not-defined-with-a-matcher-and-runs-on-all-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when middleware is not defined with a matcher and runs on all routes by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If no matcher is specified, middleware will be invoked for every route in your project. It's crucial to use matchers to precisely target or exclude specific routes for performance reasons.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Ze516R" prefix="r5520" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5692989268143458802"],"question":[0,"What fields are required in a `has` or `missing` matcher object?"],"answer":[0,"Required fields are: `type` (String - must be 'header', 'cookie', 'host', or 'query'), `key` (String - the key to match against), and `value` (String or undefined - if undefined, any value will match)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects"]]],"topic":[0,"nextjs"],"slug":[0,"what-fields-are-required-in-a-has-or-missing-matcher-object"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-fields-are-required-in-a-has-or-missing-matcher-object" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-fields-are-required-in-a-has-or-missing-matcher-object" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What fields are required in a `has` or `missing` matcher object?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Required fields are: <code>type</code> (String - must be 'header', 'cookie', 'host', or 'query'), <code>key</code> (String - the key to match against), and <code>value</code> (String or undefined - if undefined, any value will match).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1JjVXV" prefix="r5521" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6141995246327011581"],"question":[0,"What happens if you set a `runtime` config in proxy.js (Next.js 16)?"],"answer":[0,"Setting the runtime config option in proxy.js will throw an error. Proxy defaults to Node.js runtime and the runtime option is not available - it cannot be configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-you-set-a-runtime-config-in-proxy-js-next-js-16"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-you-set-a-runtime-config-in-proxy-js-next-js-16" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-you-set-a-runtime-config-in-proxy-js-next-js-16" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if you set a `runtime` config in proxy.js (Next.js 16)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Setting the runtime config option in proxy.js will throw an error. Proxy defaults to Node.js runtime and the runtime option is not available - it cannot be configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Znaklf" prefix="r5522" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6166955890513295941"],"question":[0,"If you customize pageExtensions to .page.ts, what should you name your middleware file?"],"answer":[0,"You should name it `middleware.page.ts` (or `.page.js`) to match your customized pageExtensions configuration."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"if-you-customize-pageextensions-to-page-ts-what-should-you-name-your-middleware-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="if-you-customize-pageextensions-to-page-ts-what-should-you-name-your-middleware-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#if-you-customize-pageextensions-to-page-ts-what-should-you-name-your-middleware-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">If you customize pageExtensions to .page.ts, what should you name your middleware file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should name it <code>middleware.page.ts</code> (or <code>.page.js</code>) to match your customized pageExtensions configuration.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Of82L" prefix="r5523" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6637857926032029820"],"question":[0,"What does the `*` modifier mean in middleware matcher patterns like `/about/:path*`?"],"answer":[0,"The `*` modifier means zero or more segments. For example, `/about/:path*` matches `/about`, `/about/a`, `/about/a/b`, and `/about/a/b/c`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-modifier-mean-in-middleware-matcher-patterns-like-about-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-modifier-mean-in-middleware-matcher-patterns-like-about-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-modifier-mean-in-middleware-matcher-patterns-like-about-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the `*` modifier mean in middleware matcher patterns like `/about/:path*`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>*</code> modifier means zero or more segments. For example, <code>/about/:path*</code> matches <code>/about</code>, <code>/about/a</code>, <code>/about/a/b</code>, and <code>/about/a/b/c</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Vl0Kv" prefix="r5524" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6863589948920311121"],"question":[0,"What is the standard negative lookahead pattern to exclude Next.js internal paths?"],"answer":[0,"The common pattern is `'/((?!api|_next/static|_next/image|favicon.ico).*)'` which excludes API routes, static assets, image optimization, and favicon from middleware execution."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-standard-negative-lookahead-pattern-to-exclude-next-js-internal-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-standard-negative-lookahead-pattern-to-exclude-next-js-internal-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-standard-negative-lookahead-pattern-to-exclude-next-js-internal-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the standard negative lookahead pattern to exclude Next.js internal paths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The common pattern is <code>'/((?!api|_next/static|_next/image|favicon.ico).*)'</code> which excludes API routes, static assets, image optimization, and favicon from middleware execution.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="240vDU" prefix="r5525" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8015094197105936046"],"question":[0,"Is `/about/(.*)` equivalent to `/about/:path*`?"],"answer":[0,"Yes. Regular expressions enclosed in parentheses like `/about/(.*)` are equivalent to `/about/:path*`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"is-about-equivalent-to-about-path"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-about-equivalent-to-about-path" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-about-equivalent-to-about-path" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is `/about/(.*)` equivalent to `/about/:path*`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Regular expressions enclosed in parentheses like <code>/about/(.*)</code> are equivalent to <code>/about/:path*</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="dtq90" prefix="r5526" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9123103634376351119"],"question":[0,"What is the execution order of middleware relative to next.config.js settings?"],"answer":[0,"The order is: 1) headers from next.config.js, 2) redirects from next.config.js, 3) Middleware, 4) beforeFiles (rewrites) from next.config.js, 5) Filesystem routes, 6) afterFiles (rewrites), 7) Dynamic Routes, 8) fallback (rewrites)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-execution-order-of-middleware-relative-to-next-config-js-settings"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-execution-order-of-middleware-relative-to-next-config-js-settings" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-execution-order-of-middleware-relative-to-next-config-js-settings" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the execution order of middleware relative to next.config.js settings?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The order is: 1) headers from next.config.js, 2) redirects from next.config.js, 3) Middleware, 4) beforeFiles (rewrites) from next.config.js, 5) Filesystem routes, 6) afterFiles (rewrites), 7) Dynamic Routes, 8) fallback (rewrites).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/15/pages/api-reference/file-conventions/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZqTIHK" prefix="r5527" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10854275581411134651"],"question":[0,"What is the `locale` property used for in advanced matcher objects?"],"answer":[0,"The `locale` property is a boolean that, when set to `false`, allows you to ignore locale-based routing for specific paths in internationalized applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-locale-property-used-for-in-advanced-matcher-objects"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-locale-property-used-for-in-advanced-matcher-objects" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-locale-property-used-for-in-advanced-matcher-objects" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the `locale` property used for in advanced matcher objects?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>locale</code> property is a boolean that, when set to <code>false</code>, allows you to ignore locale-based routing for specific paths in internationalized applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Tzbn8" prefix="r5528" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11404082149846696325"],"question":[0,"Can middleware matcher values use dynamic variables?"],"answer":[0,"No. The matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"can-middleware-matcher-values-use-dynamic-variables"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-middleware-matcher-values-use-dynamic-variables" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-middleware-matcher-values-use-dynamic-variables" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can middleware matcher values use dynamic variables?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The matcher values need to be constants so they can be statically analyzed at build-time. Dynamic values such as variables will be ignored.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1S8z2E" prefix="r5529" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11417553197604044962"],"question":[0,"What does the `+` modifier mean in middleware matcher patterns?"],"answer":[0,"The `+` modifier means one or more segments. Unlike `*`, it requires at least one segment to match."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-modifier-mean-in-middleware-matcher-patterns"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-modifier-mean-in-middleware-matcher-patterns" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-modifier-mean-in-middleware-matcher-patterns" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the `+` modifier mean in middleware matcher patterns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>+</code> modifier means one or more segments. Unlike <code>*</code>, it requires at least one segment to match.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="F8iII" prefix="r5530" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12537454918087634945"],"question":[0,"How does Next.js treat `/public` for backward compatibility in matchers?"],"answer":[0,"Next.js always considers `/public` as `/public/index` for backward compatibility. Therefore, a matcher of `/public/:path` will match both `/public` and paths like `/public/something`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-treat-public-for-backward-compatibility-in-matchers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-treat-public-for-backward-compatibility-in-matchers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-treat-public-for-backward-compatibility-in-matchers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js treat `/public` for backward compatibility in matchers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js always considers <code>/public</code> as <code>/public/index</code> for backward compatibility. Therefore, a matcher of <code>/public/:path</code> will match both <code>/public</code> and paths like <code>/public/something</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2pI0Ks" prefix="r5531" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12865054966026116362"],"question":[0,"How do you match multiple paths in middleware configuration?"],"answer":[0,"Use an array syntax: `matcher: ['/about', '/contact']` to apply middleware to multiple paths."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-match-multiple-paths-in-middleware-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-match-multiple-paths-in-middleware-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-match-multiple-paths-in-middleware-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you match multiple paths in middleware configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use an array syntax: <code>matcher: ['/about', '/contact']</code> to apply middleware to multiple paths.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="kbvTn" prefix="r5532" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14006974382575618428"],"question":[0,"Will middleware run for `/_next/data` routes even if explicitly excluded in the matcher?"],"answer":[0,"Yes. Even when `_next/data` is excluded in a negative matcher pattern, middleware will still be invoked for `_next/data` routes. This is intentional to prevent accidental security vulnerabilities."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/proxy"]]],"topic":[0,"nextjs"],"slug":[0,"will-middleware-run-for-next-data-routes-even-if-explicitly-excluded-in-the-matc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="will-middleware-run-for-next-data-routes-even-if-explicitly-excluded-in-the-matc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#will-middleware-run-for-next-data-routes-even-if-explicitly-excluded-in-the-matc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Will middleware run for `/_next/data` routes even if explicitly excluded in the matcher?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Even when <code>_next/data</code> is excluded in a negative matcher pattern, middleware will still be invoked for <code>_next/data</code> routes. This is intentional to prevent accidental security vulnerabilities.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/proxy" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1X0J7H" prefix="r5533" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15109402042496048253"],"question":[0,"Must URLs passed to NextResponse.redirect() and NextResponse.rewrite() be absolute or relative?"],"answer":[0,"You must always pass absolute URLs for redirecting and rewriting in middleware. Relative URLs are not supported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/middleware-relative-urls"]]],"topic":[0,"nextjs"],"slug":[0,"must-urls-passed-to-nextresponse-redirect-and-nextresponse-rewrite-be-absolute-o"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-urls-passed-to-nextresponse-redirect-and-nextresponse-rewrite-be-absolute-o" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-urls-passed-to-nextresponse-redirect-and-nextresponse-rewrite-be-absolute-o" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must URLs passed to NextResponse.redirect() and NextResponse.rewrite() be absolute or relative?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must always pass absolute URLs for redirecting and rewriting in middleware. Relative URLs are not supported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/middleware-relative-urls" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="draft-mode" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Draft Mode</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 20 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZW3mKp" prefix="r5534" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1435862776499763639"],"question":[0,"What two parameters must be validated in the Draft Mode route handler before enabling draft mode?"],"answer":[0,"1) The secret token must match the expected value, and 2) the slug parameter must exist and correspond to valid content by fetching from the headless CMS"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-parameters-must-be-validated-in-the-draft-mode-route-handler-before-ena"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-parameters-must-be-validated-in-the-draft-mode-route-handler-before-ena" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-parameters-must-be-validated-in-the-draft-mode-route-handler-before-ena" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two parameters must be validated in the Draft Mode route handler before enabling draft mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>The secret token must match the expected value, and 2) the slug parameter must exist and correspond to valid content by fetching from the headless CMS</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2rGG7F" prefix="r5535" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1750546772639255324"],"question":[0,"When Draft Mode is enabled, when does data fetching occur?"],"answer":[0,"At request time (instead of at build time). Draft Mode switches pages from static generation to dynamic rendering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"when-draft-mode-is-enabled-when-does-data-fetching-occur"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-draft-mode-is-enabled-when-does-data-fetching-occur" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-draft-mode-is-enabled-when-does-data-fetching-occur" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When Draft Mode is enabled, when does data fetching occur?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At request time (instead of at build time). Draft Mode switches pages from static generation to dynamic rendering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RIhwP" prefix="r5536" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2070493407516229173"],"question":[0,"How should you prevent open redirect vulnerabilities when implementing Draft Mode?"],"answer":[0,"Redirect to the path from the fetched post (post.slug) rather than directly using the user-supplied slug parameter"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-you-prevent-open-redirect-vulnerabilities-when-implementing-draft-mod"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-you-prevent-open-redirect-vulnerabilities-when-implementing-draft-mod" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-you-prevent-open-redirect-vulnerabilities-when-implementing-draft-mod" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should you prevent open redirect vulnerabilities when implementing Draft Mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Redirect to the path from the fetched post (post.slug) rather than directly using the user-supplied slug parameter</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1va7CF" prefix="r5537" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2300364480392904158"],"question":[0,"What is the relationship between Draft Mode and Preview Mode?"],"answer":[0,"Draft Mode supersedes Preview Mode. Preview Mode is still supported for backward compatibility but Draft Mode is the recommended approach. Preview Mode does not work in the App Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/configuring/preview-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-relationship-between-draft-mode-and-preview-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-relationship-between-draft-mode-and-preview-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-relationship-between-draft-mode-and-preview-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the relationship between Draft Mode and Preview Mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Draft Mode supersedes Preview Mode. Preview Mode is still supported for backward compatibility but Draft Mode is the recommended approach. Preview Mode does not work in the App Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/configuring/preview-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="F6Kao" prefix="r5538" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2703806569142226886"],"question":[0,"Is draftMode() a synchronous or asynchronous function in Next.js 15 and later?"],"answer":[0,"It is an asynchronous function that must be awaited. As of Next.js 15, draftMode() became async. In v15 it can temporarily be accessed synchronously with warnings, but starting with Next.js 16, synchronous access is fully removed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"is-draftmode-a-synchronous-or-asynchronous-function-in-next-js-15-and-later"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-draftmode-a-synchronous-or-asynchronous-function-in-next-js-15-and-later" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-draftmode-a-synchronous-or-asynchronous-function-in-next-js-15-and-later" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is draftMode() a synchronous or asynchronous function in Next.js 15 and later?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It is an asynchronous function that must be awaited. As of Next.js 15, draftMode() became async. In v15 it can temporarily be accessed synchronously with warnings, but starting with Next.js 16, synchronous access is fully removed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1QlCyr" prefix="r5539" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2942905896718691066"],"question":[0,"When is the __prerender_bypass cookie value regenerated?"],"answer":[0,"A new bypass cookie value is generated each time you run 'next build'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-prerender-bypass-cookie-value-regenerated"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-prerender-bypass-cookie-value-regenerated" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-prerender-bypass-cookie-value-regenerated" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the __prerender_bypass cookie value regenerated?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A new bypass cookie value is generated each time you run 'next build'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1eI196" prefix="r5540" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3029646548732234416"],"question":[0,"When Draft Mode is NOT enabled, when does data fetching occur for static pages?"],"answer":[0,"At build time"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"when-draft-mode-is-not-enabled-when-does-data-fetching-occur-for-static-pages"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-draft-mode-is-not-enabled-when-does-data-fetching-occur-for-static-pages" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-draft-mode-is-not-enabled-when-does-data-fetching-occur-for-static-pages" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When Draft Mode is NOT enabled, when does data fetching occur for static pages?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At build time</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1u0KqS" prefix="r5541" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5199436771758000675"],"question":[0,"In Next.js 16, can draftMode() be accessed synchronously?"],"answer":[0,"No, starting with Next.js 16, synchronous access is fully removed and draftMode() can only be accessed asynchronously."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-16-can-draftmode-be-accessed-synchronously"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-16-can-draftmode-be-accessed-synchronously" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-16-can-draftmode-be-accessed-synchronously" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 16, can draftMode() be accessed synchronously?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, starting with Next.js 16, synchronous access is fully removed and draftMode() can only be accessed asynchronously.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24YEfF" prefix="r5542" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6188280693257013905"],"question":[0,"What method do you call to enable Draft Mode after calling draftMode()?"],"answer":[0,"draft.enable() - where draft is the awaited result of draftMode()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-method-do-you-call-to-enable-draft-mode-after-calling-draftmode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-method-do-you-call-to-enable-draft-mode-after-calling-draftmode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-method-do-you-call-to-enable-draft-mode-after-calling-draftmode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What method do you call to enable Draft Mode after calling draftMode()?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>draft.enable() - where draft is the awaited result of draftMode()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16GhJD" prefix="r5543" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7926130646269001586"],"question":[0,"What is the typical file path for a Draft Mode route handler?"],"answer":[0,"app/api/draft/route.ts"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-typical-file-path-for-a-draft-mode-route-handler"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-typical-file-path-for-a-draft-mode-route-handler" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-typical-file-path-for-a-draft-mode-route-handler" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the typical file path for a Draft Mode route handler?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>app/api/draft/route.ts</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Aw5qk" prefix="r5544" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8229282626996669181"],"question":[0,"What prefetch setting must you use with next/link when linking to a route that disables Draft Mode?"],"answer":[0,"prefetch={false} - this prevents accidentally deleting the cookie during prefetch"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-prefetch-setting-must-you-use-with-next-link-when-linking-to-a-route-that-d"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-prefetch-setting-must-you-use-with-next-link-when-linking-to-a-route-that-d" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-prefetch-setting-must-you-use-with-next-link-when-linking-to-a-route-that-d" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What prefetch setting must you use with next/link when linking to a route that disables Draft Mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>prefetch={false} - this prevents accidentally deleting the cookie during prefetch</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZdN7aD" prefix="r5545" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9083594522926959569"],"question":[0,"In Next.js 15, what happens if you access draftMode() synchronously?"],"answer":[0,"It can temporarily be accessed synchronously, but warnings are shown in both development and production. This synchronous access will be deprecated in future versions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/sync-dynamic-apis"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-what-happens-if-you-access-draftmode-synchronously"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-what-happens-if-you-access-draftmode-synchronously" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-what-happens-if-you-access-draftmode-synchronously" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15, what happens if you access draftMode() synchronously?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It can temporarily be accessed synchronously, but warnings are shown in both development and production. This synchronous access will be deprecated in future versions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/sync-dynamic-apis" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZRG81U" prefix="r5546" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9873008002207795263"],"question":[0,"What function do you import from 'next/headers' to use Draft Mode?"],"answer":[0,"draftMode()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-function-do-you-import-from-next-headers-to-use-draft-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-function-do-you-import-from-next-headers-to-use-draft-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-function-do-you-import-from-next-headers-to-use-draft-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What function do you import from 'next/headers' to use Draft Mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>draftMode()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3hcWT" prefix="r5547" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10371643119410492930"],"question":[0,"Where should the Draft Mode secret token be stored?"],"answer":[0,"The secret should only be known to the Route Handler and the CMS. It should be validated server-side."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-the-draft-mode-secret-token-be-stored"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-the-draft-mode-secret-token-be-stored" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-the-draft-mode-secret-token-be-stored" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should the Draft Mode secret token be stored?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The secret should only be known to the Route Handler and the CMS. It should be validated server-side.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Tn3JQ" prefix="r5548" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11639348736213851252"],"question":[0,"What is the exact name of the cookie that Draft Mode sets?"],"answer":[0,"__prerender_bypass"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-name-of-the-cookie-that-draft-mode-sets"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-name-of-the-cookie-that-draft-mode-sets" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-name-of-the-cookie-that-draft-mode-sets" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact name of the cookie that Draft Mode sets?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>__prerender_bypass</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="XwuUA" prefix="r5549" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11731061831472683537"],"question":[0,"In which Next.js version was Draft Mode first introduced?"],"answer":[0,"Next.js 13.4.0"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-draft-mode-first-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-draft-mode-first-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-draft-mode-first-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was Draft Mode first introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js 13.4.0</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZXnM8v" prefix="r5550" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12062490541089786779"],"question":[0,"What browser requirements are needed to test Draft Mode locally over HTTP?"],"answer":[0,"Your browser needs to allow third-party cookies and local storage access"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-browser-requirements-are-needed-to-test-draft-mode-locally-over-http"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-browser-requirements-are-needed-to-test-draft-mode-locally-over-http" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-browser-requirements-are-needed-to-test-draft-mode-locally-over-http" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What browser requirements are needed to test Draft Mode locally over HTTP?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Your browser needs to allow third-party cookies and local storage access</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Eeusa" prefix="r5551" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12654630302401814403"],"question":[0,"Should you set Cache-Control headers when using Draft Mode?"],"answer":[0,"No, you should not set the Cache-Control header when using Draft Mode because it cannot be bypassed. It's recommended to use ISR instead."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"should-you-set-cache-control-headers-when-using-draft-mode"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-you-set-cache-control-headers-when-using-draft-mode" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-you-set-cache-control-headers-when-using-draft-mode" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should you set Cache-Control headers when using Draft Mode?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, you should not set the Cache-Control header when using Draft Mode because it cannot be bypassed. It's recommended to use ISR instead.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1hGHAo" prefix="r5552" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12978001266032087249"],"question":[0,"What property do you check to see if Draft Mode is currently enabled?"],"answer":[0,"isEnabled - a boolean property returned by draftMode(), accessed as: const { isEnabled } = await draftMode()"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-property-do-you-check-to-see-if-draft-mode-is-currently-enabled"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-property-do-you-check-to-see-if-draft-mode-is-currently-enabled" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-property-do-you-check-to-see-if-draft-mode-is-currently-enabled" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What property do you check to see if Draft Mode is currently enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>isEnabled - a boolean property returned by draftMode(), accessed as: const { isEnabled } = await draftMode()</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16vQJT" prefix="r5553" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13827961143256675323"],"question":[0,"What URL pattern is used to trigger Draft Mode from a headless CMS?"],"answer":[0,"https://<your-site>/api/draft?secret=<token>&slug=<path>"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/draft-mode"]]],"topic":[0,"nextjs"],"slug":[0,"what-url-pattern-is-used-to-trigger-draft-mode-from-a-headless-cms"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-url-pattern-is-used-to-trigger-draft-mode-from-a-headless-cms" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-url-pattern-is-used-to-trigger-draft-mode-from-a-headless-cms" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What URL pattern is used to trigger Draft Mode from a headless CMS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>https://<your-site>/api/draft?secret=<token>&slug=<path></p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/draft-mode" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="loading-ui-and-streaming-deployment-and-platform-support" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Loading UI and Streaming > Deployment and Platform Support</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 19 questions </span> </div> <div class="space-y-4"> <astro-island uid="1H3vrm" prefix="r5554" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"166014942046264373"],"question":[0,"Does Next.js wait for generateMetadata to complete before streaming UI?"],"answer":[0,"Next.js will wait for data fetching inside generateMetadata to complete before streaming UI to the client, guaranteeing the first part of a streamed response includes <head> tags."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"does-next-js-wait-for-generatemetadata-to-complete-before-streaming-ui"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-next-js-wait-for-generatemetadata-to-complete-before-streaming-ui" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-next-js-wait-for-generatemetadata-to-complete-before-streaming-ui" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Next.js wait for generateMetadata to complete before streaming UI?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js will wait for data fetching inside generateMetadata to complete before streaming UI to the client, guaranteeing the first part of a streamed response includes <head> tags.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZIshbU" prefix="r5555" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"539525030621243102"],"question":[0,"For which types of bots does Next.js block page rendering to include metadata in the <head> tag?"],"answer":[0,"For HTML-limited bots that can't execute JavaScript (e.g., facebookexternalhit), metadata continues to block page rendering and is available in the <head> tag."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"for-which-types-of-bots-does-next-js-block-page-rendering-to-include-metadata-in"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="for-which-types-of-bots-does-next-js-block-page-rendering-to-include-metadata-in" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#for-which-types-of-bots-does-next-js-block-page-rendering-to-include-metadata-in" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">For which types of bots does Next.js block page rendering to include metadata in the <head> tag?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>For HTML-limited bots that can't execute JavaScript (e.g., facebookexternalhit), metadata continues to block page rendering and is available in the <head> tag.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2tXb1l" prefix="r5556" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1375100595777362078"],"question":[0,"What nginx configuration header must be set to enable streaming in self-hosted Next.js deployments?"],"answer":[0,"The X-Accel-Buffering header must be set to 'no' to disable nginx's response buffering and enable streaming."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/self-hosting"]]],"topic":[0,"nextjs"],"slug":[0,"what-nginx-configuration-header-must-be-set-to-enable-streaming-in-self-hosted-n"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-nginx-configuration-header-must-be-set-to-enable-streaming-in-self-hosted-n" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-nginx-configuration-header-must-be-set-to-enable-streaming-in-self-hosted-n" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What nginx configuration header must be set to enable streaming in self-hosted Next.js deployments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The X-Accel-Buffering header must be set to 'no' to disable nginx's response buffering and enable streaming.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/self-hosting" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z3l8tS" prefix="r5557" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1614950679635734280"],"question":[0,"What wrapper must be configured in OpenNext to enable AWS Lambda streaming?"],"answer":[0,"You need to set the wrapper to 'aws-lambda-streaming' in the override configuration of your open-next.config.ts file."],"confidence":[0,0.95],"sources":[1,[[0,"https://opennext.js.org/aws/v2/inner_workings/streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-wrapper-must-be-configured-in-opennext-to-enable-aws-lambda-streaming"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-wrapper-must-be-configured-in-opennext-to-enable-aws-lambda-streaming" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-wrapper-must-be-configured-in-opennext-to-enable-aws-lambda-streaming" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What wrapper must be configured in OpenNext to enable AWS Lambda streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You need to set the wrapper to 'aws-lambda-streaming' in the override configuration of your open-next.config.ts file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://opennext.js.org/aws/v2/inner_workings/streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>opennext.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="H9g4G" prefix="r5558" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1619097710311960322"],"question":[0,"Is OpenNext streaming enabled by default for AWS Lambda?"],"answer":[0,"No, streaming is not enabled by default in OpenNext for AWS Lambda. You need to configure the 'aws-lambda-streaming' wrapper in your open-next.config.ts file to enable it."],"confidence":[0,0.95],"sources":[1,[[0,"https://opennext.js.org/aws/v2/inner_workings/streaming"]]],"topic":[0,"nextjs"],"slug":[0,"is-opennext-streaming-enabled-by-default-for-aws-lambda"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-opennext-streaming-enabled-by-default-for-aws-lambda" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-opennext-streaming-enabled-by-default-for-aws-lambda" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is OpenNext streaming enabled by default for AWS Lambda?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, streaming is not enabled by default in OpenNext for AWS Lambda. You need to configure the 'aws-lambda-streaming' wrapper in your open-next.config.ts file to enable it.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://opennext.js.org/aws/v2/inner_workings/streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>opennext.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2eh9Fa" prefix="r5559" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1817290463264326532"],"question":[0,"Does the @cloudflare/next-on-pages adapter support the Node.js runtime?"],"answer":[0,"No, @cloudflare/next-on-pages only supports the Edge runtime. The @opennextjs/cloudflare adapter supports the Node.js runtime from Next.js."],"confidence":[0,0.95],"sources":[1,[[0,"https://opennext.js.org/cloudflare"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-cloudflare-next-on-pages-adapter-support-the-node-js-runtime"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-cloudflare-next-on-pages-adapter-support-the-node-js-runtime" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-cloudflare-next-on-pages-adapter-support-the-node-js-runtime" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the @cloudflare/next-on-pages adapter support the Node.js runtime?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, @cloudflare/next-on-pages only supports the Edge runtime. The @opennextjs/cloudflare adapter supports the Node.js runtime from Next.js.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://opennext.js.org/cloudflare" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>opennext.js.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z5hzyB" prefix="r5560" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2128974561593349994"],"question":[0,"What is the browser buffering threshold that may delay streaming display?"],"answer":[0,"Some browsers buffer streaming responses and may not display streamed content until the response exceeds 1024 bytes. This typically only affects 'hello world' applications."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-browser-buffering-threshold-that-may-delay-streaming-display"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-browser-buffering-threshold-that-may-delay-streaming-display" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-browser-buffering-threshold-that-may-delay-streaming-display" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the browser buffering threshold that may delay streaming display?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some browsers buffer streaming responses and may not display streamed content until the response exceeds 1024 bytes. This typically only affects 'hello world' applications.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2w39Cu" prefix="r5561" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4083665195327034776"],"question":[0,"Where does Next.js append metadata tags when using streaming metadata?"],"answer":[0,"When using streaming metadata, Next.js appends the resulting metadata tags to the <body> tag after generateMetadata resolves."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/metadata-and-og-images"]]],"topic":[0,"nextjs"],"slug":[0,"where-does-next-js-append-metadata-tags-when-using-streaming-metadata"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-does-next-js-append-metadata-tags-when-using-streaming-metadata" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-does-next-js-append-metadata-tags-when-using-streaming-metadata" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where does Next.js append metadata tags when using streaming metadata?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using streaming metadata, Next.js appends the resulting metadata tags to the <body> tag after generateMetadata resolves.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/metadata-and-og-images" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16ex1H" prefix="r5562" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4195556579259086432"],"question":[0,"What HTTP status code is returned when streaming begins in Next.js?"],"answer":[0,"A 200 status code is returned when streaming begins to signal that the request was successful, even if errors occur later in the stream."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/56235"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-is-returned-when-streaming-begins-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-is-returned-when-streaming-begins-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-is-returned-when-streaming-begins-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code is returned when streaming begins in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A 200 status code is returned when streaming begins to signal that the request was successful, even if errors occur later in the stream.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/56235" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zt0LIq" prefix="r5563" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4599586672715157068"],"question":[0,"Does specifying a custom htmlLimitedBots config override Next.js's default bot list?"],"answer":[0,"Yes, specifying a htmlLimitedBots config will override the Next.js default list entirely. This is advanced behavior, and the default should be sufficient for most cases."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots"]]],"topic":[0,"nextjs"],"slug":[0,"does-specifying-a-custom-htmllimitedbots-config-override-next-js-s-default-bot-l"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-specifying-a-custom-htmllimitedbots-config-override-next-js-s-default-bot-l" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-specifying-a-custom-htmllimitedbots-config-override-next-js-s-default-bot-l" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does specifying a custom htmlLimitedBots config override Next.js's default bot list?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, specifying a htmlLimitedBots config will override the Next.js default list entirely. This is advanced behavior, and the default should be sufficient for most cases.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IizJg" prefix="r5564" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6166888312498901004"],"question":[0,"Is streaming enabled by default for Node.js Vercel Functions?"],"answer":[0,"Yes, streaming is now enabled by default for all Vercel Functions running on Node.js for Pro and Enterprise teams."],"confidence":[0,0.95],"sources":[1,[[0,"https://vercel.com/changelog/streaming-now-enabled-by-default-for-all-node-js-vercel-functions"]]],"topic":[0,"nextjs"],"slug":[0,"is-streaming-enabled-by-default-for-node-js-vercel-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-streaming-enabled-by-default-for-node-js-vercel-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-streaming-enabled-by-default-for-node-js-vercel-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is streaming enabled by default for Node.js Vercel Functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, streaming is now enabled by default for all Vercel Functions running on Node.js for Pro and Enterprise teams.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://vercel.com/changelog/streaming-now-enabled-by-default-for-all-node-js-vercel-functions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>vercel.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Yi58c" prefix="r5565" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6197782042002975921"],"question":[0,"What command creates a new Next.js app pre-configured for Cloudflare Workers?"],"answer":[0,"npm create cloudflare@latest -- my-next-app --framework=next --platform=workers"],"confidence":[0,0.95],"sources":[1,[[0,"https://developers.cloudflare.com/pages/framework-guides/nextjs/"]]],"topic":[0,"nextjs"],"slug":[0,"what-command-creates-a-new-next-js-app-pre-configured-for-cloudflare-workers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-command-creates-a-new-next-js-app-pre-configured-for-cloudflare-workers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-command-creates-a-new-next-js-app-pre-configured-for-cloudflare-workers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What command creates a new Next.js app pre-configured for Cloudflare Workers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>npm create cloudflare@latest -- my-next-app --framework=next --platform=workers</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developers.cloudflare.com/pages/framework-guides/nextjs/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developers.cloudflare.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuKRl8" prefix="r5566" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8056678710711415275"],"question":[0,"In which Next.js version was the loading.js file convention introduced?"],"answer":[0,"The loading.js convention was introduced in version 13.0.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-loading-js-file-convention-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-loading-js-file-convention-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-loading-js-file-convention-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the loading.js file convention introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The loading.js convention was introduced in version 13.0.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Cj3yY" prefix="r5567" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10438542298530878046"],"question":[0,"In which Next.js version was the htmlLimitedBots configuration option introduced?"],"answer":[0,"The htmlLimitedBots option was introduced in version 15.2.0."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-next-js-version-was-the-htmllimitedbots-configuration-option-introduced"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-next-js-version-was-the-htmllimitedbots-configuration-option-introduced" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-next-js-version-was-the-htmllimitedbots-configuration-option-introduced" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which Next.js version was the htmlLimitedBots configuration option introduced?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The htmlLimitedBots option was introduced in version 15.2.0.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z7e5nf" prefix="r5568" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11162352134161541329"],"question":[0,"Can notFound() or redirect() change the HTTP status code when called from generateMetadata() during streaming?"],"answer":[0,"No, when streaming metadata in Next.js 15+, calling notFound() or redirect() from generateMetadata() will return a 200 response code because response headers have already been sent."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/82041"]]],"topic":[0,"nextjs"],"slug":[0,"can-notfound-or-redirect-change-the-http-status-code-when-called-from-generateme"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-notfound-or-redirect-change-the-http-status-code-when-called-from-generateme" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-notfound-or-redirect-change-the-http-status-code-when-called-from-generateme" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can notFound() or redirect() change the HTTP status code when called from generateMetadata() during streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, when streaming metadata in Next.js 15+, calling notFound() or redirect() from generateMetadata() will return a 200 response code because response headers have already been sent.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/82041" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GVdjl" prefix="r5569" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11580729765532515938"],"question":[0,"Which bots are included in Next.js's default list of HTML-limited bots?"],"answer":[0,"The default list includes Google crawlers (Mediapartners-Google, AdsBot-Google, Google-PageRenderer), Bingbot, Twitterbot, and Slackbot."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots"]]],"topic":[0,"nextjs"],"slug":[0,"which-bots-are-included-in-next-js-s-default-list-of-html-limited-bots"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-bots-are-included-in-next-js-s-default-list-of-html-limited-bots" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-bots-are-included-in-next-js-s-default-list-of-html-limited-bots" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which bots are included in Next.js's default list of HTML-limited bots?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default list includes Google crawlers (Mediapartners-Google, AdsBot-Google, Google-PageRenderer), Bingbot, Twitterbot, and Slackbot.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/htmlLimitedBots" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18mtm2" prefix="r5570" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11834843342494750336"],"question":[0,"What is the recommended way to deploy Next.js to Cloudflare for full streaming support?"],"answer":[0,"Use the OpenNext Cloudflare adapter with Cloudflare Workers. The @cloudflare/next-on-pages package is deprecated, and OpenNext provides full support for App Router, ISR, and other server-side features."],"confidence":[0,0.95],"sources":[1,[[0,"https://developers.cloudflare.com/pages/framework-guides/nextjs/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-way-to-deploy-next-js-to-cloudflare-for-full-streaming-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-way-to-deploy-next-js-to-cloudflare-for-full-streaming-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-way-to-deploy-next-js-to-cloudflare-for-full-streaming-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended way to deploy Next.js to Cloudflare for full streaming support?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the OpenNext Cloudflare adapter with Cloudflare Workers. The @cloudflare/next-on-pages package is deprecated, and OpenNext provides full support for App Router, ISR, and other server-side features.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://developers.cloudflare.com/pages/framework-guides/nextjs/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>developers.cloudflare.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lXCMe" prefix="r5571" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12883123787745942800"],"question":[0,"What is the size limit range for code executed in the Edge Runtime on Vercel?"],"answer":[0,"Code executed in the Edge Runtime on Vercel cannot exceed between 1 MB and 4 MB, including imported packages, fonts and files, varying by deployment infrastructure."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-size-limit-range-for-code-executed-in-the-edge-runtime-on-vercel"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-size-limit-range-for-code-executed-in-the-edge-runtime-on-vercel" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-size-limit-range-for-code-executed-in-the-edge-runtime-on-vercel" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the size limit range for code executed in the Edge Runtime on Vercel?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Code executed in the Edge Runtime on Vercel cannot exceed between 1 MB and 4 MB, including imported packages, fonts and files, varying by deployment infrastructure.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZWWBad" prefix="r5572" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14299435182127198921"],"question":[0,"Do Azure Static Web Apps support streaming for Next.js hybrid applications?"],"answer":[0,"No, streaming and Suspense do not work as expected on Azure Static Web Apps because the Azure Functions used behind the scenes don't support streaming."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/Azure/static-web-apps/issues/1473"]]],"topic":[0,"nextjs"],"slug":[0,"do-azure-static-web-apps-support-streaming-for-next-js-hybrid-applications"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-azure-static-web-apps-support-streaming-for-next-js-hybrid-applications" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-azure-static-web-apps-support-streaming-for-next-js-hybrid-applications" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Azure Static Web Apps support streaming for Next.js hybrid applications?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, streaming and Suspense do not work as expected on Azure Static Web Apps because the Azure Functions used behind the scenes don't support streaming.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/Azure/static-web-apps/issues/1473" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="forms-and-mutations-invocation-methods" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Forms and Mutations > Invocation Methods</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 19 questions </span> </div> <div class="space-y-4"> <astro-island uid="1q6v3c" prefix="r5573" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"215073803289799224"],"question":[0,"What are the three primary methods to invoke Server Actions in Next.js?"],"answer":[0,"1) Using the `action` prop on `<form>` elements, 2) Using the `formAction` prop on `<button>`, `<input type=\"submit\">`, and `<input type=\"image\">` elements, 3) Custom invocation with `startTransition` (though this disables Progressive Enhancement)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-primary-methods-to-invoke-server-actions-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-primary-methods-to-invoke-server-actions-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-primary-methods-to-invoke-server-actions-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three primary methods to invoke Server Actions in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Using the <code>action</code> prop on <code><form></code> elements, 2) Using the <code>formAction</code> prop on <code><button></code>, <code><input type="submit"></code>, and <code><input type="image"></code> elements, 3) Custom invocation with <code>startTransition</code> (though this disables Progressive Enhancement).</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="aax7k" prefix="r5574" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2746322283326536701"],"question":[0,"Which HTML elements support the `formAction` prop for Server Actions?"],"answer":[0,"`<button>`, `<input type=\"submit\">`, and `<input type=\"image\">` elements support the `formAction` prop."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"which-html-elements-support-the-formaction-prop-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-html-elements-support-the-formaction-prop-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-html-elements-support-the-formaction-prop-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which HTML elements support the `formAction` prop for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p><code><button></code>, <code><input type="submit"></code>, and <code><input type="image"></code> elements support the <code>formAction</code> prop.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1TiqOx" prefix="r5575" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4441047684076801663"],"question":[0,"Can you use `formAction` to have multiple different Server Actions in the same form?"],"answer":[0,"Yes, the `formAction` prop allows you to have multiple different Server Actions triggered from the same form, depending on which button the user clicks. This is useful for scenarios like having both 'Save Draft' and 'Publish' buttons in the same form."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-use-formaction-to-have-multiple-different-server-actions-in-the-same-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-use-formaction-to-have-multiple-different-server-actions-in-the-same-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-use-formaction-to-have-multiple-different-server-actions-in-the-same-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you use `formAction` to have multiple different Server Actions in the same form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the <code>formAction</code> prop allows you to have multiple different Server Actions triggered from the same form, depending on which button the user clicks. This is useful for scenarios like having both 'Save Draft' and 'Publish' buttons in the same form.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1WJ1xh" prefix="r5576" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4594272291406902503"],"question":[0,"What HTTP method do Next.js Server Actions use behind the scenes?"],"answer":[0,"Server Actions use the POST method behind the scenes, and only this HTTP method can invoke them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-method-do-next-js-server-actions-use-behind-the-scenes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-method-do-next-js-server-actions-use-behind-the-scenes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-method-do-next-js-server-actions-use-behind-the-scenes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP method do Next.js Server Actions use behind the scenes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions use the POST method behind the scenes, and only this HTTP method can invoke them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2quYVw" prefix="r5577" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5505416700304391419"],"question":[0,"How does using `useActionState` change the Server Action function signature?"],"answer":[0,"When using `useActionState`, the Server Action function signature is modified to receive `prevState` as the first parameter before `FormData`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-using-useactionstate-change-the-server-action-function-signature"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-using-useactionstate-change-the-server-action-function-signature" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-using-useactionstate-change-the-server-action-function-signature" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does using `useActionState` change the Server Action function signature?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using <code>useActionState</code>, the Server Action function signature is modified to receive <code>prevState</code> as the first parameter before <code>FormData</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z14vwD9" prefix="r5578" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5548149871310856900"],"question":[0,"How do Client Components handle form submissions with Server Actions when JavaScript isn't loaded yet?"],"answer":[0,"In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-client-components-handle-form-submissions-with-server-actions-when-javasc"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-client-components-handle-form-submissions-with-server-actions-when-javasc" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-client-components-handle-form-submissions-with-server-actions-when-javasc" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do Client Components handle form submissions with Server Actions when JavaScript isn't loaded yet?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1yRkNX" prefix="r5579" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8095127609463170729"],"question":[0,"Where must the component calling `useFormStatus` be located in relation to the form?"],"answer":[0,"The component calling `useFormStatus` must be a child of the `<form>` element. It will not return status information for any `<form>` rendered in the same component or children components."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-component-calling-useformstatus-be-located-in-relation-to-the-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-component-calling-useformstatus-be-located-in-relation-to-the-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-component-calling-useformstatus-be-located-in-relation-to-the-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the component calling `useFormStatus` be located in relation to the form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The component calling <code>useFormStatus</code> must be a child of the <code><form></code> element. It will not return status information for any <code><form></code> rendered in the same component or children components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1IM1aU" prefix="r5580" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8820403631133221378"],"question":[0,"Does using `startTransition` to invoke Server Actions support Progressive Enhancement?"],"answer":[0,"No, invoking Server Actions with `startTransition` disables Progressive Enhancement."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-using-starttransition-to-invoke-server-actions-support-progressive-enhancem" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does using `startTransition` to invoke Server Actions support Progressive Enhancement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, invoking Server Actions with <code>startTransition</code> disables Progressive Enhancement.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZAHhTl" prefix="r5581" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9620232160705559299"],"question":[0,"What is the correct syntax for using `startTransition` with a Server Action?"],"answer":[0,"The correct syntax wraps the server action in a callback: `startTransition(() => addItem(id))` rather than calling it directly like `startTransition(addItem(id))`, which produces a TypeError."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/49420"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-correct-syntax-for-using-starttransition-with-a-server-action"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-correct-syntax-for-using-starttransition-with-a-server-action" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-correct-syntax-for-using-starttransition-with-a-server-action" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the correct syntax for using `startTransition` with a Server Action?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The correct syntax wraps the server action in a callback: <code>startTransition(() => addItem(id))</code> rather than calling it directly like <code>startTransition(addItem(id))</code>, which produces a TypeError.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/49420" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2l8gIr" prefix="r5582" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9969687791062842529"],"question":[0,"What does a Server Action automatically receive when invoked in a form?"],"answer":[0,"When invoked in a form, a Server Action automatically receives the FormData object containing all form field values."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-a-server-action-automatically-receive-when-invoked-in-a-form"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-a-server-action-automatically-receive-when-invoked-in-a-form" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-a-server-action-automatically-receive-when-invoked-in-a-form" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does a Server Action automatically receive when invoked in a form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When invoked in a form, a Server Action automatically receives the FormData object containing all form field values.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1gXQJa" prefix="r5583" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10006519063945551166"],"question":[0,"What extra properties are included when using `Object.fromEntries(formData)` in Next.js Server Actions?"],"answer":[0,"When using `Object.fromEntries(formData)`, the resulting object will contain extra properties prefixed with `$ACTION_`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-extra-properties-are-included-when-using-object-fromentries-formdata-in-nex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-extra-properties-are-included-when-using-object-fromentries-formdata-in-nex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-extra-properties-are-included-when-using-object-fromentries-formdata-in-nex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What extra properties are included when using `Object.fromEntries(formData)` in Next.js Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using <code>Object.fromEntries(formData)</code>, the resulting object will contain extra properties prefixed with <code>$ACTION_</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2u2YQo" prefix="r5584" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10090856769350444050"],"question":[0,"Must Server Action functions be asynchronous?"],"answer":[0,"Yes, Server Action functions must be asynchronous to support network requests."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"must-server-action-functions-be-asynchronous"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-server-action-functions-be-asynchronous" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-server-action-functions-be-asynchronous" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must Server Action functions be asynchronous?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Action functions must be asynchronous to support network requests.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="YQCDo" prefix="r5585" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10596313923151793211"],"question":[0,"Can you define inline Server Actions inside a Client Component?"],"answer":[0,"No, it's not possible to define Server Actions in Client Components. Client Components can only import actions from a separate file that uses the module-level 'use server' directive."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-define-inline-server-actions-inside-a-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-define-inline-server-actions-inside-a-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-define-inline-server-actions-inside-a-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you define inline Server Actions inside a Client Component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, it's not possible to define Server Actions in Client Components. Client Components can only import actions from a separate file that uses the module-level 'use server' directive.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="I1M71" prefix="r5586" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10689331131861357707"],"question":[0,"What values does `useFormStatus` return when there is no active form submission?"],"answer":[0,"When there is no active submission: `pending` returns `false`, `data` returns `null`, and `action` returns `null`."],"confidence":[0,0.95],"sources":[1,[[0,"https://react.dev/reference/react-dom/hooks/useFormStatus"]]],"topic":[0,"nextjs"],"slug":[0,"what-values-does-useformstatus-return-when-there-is-no-active-form-submission"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-values-does-useformstatus-return-when-there-is-no-active-form-submission" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-values-does-useformstatus-return-when-there-is-no-active-form-submission" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What values does `useFormStatus` return when there is no active form submission?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When there is no active submission: <code>pending</code> returns <code>false</code>, <code>data</code> returns <code>null</code>, and <code>action</code> returns <code>null</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://react.dev/reference/react-dom/hooks/useFormStatus" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>react.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1YbFkl" prefix="r5587" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11147033789077954065"],"question":[0,"Do Server Components support progressive enhancement for forms with Server Actions?"],"answer":[0,"Yes, Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"do-server-components-support-progressive-enhancement-for-forms-with-server-actio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-server-components-support-progressive-enhancement-for-forms-with-server-actio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-server-components-support-progressive-enhancement-for-forms-with-server-actio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do Server Components support progressive enhancement for forms with Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="H1E66" prefix="r5588" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12375630612750305615"],"question":[0,"What are the parameters and return values of the `useActionState` hook?"],"answer":[0,"useActionState takes two parameters: a Server Action function and an initial state value. It returns a tuple of three values: `[state, action, pending]` where `state` is the current state, `action` is the function to invoke, and `pending` is a boolean indicating if the action is executing."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-parameters-and-return-values-of-the-useactionstate-hook"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-parameters-and-return-values-of-the-useactionstate-hook" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-parameters-and-return-values-of-the-useactionstate-hook" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the parameters and return values of the `useActionState` hook?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState takes two parameters: a Server Action function and an initial state value. It returns a tuple of three values: <code>[state, action, pending]</code> where <code>state</code> is the current state, <code>action</code> is the function to invoke, and <code>pending</code> is a boolean indicating if the action is executing.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z24W4bQ" prefix="r5589" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13875772526983314995"],"question":[0,"Can Server Actions be invoked from `useEffect`?"],"answer":[0,"Yes, Server Actions can be invoked from `useEffect` when the component mounts or a dependency changes. This is useful for mutations that depend on global events or need to be triggered automatically."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-invoked-from-useeffect"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-invoked-from-useeffect" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-invoked-from-useeffect" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be invoked from `useEffect`?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Server Actions can be invoked from <code>useEffect</code> when the component mounts or a dependency changes. This is useful for mutations that depend on global events or need to be triggered automatically.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2hrPTT" prefix="r5590" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13884774359854318896"],"question":[0,"Are Server Actions executed in parallel or sequentially when multiple are invoked?"],"answer":[0,"Server Actions are executed sequentially (one at a time). The client currently dispatches and awaits them one at a time."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-actions-executed-in-parallel-or-sequentially-when-multiple-are-invoke"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-actions-executed-in-parallel-or-sequentially-when-multiple-are-invoke" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-actions-executed-in-parallel-or-sequentially-when-multiple-are-invoke" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Actions executed in parallel or sequentially when multiple are invoked?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions are executed sequentially (one at a time). The client currently dispatches and awaits them one at a time.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VjnFD" prefix="r5591" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14904094996683255896"],"question":[0,"What method can be used to programmatically trigger form submission for Server Actions?"],"answer":[0,"The `requestSubmit()` method can be used to programmatically trigger form submission, such as when implementing keyboard shortcuts like Cmd/Ctrl + Enter."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/forms"]]],"topic":[0,"nextjs"],"slug":[0,"what-method-can-be-used-to-programmatically-trigger-form-submission-for-server-a"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-method-can-be-used-to-programmatically-trigger-form-submission-for-server-a" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-method-can-be-used-to-programmatically-trigger-form-submission-for-server-a" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What method can be used to programmatically trigger form submission for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>requestSubmit()</code> method can be used to programmatically trigger form submission, such as when implementing keyboard shortcuts like Cmd/Ctrl + Enter.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/forms" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="loading-ui-and-streaming-loading-state-implementation" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Loading UI and Streaming > Loading State Implementation</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 19 questions </span> </div> <div class="space-y-4"> <astro-island uid="JrFqf" prefix="r5592" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"380066267667671863"],"question":[0,"Is loading.js supported with Next.js static export?"],"answer":[0,"The official documentation does not list loading.js or streaming as unsupported features for static export, though streaming functionality requires server capabilities that static exports cannot provide."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/static-exports"]]],"topic":[0,"nextjs"],"slug":[0,"is-loading-js-supported-with-next-js-static-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-loading-js-supported-with-next-js-static-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-loading-js-supported-with-next-js-static-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is loading.js supported with Next.js static export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The official documentation does not list loading.js or streaming as unsupported features for static export, though streaming functionality requires server capabilities that static exports cannot provide.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/static-exports" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="UGWhP" prefix="r5593" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2344580714086495235"],"question":[0,"What are the exact supported file names for the loading file convention in Next.js?"],"answer":[0,"loading.js, loading.jsx, loading.ts, and loading.tsx are all supported file extensions for the loading file convention."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-exact-supported-file-names-for-the-loading-file-convention-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-exact-supported-file-names-for-the-loading-file-convention-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-exact-supported-file-names-for-the-loading-file-convention-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the exact supported file names for the loading file convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>loading.js, loading.jsx, loading.ts, and loading.tsx are all supported file extensions for the loading file convention.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JalqU" prefix="r5594" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2696457272133318954"],"question":[0,"Where should you place notFound() to ensure a proper 404 status code instead of 200 when streaming?"],"answer":[0,"Place notFound() before Suspense boundaries (such as loading.tsx) and before any await that may suspend, so the check runs before the response body starts streaming."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"where-should-you-place-notfound-to-ensure-a-proper-404-status-code-instead-of-20"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-should-you-place-notfound-to-ensure-a-proper-404-status-code-instead-of-20" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-should-you-place-notfound-to-ensure-a-proper-404-status-code-instead-of-20" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where should you place notFound() to ensure a proper 404 status code instead of 200 when streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Place notFound() before Suspense boundaries (such as loading.tsx) and before any await that may suspend, so the check runs before the response body starts streaming.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zm0sMt" prefix="r5595" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5374008162663393761"],"question":[0,"Does generateMetadata always block the stream in Next.js?"],"answer":[0,"No. generateMetadata will not always block the stream. That isn't part of its API and relying on it is relying on an underlying implementation detail. In the future Next.js may sometimes delay sending metadata to get visual content to the user sooner."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"does-generatemetadata-always-block-the-stream-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-generatemetadata-always-block-the-stream-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-generatemetadata-always-block-the-stream-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does generateMetadata always block the stream in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. generateMetadata will not always block the stream. That isn't part of its API and relying on it is relying on an underlying implementation detail. In the future Next.js may sometimes delay sending metadata to get visual content to the user sooner.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="HPy6f" prefix="r5596" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5577031763961001522"],"question":[0,"What are the two ways to implement streaming in Next.js?"],"answer":[0,"At the page level with the loading.tsx file (which creates <Suspense> for you automatically), and at the component level with <Suspense> for more granular control."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-ways-to-implement-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-ways-to-implement-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-ways-to-implement-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two ways to implement streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>At the page level with the loading.tsx file (which creates <Suspense> for you automatically), and at the component level with <Suspense> for more granular control.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1zWaUr" prefix="r5597" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6715823336253874326"],"question":[0,"What is the minimum response size threshold before some browsers display streamed content?"],"answer":[0,"Some browsers buffer a streaming response, and you may not see the streamed response until the response exceeds 1024 bytes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-minimum-response-size-threshold-before-some-browsers-display-streame"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-minimum-response-size-threshold-before-some-browsers-display-streame" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-minimum-response-size-threshold-before-some-browsers-display-streame" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the minimum response size threshold before some browsers display streamed content?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Some browsers buffer a streaming response, and you may not see the streamed response until the response exceeds 1024 bytes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZhqAl1" prefix="r5598" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7908967184040435835"],"question":[0,"What must a loading.js file export?"],"answer":[0,"The file must export a default component: export default function Loading() { ... }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-must-a-loading-js-file-export"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-must-a-loading-js-file-export" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-must-a-loading-js-file-export" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What must a loading.js file export?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The file must export a default component: export default function Loading() { ... }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z23t5nM" prefix="r5599" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8076857597949703964"],"question":[0,"Does the loading.js component accept any parameters or props?"],"answer":[0,"No. Loading UI components do not accept any parameters."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-loading-js-component-accept-any-parameters-or-props"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-loading-js-component-accept-any-parameters-or-props" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-loading-js-component-accept-any-parameters-or-props" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the loading.js component accept any parameters or props?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Loading UI components do not accept any parameters.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2nFWIG" prefix="r5600" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10529003317050956267"],"question":[0,"How does Next.js handle SEO for 404 errors when streaming returns a 200 status code?"],"answer":[0,"Next.js automatically injects <meta name=\"robots\" content=\"noindex\" /> within streamed HTML to prevent indexation despite 200 status codes."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-next-js-handle-seo-for-404-errors-when-streaming-returns-a-200-status-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-next-js-handle-seo-for-404-errors-when-streaming-returns-a-200-status-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-next-js-handle-seo-for-404-errors-when-streaming-returns-a-200-status-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does Next.js handle SEO for 404 errors when streaming returns a 200 status code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js automatically injects <meta name="robots" content="noindex" /> within streamed HTML to prevent indexation despite 200 status codes.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1oNnvm" prefix="r5601" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11270370864227269597"],"question":[0,"When does the response body start streaming in Next.js?"],"answer":[0,"The response body starts streaming when a Suspense fallback renders (for example, a loading.tsx) or when a Server Component suspends under a Suspense boundary."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-the-response-body-start-streaming-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-the-response-body-start-streaming-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-the-response-body-start-streaming-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does the response body start streaming in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The response body starts streaming when a Suspense fallback renders (for example, a loading.tsx) or when a Server Component suspends under a Suspense boundary.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GwSD9" prefix="r5602" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11366157725342136193"],"question":[0,"Can you change the HTTP status code after streaming has started in Next.js?"],"answer":[0,"No. It is not possible to change the status code after streaming started because the response headers have already been sent to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-change-the-http-status-code-after-streaming-has-started-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-change-the-http-status-code-after-streaming-has-started-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-change-the-http-status-code-after-streaming-has-started-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you change the HTTP status code after streaming has started in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It is not possible to change the status code after streaming started because the response headers have already been sent to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1b0ALA" prefix="r5603" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12059110290353771547"],"question":[0,"What is the difference between loading.js behavior in layouts versus templates during navigation?"],"answer":[0,"Suspense boundaries inside layouts only show the fallback the first time the Layout is loaded and not when switching pages. For templates, the fallback is shown on each navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-loading-js-behavior-in-layouts-versus-templates-d"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-loading-js-behavior-in-layouts-versus-templates-d" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-loading-js-behavior-in-layouts-versus-templates-d" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between loading.js behavior in layouts versus templates during navigation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Suspense boundaries inside layouts only show the fallback the first time the Layout is loaded and not when switching pages. For templates, the fallback is shown on each navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z6w9m7" prefix="r5604" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12726711311077627642"],"question":[0,"Is navigation interruptible when using loading.js in Next.js?"],"answer":[0,"Yes. Navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load before navigating to another route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"is-navigation-interruptible-when-using-loading-js-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-navigation-interruptible-when-using-loading-js-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-navigation-interruptible-when-using-loading-js-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is navigation interruptible when using loading.js in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load before navigating to another route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="7PfiW" prefix="r5605" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13200183849078143065"],"question":[0,"What should you implement instead of generic 'Loading...' text in loading.js?"],"answer":[0,"You should implement actual loading skeletons. You can pre-render loading indicators such as skeletons and spinners, or a small but meaningful part of future screens such as a cover photo, title, etc."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-should-you-implement-instead-of-generic-loading-text-in-loading-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-should-you-implement-instead-of-generic-loading-text-in-loading-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-should-you-implement-instead-of-generic-loading-text-in-loading-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What should you implement instead of generic 'Loading...' text in loading.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should implement actual loading skeletons. You can pre-render loading indicators such as skeletons and spinners, or a small but meaningful part of future screens such as a cover photo, title, etc.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2km4ku" prefix="r5606" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13269144648798351879"],"question":[0,"What is the recommended approach for using loading.js according to Next.js documentation?"],"answer":[0,"Use the loading.js convention for route segments (layouts and pages) as Next.js optimizes this functionality."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-approach-for-using-loading-js-according-to-next-js-docum"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-approach-for-using-loading-js-according-to-next-js-docum" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-approach-for-using-loading-js-according-to-next-js-docum" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended approach for using loading.js according to Next.js documentation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the loading.js convention for route segments (layouts and pages) as Next.js optimizes this functionality.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZurrnJ" prefix="r5607" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13281830285387775744"],"question":[0,"Can you manually create Suspense boundaries in addition to using loading.js?"],"answer":[0,"Yes. In addition to loading.js, you can also manually create Suspense Boundaries for your own UI components. The App Router supports streaming with Suspense."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming"]]],"topic":[0,"nextjs"],"slug":[0,"can-you-manually-create-suspense-boundaries-in-addition-to-using-loading-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-you-manually-create-suspense-boundaries-in-addition-to-using-loading-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-you-manually-create-suspense-boundaries-in-addition-to-using-loading-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can you manually create Suspense boundaries in addition to using loading.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. In addition to loading.js, you can also manually create Suspense Boundaries for your own UI components. The App Router supports streaming with Suspense.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2umBXt" prefix="r5608" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13931512023637347502"],"question":[0,"What HTTP status code does Next.js return when streaming with loading.js?"],"answer":[0,"When streaming, a 200 status code will be returned to signal that the request was successful. The server can still communicate errors or issues to the client within the streamed content itself."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"what-http-status-code-does-next-js-return-when-streaming-with-loading-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-http-status-code-does-next-js-return-when-streaming-with-loading-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-http-status-code-does-next-js-return-when-streaming-with-loading-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTTP status code does Next.js return when streaming with loading.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When streaming, a 200 status code will be returned to signal that the request was successful. The server can still communicate errors or issues to the client within the streamed content itself.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16w7l3" prefix="r5609" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14287131058317983901"],"question":[0,"When is the loading UI embedded and sent in Next.js streaming?"],"answer":[0,"The loading UI will be embedded as part of the static file, and sent first, ensuring immediate visual feedback before streaming dynamic content."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/streaming"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-loading-ui-embedded-and-sent-in-next-js-streaming"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-loading-ui-embedded-and-sent-in-next-js-streaming" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-loading-ui-embedded-and-sent-in-next-js-streaming" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the loading UI embedded and sent in Next.js streaming?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The loading UI will be embedded as part of the static file, and sent first, ensuring immediate visual feedback before streaming dynamic content.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/streaming" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2jqlER" prefix="r5610" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14725501411293609807"],"question":[0,"Are shared layouts interactive while new route segments with loading.js are loading?"],"answer":[0,"Yes. Shared layouts remain interactive while new route segments load, and navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/loading"]]],"topic":[0,"nextjs"],"slug":[0,"are-shared-layouts-interactive-while-new-route-segments-with-loading-js-are-load"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-shared-layouts-interactive-while-new-route-segments-with-loading-js-are-load" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-shared-layouts-interactive-while-new-route-segments-with-loading-js-are-load" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are shared layouts interactive while new route segments with loading.js are loading?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Shared layouts remain interactive while new route segments load, and navigation is interruptible, meaning changing routes does not need to wait for the content of the route to fully load.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/loading" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="error-handling-error-boundary-hierarchy" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Error Handling > Error Boundary Hierarchy</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 19 questions </span> </div> <div class="space-y-4"> <astro-island uid="1uHP4V" prefix="r5611" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1534315953113367733"],"question":[0,"What scope does an error.js file handle errors for?"],"answer":[0,"An error.js file wraps a route segment and its nested children in a React Error Boundary. An error.js file will handle errors for all its nested child segments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-scope-does-an-error-js-file-handle-errors-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-scope-does-an-error-js-file-handle-errors-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-scope-does-an-error-js-file-handle-errors-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What scope does an error.js file handle errors for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>An error.js file wraps a route segment and its nested children in a React Error Boundary. An error.js file will handle errors for all its nested child segments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1CgCJ6" prefix="r5612" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1929238050464184543"],"question":[0,"What is the error.digest property used for?"],"answer":[0,"The digest property contains an automatically generated hash of the error that can be used to match the corresponding error in server-side logs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-error-digest-property-used-for"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-error-digest-property-used-for" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-error-digest-property-used-for" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the error.digest property used for?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The digest property contains an automatically generated hash of the error that can be used to match the corresponding error in server-side logs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZjQ216" prefix="r5613" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2041371153029455506"],"question":[0,"What happens to layouts above an error boundary when an error occurs?"],"answer":[0,"When the fallback error component is active, layouts above the error boundary maintain their state and remain interactive, and the error component can display functionality to recover from the error."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-layouts-above-an-error-boundary-when-an-error-occurs"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-layouts-above-an-error-boundary-when-an-error-occurs" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-layouts-above-an-error-boundary-when-an-error-occurs" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to layouts above an error boundary when an error occurs?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When the fallback error component is active, layouts above the error boundary maintain their state and remain interactive, and the error component can display functionality to recover from the error.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bQQJ4" prefix="r5614" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2047544682254057390"],"question":[0,"Must error.js files be Client Components?"],"answer":[0,"Yes. Error boundaries must be Client Components, which means they require the 'use client' directive at the top of the file."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"must-error-js-files-be-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-error-js-files-be-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-error-js-files-be-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must error.js files be Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Error boundaries must be Client Components, which means they require the 'use client' directive at the top of the file.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1oEJlJ" prefix="r5615" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2230135878118813659"],"question":[0,"How can you intentionally make an error bubble up to the parent error boundary?"],"answer":[0,"If you want errors to bubble up to the parent error boundary, you can throw when rendering the error component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-intentionally-make-an-error-bubble-up-to-the-parent-error-boundary"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-intentionally-make-an-error-bubble-up-to-the-parent-error-boundary" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-intentionally-make-an-error-bubble-up-to-the-parent-error-boundary" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you intentionally make an error bubble up to the parent error boundary?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>If you want errors to bubble up to the parent error boundary, you can throw when rendering the error component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2t1DkA" prefix="r5616" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4580504978055747054"],"question":[0,"Can the root app/error.js file catch errors thrown in the root app/layout.js or app/template.js?"],"answer":[0,"No. The root app/error.js boundary does not catch errors thrown in the root app/layout.js or app/template.js component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"can-the-root-app-error-js-file-catch-errors-thrown-in-the-root-app-layout-js-or-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-the-root-app-error-js-file-catch-errors-thrown-in-the-root-app-layout-js-or-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-the-root-app-error-js-file-catch-errors-thrown-in-the-root-app-layout-js-or-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can the root app/error.js file catch errors thrown in the root app/layout.js or app/template.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. The root app/error.js boundary does not catch errors thrown in the root app/layout.js or app/template.js component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZC9B" prefix="r5617" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4844306573447086568"],"question":[0,"What does the reset function do in an error.js component?"],"answer":[0,"When executed, the reset function will try to re-render the Error boundary's contents. If successful, the fallback error component is replaced with the result of the re-render."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-the-reset-function-do-in-an-error-js-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-the-reset-function-do-in-an-error-js-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-the-reset-function-do-in-an-error-js-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does the reset function do in an error.js component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When executed, the reset function will try to re-render the Error boundary's contents. If successful, the fallback error component is replaced with the result of the re-render.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z17gdNO" prefix="r5618" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5650416321453057682"],"question":[0,"Must global-error.js include <html> and <body> tags?"],"answer":[0,"Yes. Global error UI must define its own <html> and <body> tags, since it is replacing the root layout or template when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"must-global-error-js-include-html-and-body-tags"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-global-error-js-include-html-and-body-tags" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-global-error-js-include-html-and-body-tags" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must global-error.js include <html> and <body> tags?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Global error UI must define its own <html> and <body> tags, since it is replacing the root layout or template when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Fld53" prefix="r5619" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6589981617615632812"],"question":[0,"How do you handle errors that occur in a specific layout.js or template.js file?"],"answer":[0,"To handle errors within a specific layout or template, place an error.js file in the layout's parent segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-you-handle-errors-that-occur-in-a-specific-layout-js-or-template-js-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-you-handle-errors-that-occur-in-a-specific-layout-js-or-template-js-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-you-handle-errors-that-occur-in-a-specific-layout-js-or-template-js-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do you handle errors that occur in a specific layout.js or template.js file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>To handle errors within a specific layout or template, place an error.js file in the layout's parent segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1HQics" prefix="r5620" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6981544373153388086"],"question":[0,"What file should you use to handle errors in the root app/layout.js or app/template.js?"],"answer":[0,"To specifically handle errors in these root components, use a variation of error.js called app/global-error.js located in the root app directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-should-you-use-to-handle-errors-in-the-root-app-layout-js-or-app-templ"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-should-you-use-to-handle-errors-in-the-root-app-layout-js-or-app-templ" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-should-you-use-to-handle-errors-in-the-root-app-layout-js-or-app-templ" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file should you use to handle errors in the root app/layout.js or app/template.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>To specifically handle errors in these root components, use a variation of error.js called app/global-error.js located in the root app directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Eafmg" prefix="r5621" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7923824859180914330"],"question":[0,"Is it recommended to define a root error.js even if global-error.js is defined?"],"answer":[0,"Yes. Even if a global-error.js is defined, it is still recommended to define a root error.js whose fallback component will be rendered within the root layout, which includes globally shared UI and branding."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"is-it-recommended-to-define-a-root-error-js-even-if-global-error-js-is-defined"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-it-recommended-to-define-a-root-error-js-even-if-global-error-js-is-defined" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-it-recommended-to-define-a-root-error-js-even-if-global-error-js-is-defined" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is it recommended to define a root error.js even if global-error.js is defined?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Even if a global-error.js is defined, it is still recommended to define a root error.js whose fallback component will be rendered within the root layout, which includes globally shared UI and branding.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZJ2Su6" prefix="r5622" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9186071622934600864"],"question":[0,"What wraps the entire application in Next.js error handling?"],"answer":[0,"Unlike the root error.js, the global-error.js error boundary wraps the entire application, and its fallback component replaces the root layout when active."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"what-wraps-the-entire-application-in-next-js-error-handling"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-wraps-the-entire-application-in-next-js-error-handling" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-wraps-the-entire-application-in-next-js-error-handling" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What wraps the entire application in Next.js error handling?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Unlike the root error.js, the global-error.js error boundary wraps the entire application, and its fallback component replaces the root layout when active.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2psCR2" prefix="r5623" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10110886809762105618"],"question":[0,"How are error messages different for Server Component errors vs Client Component errors?"],"answer":[0,"Errors forwarded from Client Components show the original Error message. Errors forwarded from Server Components show a generic message with an identifier to avoid leaking sensitive details."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/error"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-error-messages-different-for-server-component-errors-vs-client-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-error-messages-different-for-server-component-errors-vs-client-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-error-messages-different-for-server-component-errors-vs-client-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are error messages different for Server Component errors vs Client Component errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Errors forwarded from Client Components show the original Error message. Errors forwarded from Server Components show a generic message with an identifier to avoid leaking sensitive details.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/error" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="paK7f" prefix="r5624" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12497917950930472072"],"question":[0,"Do unhandled errors inside startTransition from useTransition bubble up to error boundaries?"],"answer":[0,"Yes. Unhandled errors inside startTransition from useTransition will bubble up to the nearest error boundary, which is an exception to the general rule about async code."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-unhandled-errors-inside-starttransition-from-usetransition-bubble-up-to-error"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-unhandled-errors-inside-starttransition-from-usetransition-bubble-up-to-error" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-unhandled-errors-inside-starttransition-from-usetransition-bubble-up-to-error" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do unhandled errors inside startTransition from useTransition bubble up to error boundaries?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Unhandled errors inside startTransition from useTransition will bubble up to the nearest error boundary, which is an exception to the general rule about async code.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1ir8L6" prefix="r5625" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13295862504771819239"],"question":[0,"Why can't error.js catch errors from layout.js in the same segment?"],"answer":[0,"This intentional hierarchy keeps important UI that is shared between sibling routes (such as navigation) visible and functional when an error occurs."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"why-can-t-error-js-catch-errors-from-layout-js-in-the-same-segment"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-can-t-error-js-catch-errors-from-layout-js-in-the-same-segment" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-can-t-error-js-catch-errors-from-layout-js-in-the-same-segment" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why can't error.js catch errors from layout.js in the same segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>This intentional hierarchy keeps important UI that is shared between sibling routes (such as navigation) visible and functional when an error occurs.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2ktNUN" prefix="r5626" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13500772434618999818"],"question":[0,"Can an error.js file catch errors thrown in a layout.js file in the same route segment?"],"answer":[0,"No. An error.js boundary will not handle errors thrown in a layout.js component in the same segment because the error boundary is nested inside that layout's component."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"can-an-error-js-file-catch-errors-thrown-in-a-layout-js-file-in-the-same-route-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-an-error-js-file-catch-errors-thrown-in-a-layout-js-file-in-the-same-route-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-an-error-js-file-catch-errors-thrown-in-a-layout-js-file-in-the-same-route-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can an error.js file catch errors thrown in a layout.js file in the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. An error.js boundary will not handle errors thrown in a layout.js component in the same segment because the error boundary is nested inside that layout's component.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="GNTVP" prefix="r5627" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13575262326611184714"],"question":[0,"How do errors propagate through the error boundary hierarchy in Next.js?"],"answer":[0,"Errors will bubble up to the nearest parent error boundary. This allows for granular error handling by placing error.tsx files at different levels in the route hierarchy."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"how-do-errors-propagate-through-the-error-boundary-hierarchy-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-do-errors-propagate-through-the-error-boundary-hierarchy-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-do-errors-propagate-through-the-error-boundary-hierarchy-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How do errors propagate through the error boundary hierarchy in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Errors will bubble up to the nearest parent error boundary. This allows for granular error handling by placing error.tsx files at different levels in the route hierarchy.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1dW6Br" prefix="r5628" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14000531189653460920"],"question":[0,"Can an error.js file catch errors thrown in a template.js file in the same route segment?"],"answer":[0,"No. error.js boundaries do not catch errors thrown in template.js components of the same segment."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"can-an-error-js-file-catch-errors-thrown-in-a-template-js-file-in-the-same-route"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-an-error-js-file-catch-errors-thrown-in-a-template-js-file-in-the-same-route" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-an-error-js-file-catch-errors-thrown-in-a-template-js-file-in-the-same-route" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can an error.js file catch errors thrown in a template.js file in the same route segment?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. error.js boundaries do not catch errors thrown in template.js components of the same segment.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="17RCoM" prefix="r5629" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14736873328483285616"],"question":[0,"Do error.js boundaries catch errors in event handlers?"],"answer":[0,"No. Errors in event handlers or async code aren't handled by error boundaries because they run after rendering. You must catch the error manually and store it using useState or useReducer."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/error-handling"]]],"topic":[0,"nextjs"],"slug":[0,"do-error-js-boundaries-catch-errors-in-event-handlers"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-error-js-boundaries-catch-errors-in-event-handlers" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-error-js-boundaries-catch-errors-in-event-handlers" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do error.js boundaries catch errors in event handlers?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Errors in event handlers or async code aren't handled by error boundaries because they run after rendering. You must catch the error manually and store it using useState or useReducer.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/error-handling" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="styling-native-css-approaches" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Styling > Native CSS Approaches</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 17 questions </span> </div> <div class="space-y-4"> <astro-island uid="1Yi9tA" prefix="r5630" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"65298262863037768"],"question":[0,"Are global CSS stylesheets removed when navigating between routes in Next.js App Router?"],"answer":[0,"No, global stylesheets are currently not removed during navigation in the App Router. Since Next.js uses React's built-in support for stylesheets to integrate with Suspense, this currently does not remove stylesheets as you navigate between routes, which can lead to conflicts."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"are-global-css-stylesheets-removed-when-navigating-between-routes-in-next-js-app"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-global-css-stylesheets-removed-when-navigating-between-routes-in-next-js-app" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-global-css-stylesheets-removed-when-navigating-between-routes-in-next-js-app" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are global CSS stylesheets removed when navigating between routes in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, global stylesheets are currently not removed during navigation in the App Router. Since Next.js uses React's built-in support for stylesheets to integrate with Suspense, this currently does not remove stylesheets as you navigate between routes, which can lead to conflicts.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1JGkog" prefix="r5631" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2146744175171155127"],"question":[0,"What happens to CSS files during Next.js production builds?"],"answer":[0,"In production (`next build`), all CSS files are automatically concatenated into many minified and code-split `.css` files. This ensures the minimal amount of CSS is loaded for each route."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-css-files-during-next-js-production-builds"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-css-files-during-next-js-production-builds" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-css-files-during-next-js-production-builds" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to CSS files during Next.js production builds?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In production (<code>next build</code>), all CSS files are automatically concatenated into many minified and code-split <code>.css</code> files. This ensures the minimal amount of CSS is loaded for each route.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mBfoe" prefix="r5632" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2321003353093704502"],"question":[0,"Where is the cssChunking option configured in Next.js?"],"answer":[0,"The `cssChunking` option is configured in the `experimental` section of `next.config.js`, for example: `experimental: { cssChunking: 'strict' }`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/cssChunking"]]],"topic":[0,"nextjs"],"slug":[0,"where-is-the-csschunking-option-configured-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-is-the-csschunking-option-configured-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-is-the-csschunking-option-configured-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where is the cssChunking option configured in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>cssChunking</code> option is configured in the <code>experimental</code> section of <code>next.config.js</code>, for example: <code>experimental: { cssChunking: 'strict' }</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/cssChunking" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1YeGW6" prefix="r5633" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2366233155098294501"],"question":[0,"What is the default Sass implementation used by Next.js?"],"answer":[0,"The default Sass implementation is the `sass` package (also known as Dart Sass). This can be changed using the `implementation` property in `sassOptions`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/sass"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-sass-implementation-used-by-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-sass-implementation-used-by-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-sass-implementation-used-by-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default Sass implementation used by Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default Sass implementation is the <code>sass</code> package (also known as Dart Sass). This can be changed using the <code>implementation</code> property in <code>sassOptions</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/sass" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KU1Qe" prefix="r5634" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2421053487890988435"],"question":[0,"What is the recommended CSS Module naming convention in Next.js?"],"answer":[0,"Next.js recommends using `<name>.module.css` over `<name>.tsx` for consistency. Use a consistent naming convention for your CSS modules throughout your application."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-recommended-css-module-naming-convention-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-recommended-css-module-naming-convention-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-recommended-css-module-naming-convention-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the recommended CSS Module naming convention in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js recommends using <code><name>.module.css</code> over <code><name>.tsx</code> for consistency. Use a consistent naming convention for your CSS modules throughout your application.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="CTHHq" prefix="r5635" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4664921826192824377"],"question":[0,"What file extension is required for CSS Modules in Next.js?"],"answer":[0,"CSS Modules require the `.module.css` extension. Next.js has built-in support for CSS Modules using this extension, which enables local scoping by automatically creating unique class names."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extension-is-required-for-css-modules-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extension-is-required-for-css-modules-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extension-is-required-for-css-modules-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extension is required for CSS Modules in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CSS Modules require the <code>.module.css</code> extension. Next.js has built-in support for CSS Modules using this extension, which enables local scoping by automatically creating unique class names.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="18DqmE" prefix="r5636" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5094634632625778170"],"question":[0,"Does Fast Refresh work for CSS changes in Next.js?"],"answer":[0,"No, Fast Refresh does not work for changes to CSS or other static assets. While Fast Refresh provides instantaneous feedback for React component changes, CSS changes do not trigger Fast Refresh updates."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/fast-refresh"]]],"topic":[0,"nextjs"],"slug":[0,"does-fast-refresh-work-for-css-changes-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-fast-refresh-work-for-css-changes-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-fast-refresh-work-for-css-changes-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does Fast Refresh work for CSS changes in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Fast Refresh does not work for changes to CSS or other static assets. While Fast Refresh provides instantaneous feedback for React component changes, CSS changes do not trigger Fast Refresh updates.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/fast-refresh" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2fAqWS" prefix="r5637" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6063889448069108208"],"question":[0,"What are the three configuration options for the cssChunking setting in Next.js?"],"answer":[0,"The three options are: (1) `true` or `'loose'` (default) - merges CSS files whenever possible to reduce chunks; (2) `false` - disables CSS merging and reordering; (3) `'strict'` - loads CSS files in the correct import order, which can lead to more chunks but preserves CSS dependencies."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/cssChunking"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-configuration-options-for-the-csschunking-setting-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-configuration-options-for-the-csschunking-setting-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-configuration-options-for-the-csschunking-setting-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three configuration options for the cssChunking setting in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The three options are: (1) <code>true</code> or <code>'loose'</code> (default) - merges CSS files whenever possible to reduce chunks; (2) <code>false</code> - disables CSS merging and reordering; (3) <code>'strict'</code> - loads CSS files in the correct import order, which can lead to more chunks but preserves CSS dependencies.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/cssChunking" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aI0gR" prefix="r5638" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6273683623567965135"],"question":[0,"What package must be installed to use Sass/SCSS in Next.js?"],"answer":[0,"You must install the `sass` package using `npm install --save-dev sass`. Next.js has built-in Sass support that works automatically after this package is installed."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/sass"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-must-be-installed-to-use-sass-scss-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-must-be-installed-to-use-sass-scss-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-must-be-installed-to-use-sass-scss-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package must be installed to use Sass/SCSS in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must install the <code>sass</code> package using <code>npm install --save-dev sass</code>. Next.js has built-in Sass support that works automatically after this package is installed.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/sass" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="RNtPJ" prefix="r5639" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7156552017038875367"],"question":[0,"What is the sassOptions property 'functions' used for and what is its limitation?"],"answer":[0,"The `functions` property in sassOptions is for defining custom Sass functions. However, it is only supported with webpack. When using Turbopack, custom Sass functions are not available because Turbopack's Rust-based architecture cannot directly execute JavaScript functions passed through this option."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-sassoptions-property-functions-used-for-and-what-is-its-limitation"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-sassoptions-property-functions-used-for-and-what-is-its-limitation" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-sassoptions-property-functions-used-for-and-what-is-its-limitation" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the sassOptions property 'functions' used for and what is its limitation?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The <code>functions</code> property in sassOptions is for defining custom Sass functions. However, it is only supported with webpack. When using Turbopack, custom Sass functions are not available because Turbopack's Rust-based architecture cannot directly execute JavaScript functions passed through this option.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1poo7M" prefix="r5640" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7876648574564284851"],"question":[0,"Why is global CSS restricted to _app.js in Next.js Pages Router?"],"answer":[0,"Global CSS is restricted to `pages/_app.js` due to ordering problems and side-effects. Because global CSS affects all elements on the page, if you could import it in individual pages, navigating between pages would cause global styles from one page to unintentionally affect other pages."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/css-global"]]],"topic":[0,"nextjs"],"slug":[0,"why-is-global-css-restricted-to-app-js-in-next-js-pages-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="why-is-global-css-restricted-to-app-js-in-next-js-pages-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#why-is-global-css-restricted-to-app-js-in-next-js-pages-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Why is global CSS restricted to _app.js in Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Global CSS is restricted to <code>pages/_app.js</code> due to ordering problems and side-effects. Because global CSS affects all elements on the page, if you could import it in individual pages, navigating between pages would cause global styles from one page to unintentionally affect other pages.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/css-global" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1mykj3" prefix="r5641" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8107945916397297946"],"question":[0,"Can CSS Modules be used in both server and client components in Next.js App Router?"],"answer":[0,"Yes, CSS Modules can be imported into any file inside the app directory for both server and client components without restrictions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"can-css-modules-be-used-in-both-server-and-client-components-in-next-js-app-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-css-modules-be-used-in-both-server-and-client-components-in-next-js-app-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-css-modules-be-used-in-both-server-and-client-components-in-next-js-app-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can CSS Modules be used in both server and client components in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, CSS Modules can be imported into any file inside the app directory for both server and client components without restrictions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="FtI8t" prefix="r5642" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8151186359707604534"],"question":[0,"What are the two main configuration properties available in sassOptions?"],"answer":[0,"The two main properties are: (1) `additionalData` - allows injecting custom Sass variables globally (e.g., `'$var: red;'`); (2) `implementation` - specifies which Sass package to use (default is `sass`, can be changed to alternatives like `sass-embedded`)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-configuration-properties-available-in-sassoptions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-configuration-properties-available-in-sassoptions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-configuration-properties-available-in-sassoptions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main configuration properties available in sassOptions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The two main properties are: (1) <code>additionalData</code> - allows injecting custom Sass variables globally (e.g., <code>'$var: red;'</code>); (2) <code>implementation</code> - specifies which Sass package to use (default is <code>sass</code>, can be changed to alternatives like <code>sass-embedded</code>).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/sassOptions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z16hBVu" prefix="r5643" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9994822152713344212"],"question":[0,"How does CSS ordering work in Next.js?"],"answer":[0,"The order of CSS depends on the order you import styles in your code. Next.js recommends importing CSS files in a single JavaScript or TypeScript entry file and disabling auto-sorting import tools (like ESLint's `sort-imports`) to maintain predictable ordering."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"how-does-css-ordering-work-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-does-css-ordering-work-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-does-css-ordering-work-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How does CSS ordering work in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The order of CSS depends on the order you import styles in your code. Next.js recommends importing CSS files in a single JavaScript or TypeScript entry file and disabling auto-sorting import tools (like ESLint's <code>sort-imports</code>) to maintain predictable ordering.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="3BBEs" prefix="r5644" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10465290778738507669"],"question":[0,"Should CSS ordering behavior be verified differently in development vs production in Next.js?"],"answer":[0,"Yes, CSS ordering can behave differently in development. You should always run `next build` to verify the final CSS order in production, as the behavior can differ between development and production environments."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"should-css-ordering-behavior-be-verified-differently-in-development-vs-productio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="should-css-ordering-behavior-be-verified-differently-in-development-vs-productio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#should-css-ordering-behavior-be-verified-differently-in-development-vs-productio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Should CSS ordering behavior be verified differently in development vs production in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, CSS ordering can behave differently in development. You should always run <code>next build</code> to verify the final CSS order in production, as the behavior can differ between development and production environments.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1kHIpA" prefix="r5645" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11609763977957738802"],"question":[0,"What file extensions does Next.js support for Sass?"],"answer":[0,"Next.js supports both `.scss` and `.sass` extensions. The `.scss` extension requires SCSS syntax (a superset of CSS), while `.sass` requires the Indented Syntax. For CSS Modules with Sass, use `.module.scss` or `.module.sass`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/sass"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-does-next-js-support-for-sass"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-does-next-js-support-for-sass" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-does-next-js-support-for-sass" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions does Next.js support for Sass?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js supports both <code>.scss</code> and <code>.sass</code> extensions. The <code>.scss</code> extension requires SCSS syntax (a superset of CSS), while <code>.sass</code> requires the Indented Syntax. For CSS Modules with Sass, use <code>.module.scss</code> or <code>.module.sass</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/sass" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ez6SQ" prefix="r5646" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13841422478240105462"],"question":[0,"How are CSS Modules accessed in JavaScript/TypeScript code?"],"answer":[0,"CSS Modules are imported as JavaScript objects, and class names are accessed as object properties. For example: `import styles from './styles.module.css'` then use `className={styles.dashboard}`. Each class name becomes a property on the imported styles object."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/getting-started/css"]]],"topic":[0,"nextjs"],"slug":[0,"how-are-css-modules-accessed-in-javascript-typescript-code"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-are-css-modules-accessed-in-javascript-typescript-code" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-are-css-modules-accessed-in-javascript-typescript-code" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How are CSS Modules accessed in JavaScript/TypeScript code?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>CSS Modules are imported as JavaScript objects, and class names are accessed as object properties. For example: <code>import styles from './styles.module.css'</code> then use <code>className={styles.dashboard}</code>. Each class name becomes a property on the imported styles object.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/getting-started/css" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="intercepting-routes" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Intercepting Routes</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 17 questions </span> </div> <div class="space-y-4"> <astro-island uid="25gqmY" prefix="r5647" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"70224031234760204"],"question":[0,"What is the exact syntax convention to intercept a route two levels above?"],"answer":[0,"Use the (..)(..) convention. For example, to intercept a route two levels above, create a (..)(..)photo directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-convention-to-intercept-a-route-two-levels-above"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-convention-to-intercept-a-route-two-levels-above" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-convention-to-intercept-a-route-two-levels-above" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax convention to intercept a route two levels above?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the (..)(..) convention. For example, to intercept a route two levels above, create a (..)(..)photo directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1Nyi1m" prefix="r5648" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1326912709381136750"],"question":[0,"What is the exact syntax convention to intercept a route one level above?"],"answer":[0,"Use the (..) convention. For example, to intercept /photo from one level above, create a (..)photo directory."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-exact-syntax-convention-to-intercept-a-route-one-level-above"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-exact-syntax-convention-to-intercept-a-route-one-level-above" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-exact-syntax-convention-to-intercept-a-route-one-level-above" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the exact syntax convention to intercept a route one level above?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use the (..) convention. For example, to intercept /photo from one level above, create a (..)photo directory.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2jQVQQ" prefix="r5649" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2650648545371950273"],"question":[0,"Does the Link component properly close intercepting route modals when navigating away?"],"answer":[0,"No. When using <Link href={'/'}/>, the Intercepting Route's component does not unmount or close properly. However, using the replace prop on Link (<Link replace />) will unmount the @modal route, whereas pushing to a new route will not."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/62430"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-link-component-properly-close-intercepting-route-modals-when-navigating"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-link-component-properly-close-intercepting-route-modals-when-navigating" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-link-component-properly-close-intercepting-route-modals-when-navigating" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Link component properly close intercepting route modals when navigating away?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. When using <Link href={'/'}/>, the Intercepting Route's component does not unmount or close properly. However, using the replace prop on Link (<Link replace />) will unmount the @modal route, whereas pushing to a new route will not.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/62430" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1znnXz" prefix="r5650" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2736577517544779238"],"question":[0,"What happens to an intercepting route during hard navigation (page refresh or direct URL access)?"],"answer":[0,"During hard navigation, no interception happens. The full intercepted route renders instead of the modal/overlay. For example, refreshing /photo/123 will render the entire photo page instead of the modal."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-an-intercepting-route-during-hard-navigation-page-refresh-or-dir"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-an-intercepting-route-during-hard-navigation-page-refresh-or-dir" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-an-intercepting-route-during-hard-navigation-page-refresh-or-dir" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to an intercepting route during hard navigation (page refresh or direct URL access)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During hard navigation, no interception happens. The full intercepted route renders instead of the modal/overlay. For example, refreshing /photo/123 will render the entire photo page instead of the modal.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZGUP7Q" prefix="r5651" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3408027899103739374"],"question":[0,"Do route groups (folder) count as route segments for intercepting route conventions?"],"answer":[0,"No. Route groups marked with (folder) are not route segments and don't count towards the depth of the route's nesting when using intercepting route conventions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-route-groups-folder-count-as-route-segments-for-intercepting-route-convention"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-route-groups-folder-count-as-route-segments-for-intercepting-route-convention" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-route-groups-folder-count-as-route-segments-for-intercepting-route-convention" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do route groups (folder) count as route segments for intercepting route conventions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. Route groups marked with (folder) are not route segments and don't count towards the depth of the route's nesting when using intercepting route conventions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1aBFk4" prefix="r5652" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4989152820598402260"],"question":[0,"Do @slot folders in parallel routes count as route segments for intercepting route conventions?"],"answer":[0,"No. @slot folders are not route segments and are not considered when using the (..) convention. For example, @modal is a slot and doesn't count, so the photo route is only one segment level higher despite being two file-system levels higher."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"do-slot-folders-in-parallel-routes-count-as-route-segments-for-intercepting-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="do-slot-folders-in-parallel-routes-count-as-route-segments-for-intercepting-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#do-slot-folders-in-parallel-routes-count-as-route-segments-for-intercepting-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Do @slot folders in parallel routes count as route segments for intercepting route conventions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. @slot folders are not route segments and are not considered when using the (..) convention. For example, @modal is a slot and doesn't count, so the photo route is only one segment level higher despite being two file-system levels higher.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1knAHU" prefix="r5653" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6630607880942548220"],"question":[0,"Are intercepting route conventions based on the file-system hierarchy or route segments?"],"answer":[0,"The (..) convention is based on route segments, not the file-system. This means @slot folders and (group) folders don't count when determining the level."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"are-intercepting-route-conventions-based-on-the-file-system-hierarchy-or-route-s"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-intercepting-route-conventions-based-on-the-file-system-hierarchy-or-route-s" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-intercepting-route-conventions-based-on-the-file-system-hierarchy-or-route-s" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are intercepting route conventions based on the file-system hierarchy or route segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The (..) convention is based on route segments, not the file-system. This means @slot folders and (group) folders don't count when determining the level.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="raVyB" prefix="r5654" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6872697444114207133"],"question":[0,"What method should be used to close a modal created with intercepting routes?"],"answer":[0,"Use router.back() to close modals created with intercepting routes. This is the recommended approach in the official documentation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-method-should-be-used-to-close-a-modal-created-with-intercepting-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-method-should-be-used-to-close-a-modal-created-with-intercepting-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-method-should-be-used-to-close-a-modal-created-with-intercepting-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What method should be used to close a modal created with intercepting routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use router.back() to close modals created with intercepting routes. This is the recommended approach in the official documentation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1KiHd2" prefix="r5655" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7483125507601784889"],"question":[0,"What happens to an intercepting route during soft navigation (client-side navigation)?"],"answer":[0,"During soft navigation, route interception occurs - the URL is masked and the intercepted content overlays the current layout without changing the user's context."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-an-intercepting-route-during-soft-navigation-client-side-navigat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-an-intercepting-route-during-soft-navigation-client-side-navigat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-an-intercepting-route-during-soft-navigation-client-side-navigat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to an intercepting route during soft navigation (client-side navigation)?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During soft navigation, route interception occurs - the URL is masked and the intercepted content overlays the current layout without changing the user's context.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1MV63N" prefix="r5656" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7810376082330686779"],"question":[0,"Is there a known issue with intercepting routes and route groups?"],"answer":[0,"Yes. Intercepting routes don't work properly within route groups. There appears to be no support for (group) routes with intercepting routes. If the interception is not inside a route group, it works without requiring default.ts page."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/53170"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-known-issue-with-intercepting-routes-and-route-groups"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-known-issue-with-intercepting-routes-and-route-groups" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-known-issue-with-intercepting-routes-and-route-groups" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a known issue with intercepting routes and route groups?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Intercepting routes don't work properly within route groups. There appears to be no support for (group) routes with intercepting routes. If the interception is not inside a route group, it works without requiring default.ts page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/53170" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="22Iyf3" prefix="r5657" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9678656608530744596"],"question":[0,"What happens if default.js is missing from the children slot in parallel routes?"],"answer":[0,"Without a default.js file, the route will return a 404 page."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-if-default-js-is-missing-from-the-children-slot-in-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-if-default-js-is-missing-from-the-children-slot-in-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-if-default-js-is-missing-from-the-children-slot-in-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens if default.js is missing from the children slot in parallel routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Without a default.js file, the route will return a 404 page.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZmBu8H" prefix="r5658" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9748026148085765434"],"question":[0,"Is there a known issue with intercepting routes and URL query parameters?"],"answer":[0,"Yes. Intercepting routes may not work correctly when the URL has query parameters combined with hard navigation and soft navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/53188"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-known-issue-with-intercepting-routes-and-url-query-parameters"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-known-issue-with-intercepting-routes-and-url-query-parameters" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-known-issue-with-intercepting-routes-and-url-query-parameters" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a known issue with intercepting routes and URL query parameters?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Intercepting routes may not work correctly when the URL has query parameters combined with hard navigation and soft navigation.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/53188" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="d8jhM" prefix="r5659" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11569715066145499412"],"question":[0,"During soft navigation with parallel routes, how does Next.js handle slots that don't match the current URL?"],"answer":[0,"During soft navigation, Next.js will perform a partial render, changing the subpage within the slot while maintaining the other slot's active subpages, even if they don't match the current URL."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"during-soft-navigation-with-parallel-routes-how-does-next-js-handle-slots-that-d"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="during-soft-navigation-with-parallel-routes-how-does-next-js-handle-slots-that-d" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#during-soft-navigation-with-parallel-routes-how-does-next-js-handle-slots-that-d" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">During soft navigation with parallel routes, how does Next.js handle slots that don't match the current URL?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During soft navigation, Next.js will perform a partial render, changing the subpage within the slot while maintaining the other slot's active subpages, even if they don't match the current URL.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1xmyYy" prefix="r5660" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11794205096613950969"],"question":[0,"What happens to unmatched slots after a hard navigation when using parallel routes with intercepting routes?"],"answer":[0,"After a hard navigation (full-page load/browser refresh), Next.js cannot determine the active state for slots that don't match the current URL. It will render a default.js file for the unmatched slots, or 404 if default.js doesn't exist."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/routing/parallel-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-unmatched-slots-after-a-hard-navigation-when-using-parallel-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-unmatched-slots-after-a-hard-navigation-when-using-parallel-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-unmatched-slots-after-a-hard-navigation-when-using-parallel-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to unmatched slots after a hard navigation when using parallel routes with intercepting routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>After a hard navigation (full-page load/browser refresh), Next.js cannot determine the active state for slots that don't match the current URL. It will render a default.js file for the unmatched slots, or 404 if default.js doesn't exist.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/routing/parallel-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZHBrAN" prefix="r5661" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11979412241338754217"],"question":[0,"When is the default.js file rendered in parallel routes with intercepting routes?"],"answer":[0,"default.js is rendered when Next.js cannot recover a slot's active state following a full-page load (hard navigation). During soft navigation, Next.js tracks each slot's active state, but during hard refreshes, this state cannot be recovered."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"when-is-the-default-js-file-rendered-in-parallel-routes-with-intercepting-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-is-the-default-js-file-rendered-in-parallel-routes-with-intercepting-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-is-the-default-js-file-rendered-in-parallel-routes-with-intercepting-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When is the default.js file rendered in parallel routes with intercepting routes?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>default.js is rendered when Next.js cannot recover a slot's active state following a full-page load (hard navigation). During soft navigation, Next.js tracks each slot's active state, but during hard refreshes, this state cannot be recovered.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1ScBuG" prefix="r5662" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13354976749249859372"],"question":[0,"What are the four modal challenges that intercepting routes with parallel routes can solve?"],"answer":[0,"1) Making modal content shareable through a URL, 2) Preserving context when the page is refreshed instead of closing the modal, 3) Closing the modal on backwards navigation rather than going to the previous route, and 4) Reopening the modal on forwards navigation."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-four-modal-challenges-that-intercepting-routes-with-parallel-routes"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-four-modal-challenges-that-intercepting-routes-with-parallel-routes" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-four-modal-challenges-that-intercepting-routes-with-parallel-routes" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the four modal challenges that intercepting routes with parallel routes can solve?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><ol> <li>Making modal content shareable through a URL, 2) Preserving context when the page is refreshed instead of closing the modal, 3) Closing the modal on backwards navigation rather than going to the previous route, and 4) Reopening the modal on forwards navigation.</li> </ol> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/intercepting-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1uTFua" prefix="r5663" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13910275420504596640"],"question":[0,"What file is required in parallel route slots when using intercepting routes to prevent errors?"],"answer":[0,"A default.js file is required for named slots (@team, @analytics, etc.) to prevent errors. Without it, an error is returned for named slots and requires you to define a default.js in order to continue."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/default"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-is-required-in-parallel-route-slots-when-using-intercepting-routes-to-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-is-required-in-parallel-route-slots-when-using-intercepting-routes-to-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-is-required-in-parallel-route-slots-when-using-intercepting-routes-to-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file is required in parallel route slots when using intercepting routes to prevent errors?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A default.js file is required for named slots (@team, @analytics, etc.) to prevent errors. Without it, an error is returned for named slots and requires you to define a default.js in order to continue.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/default" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="server-actions-definition-and-convention" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Server Actions > Definition and Convention</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 17 questions </span> </div> <div class="space-y-4"> <astro-island uid="fSxsu" prefix="r5664" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"767291583066700397"],"question":[0,"Where must the \"use server\" directive be placed when used inline in a function?"],"answer":[0,"When using the \"use server\" directive inline, it must be placed at the top of the async function body as the first statement inside the function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-use-server-directive-be-placed-when-used-inline-in-a-function"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-use-server-directive-be-placed-when-used-inline-in-a-function" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-use-server-directive-be-placed-when-used-inline-in-a-function" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the "use server" directive be placed when used inline in a function?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using the "use server" directive inline, it must be placed at the top of the async function body as the first statement inside the function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z29F1F8" prefix="r5665" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1488555369020644142"],"question":[0,"Where must the \"use server\" directive be placed when used at the file level?"],"answer":[0,"When using the \"use server\" directive at the file level, it must be placed at the very top of the file, before any imports or other code. All exports below will be considered Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"where-must-the-use-server-directive-be-placed-when-used-at-the-file-level"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="where-must-the-use-server-directive-be-placed-when-used-at-the-file-level" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#where-must-the-use-server-directive-be-placed-when-used-at-the-file-level" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Where must the "use server" directive be placed when used at the file level?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When using the "use server" directive at the file level, it must be placed at the very top of the file, before any imports or other code. All exports below will be considered Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1uFXSk" prefix="r5666" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1783291299969793682"],"question":[0,"What is the default bodySizeLimit for Server Actions?"],"answer":[0,"The default bodySizeLimit is 1MB. This can be configured using formats like '500kb' or '3mb' to prevent the consumption of excessive server resources and potential DDoS attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-bodysizelimit-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-bodysizelimit-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-bodysizelimit-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default bodySizeLimit for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The default bodySizeLimit is 1MB. This can be configured using formats like '500kb' or '3mb' to prevent the consumption of excessive server resources and potential DDoS attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1HhsgU" prefix="r5667" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1936115227225334904"],"question":[0,"Can Server Actions be defined inline in Client Components?"],"answer":[0,"No. It is not allowed to define inline \"use server\" annotated Server Actions in Client Components. To use Server Actions in Client Components, they must be created in a dedicated file with the \"use server\" directive at the top of the file and then imported."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/directives/use-server"]]],"topic":[0,"nextjs"],"slug":[0,"can-server-actions-be-defined-inline-in-client-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-server-actions-be-defined-inline-in-client-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-server-actions-be-defined-inline-in-client-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can Server Actions be defined inline in Client Components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No. It is not allowed to define inline "use server" annotated Server Actions in Client Components. To use Server Actions in Client Components, they must be created in a dedicated file with the "use server" directive at the top of the file and then imported.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/directives/use-server" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1M70zl" prefix="r5668" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2137899014043068686"],"question":[0,"Are Server Actions enabled by default in Next.js 14?"],"answer":[0,"Yes. Server Actions are enabled by default in Next.js 14 and later. In Next.js 13, you must set experimental.serverActions to true in next.config.js to enable them."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"are-server-actions-enabled-by-default-in-next-js-14"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-server-actions-enabled-by-default-in-next-js-14" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-server-actions-enabled-by-default-in-next-js-14" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are Server Actions enabled by default in Next.js 14?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Actions are enabled by default in Next.js 14 and later. In Next.js 13, you must set experimental.serverActions to true in next.config.js to enable them.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1fV4GJ" prefix="r5669" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5252963188951247475"],"question":[0,"Can imported values be referenced by Server Actions without serialization concerns?"],"answer":[0,"Yes. Imported values (as opposed to local variables) can be referenced by Server Actions without issue because imported values don't need to be serialized and sent to the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/73395"]]],"topic":[0,"nextjs"],"slug":[0,"can-imported-values-be-referenced-by-server-actions-without-serialization-concer"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-imported-values-be-referenced-by-server-actions-without-serialization-concer" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-imported-values-be-referenced-by-server-actions-without-serialization-concer" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can imported values be referenced by Server Actions without serialization concerns?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Imported values (as opposed to local variables) can be referenced by Server Actions without issue because imported values don't need to be serialized and sent to the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/73395" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z9crLI" prefix="r5670" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5720767657626551364"],"question":[0,"What data does a Server Action automatically receive when invoked through a form?"],"answer":[0,"When a Server Action is invoked through a form (passed to a <form> element's action prop), it automatically receives the FormData object, allowing developers to extract data using native FormData methods."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-data-does-a-server-action-automatically-receive-when-invoked-through-a-form"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-data-does-a-server-action-automatically-receive-when-invoked-through-a-form" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-data-does-a-server-action-automatically-receive-when-invoked-through-a-form" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What data does a Server Action automatically receive when invoked through a form?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a Server Action is invoked through a form (passed to a <form> element's action prop), it automatically receives the FormData object, allowing developers to extract data using native FormData methods.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1Dul5k" prefix="r5671" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8411865737285020962"],"question":[0,"What happens when a Server Action is passed to a <form> element's action prop?"],"answer":[0,"When a Server Action is passed to a <form> element's action prop, it automatically uses startTransition and receives the FormData object when invoked."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-a-server-action-is-passed-to-a-form-element-s-action-prop"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-a-server-action-is-passed-to-a-form-element-s-action-prop" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-a-server-action-is-passed-to-a-form-element-s-action-prop" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when a Server Action is passed to a <form> element's action prop?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When a Server Action is passed to a <form> element's action prop, it automatically uses startTransition and receives the FormData object when invoked.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Za9LlD" prefix="r5672" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8908578316495333998"],"question":[0,"Are variables closed over in Server Actions encrypted when sent to the client?"],"answer":[0,"Yes. In Next.js, closed-over variables in Server Actions are encrypted with the action ID before being sent to the client. This prevents sensitive data exposure when the captured variables are transmitted to the client and back to the server."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/73395"]]],"topic":[0,"nextjs"],"slug":[0,"are-variables-closed-over-in-server-actions-encrypted-when-sent-to-the-client"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="are-variables-closed-over-in-server-actions-encrypted-when-sent-to-the-client" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#are-variables-closed-over-in-server-actions-encrypted-when-sent-to-the-client" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Are variables closed over in Server Actions encrypted when sent to the client?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. In Next.js, closed-over variables in Server Actions are encrypted with the action ID before being sent to the client. This prevents sensitive data exposure when the captured variables are transmitted to the client and back to the server.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/73395" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2dKDWW" prefix="r5673" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9476021394764696187"],"question":[0,"Must Server Actions be async functions?"],"answer":[0,"Yes. Server Actions must be asynchronous functions because they can be called from the client through a network request, which is why they must be asynchronous."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"must-server-actions-be-async-functions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="must-server-actions-be-async-functions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#must-server-actions-be-async-functions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Must Server Actions be async functions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. Server Actions must be asynchronous functions because they can be called from the client through a network request, which is why they must be asynchronous.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zj99yc" prefix="r5674" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9758707621105976692"],"question":[0,"Is there a known compatibility issue between \"server-only\" package and Server Actions?"],"answer":[0,"Yes. When a file with import 'server-only' is in a dependency tree of a Server Action, that Server Action is no longer importable into Client Components and compilation will fail with an error about importing a component that needs server-only."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/50199"]]],"topic":[0,"nextjs"],"slug":[0,"is-there-a-known-compatibility-issue-between-server-only-package-and-server-acti"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-there-a-known-compatibility-issue-between-server-only-package-and-server-acti" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-there-a-known-compatibility-issue-between-server-only-package-and-server-acti" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is there a known compatibility issue between "server-only" package and Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. When a file with import 'server-only' is in a dependency tree of a Server Action, that Server Action is no longer importable into Client Components and compilation will fail with an error about importing a component that needs server-only.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/50199" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1jQQLH" prefix="r5675" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10807390615377429309"],"question":[0,"What file extensions can be used for Server Actions files?"],"answer":[0,"Server Actions can be defined in files with .js, .ts, or .tsx extensions. The official documentation shows examples using both TypeScript (.ts, .tsx) and JavaScript (.js) files without restrictions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-file-extensions-can-be-used-for-server-actions-files"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-file-extensions-can-be-used-for-server-actions-files" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-file-extensions-can-be-used-for-server-actions-files" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What file extensions can be used for Server Actions files?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Server Actions can be defined in files with .js, .ts, or .tsx extensions. The official documentation shows examples using both TypeScript (.ts, .tsx) and JavaScript (.js) files without restrictions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="24rnD9" prefix="r5676" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12099557164576883855"],"question":[0,"Can multiple Server Actions be defined in a single file?"],"answer":[0,"Yes. When using a top-level \"use server\" directive at the top of a file, you can have multiple Server Actions in a single file. All exports will be considered Server Actions."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"can-multiple-server-actions-be-defined-in-a-single-file"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="can-multiple-server-actions-be-defined-in-a-single-file" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#can-multiple-server-actions-be-defined-in-a-single-file" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Can multiple Server Actions be defined in a single file?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes. When using a top-level "use server" directive at the top of a file, you can have multiple Server Actions in a single file. All exports will be considered Server Actions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="NC7D3" prefix="r5677" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13046994521662519359"],"question":[0,"What formats are supported for the bodySizeLimit configuration?"],"answer":[0,"The bodySizeLimit can be configured using either bytes (numeric value) or string formats like '500kb', '1mb', '2mb', or '3mb'."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-formats-are-supported-for-the-bodysizelimit-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-formats-are-supported-for-the-bodysizelimit-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-formats-are-supported-for-the-bodysizelimit-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What formats are supported for the bodySizeLimit configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The bodySizeLimit can be configured using either bytes (numeric value) or string formats like '500kb', '1mb', '2mb', or '3mb'.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zx50Al" prefix="r5678" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13790545517527071215"],"question":[0,"What are the serialization requirements for Server Actions arguments and return values?"],"answer":[0,"The arguments and return value of Server Actions must be serializable by React. This is required because the function's response will be serialized and sent to the client over the network."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-serialization-requirements-for-server-actions-arguments-and-return-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-serialization-requirements-for-server-actions-arguments-and-return-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-serialization-requirements-for-server-actions-arguments-and-return-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the serialization requirements for Server Actions arguments and return values?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The arguments and return value of Server Actions must be serializable by React. This is required because the function's response will be serialized and sent to the client over the network.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1z1VNt" prefix="r5679" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15096944312024692936"],"question":[0,"What alternative to closures exists in Server Actions, and is it encrypted?"],"answer":[0,"The .bind() method can be used as an alternative to closures in Server Actions. Unlike closures, variables passed via .bind() are NOT encrypted. This provides an opt-out for performance and is consistent with .bind() behavior on the client."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/73395"]]],"topic":[0,"nextjs"],"slug":[0,"what-alternative-to-closures-exists-in-server-actions-and-is-it-encrypted"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-alternative-to-closures-exists-in-server-actions-and-is-it-encrypted" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-alternative-to-closures-exists-in-server-actions-and-is-it-encrypted" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What alternative to closures exists in Server Actions, and is it encrypted?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The .bind() method can be used as an alternative to closures in Server Actions. Unlike closures, variables passed via .bind() are NOT encrypted. This provides an opt-out for performance and is consistent with .bind() behavior on the client.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/73395" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZbgPiV" prefix="r5680" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"15116894101547935437"],"question":[0,"What is the allowedOrigins configuration for Server Actions?"],"answer":[0,"allowedOrigins is a configuration option that specifies additional safe origin domains from which Server Actions can be invoked. By default, only same-origin requests are allowed. It accepts an array of domain strings supporting wildcards (e.g., '*.my-proxy.com') to prevent CSRF attacks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-allowedorigins-configuration-for-server-actions"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-allowedorigins-configuration-for-server-actions" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-allowedorigins-configuration-for-server-actions" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the allowedOrigins configuration for Server Actions?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>allowedOrigins is a configuration option that specifies additional safe origin domains from which Server Actions can be invoked. By default, only same-origin requests are allowed. It accepts an array of domain strings supporting wildcards (e.g., '*.my-proxy.com') to prevent CSRF attacks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/next-config-js/serverActions" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="internationalization-content-localization" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Internationalization > Content Localization</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 17 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZIn6Cx" prefix="r5681" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"827701683580528175"],"question":[0,"In Next.js Pages Router domain routing, what properties can each domain object contain in the domains array?"],"answer":[0,"Each domain object must have 'domain' and 'defaultLocale' properties, and can optionally include 'locales' (array of other locales that should be redirected to that domain) and 'http' (boolean to enable HTTP for local testing)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-pages-router-domain-routing-what-properties-can-each-domain-object-co"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-pages-router-domain-routing-what-properties-can-each-domain-object-co" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-pages-router-domain-routing-what-properties-can-each-domain-object-co" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js Pages Router domain routing, what properties can each domain object contain in the domains array?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Each domain object must have 'domain' and 'defaultLocale' properties, and can optionally include 'locales' (array of other locales that should be redirected to that domain) and 'http' (boolean to enable HTTP for local testing).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2gG1T4" prefix="r5682" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2602571566898833706"],"question":[0,"In which version of Next.js was built-in i18n routing support first introduced for the Pages Router?"],"answer":[0,"Next.js v10.0.0 was the first version to include built-in support for internationalized (i18n) routing in the Pages Router."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-which-version-of-next-js-was-built-in-i18n-routing-support-first-introduced-f"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-which-version-of-next-js-was-built-in-i18n-routing-support-first-introduced-f" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-which-version-of-next-js-was-built-in-i18n-routing-support-first-introduced-f" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In which version of Next.js was built-in i18n routing support first introduced for the Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js v10.0.0 was the first version to include built-in support for internationalized (i18n) routing in the Pages Router.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1dPUPx" prefix="r5683" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2650614888103628541"],"question":[0,"What is the default value of localeDetection in Next.js Pages Router i18n config?"],"answer":[0,"localeDetection is enabled by default (true). When not explicitly set, Next.js automatically detects and redirects users based on their Accept-Language header."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-value-of-localedetection-in-next-js-pages-router-i18n-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-value-of-localedetection-in-next-js-pages-router-i18n-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-value-of-localedetection-in-next-js-pages-router-i18n-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default value of localeDetection in Next.js Pages Router i18n config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>localeDetection is enabled by default (true). When not explicitly set, Next.js automatically detects and redirects users based on their Accept-Language header.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Zr5SEO" prefix="r5684" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5527680511089459469"],"question":[0,"What middleware matcher pattern skips Next.js internals and all static files unless found in search params?"],"answer":[0,"The pattern is: '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)'"],"confidence":[0,0.95],"sources":[1,[[0,"https://clerk.com/blog/skip-nextjs-middleware-static-and-public-files"]]],"topic":[0,"nextjs"],"slug":[0,"what-middleware-matcher-pattern-skips-next-js-internals-and-all-static-files-unl"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-middleware-matcher-pattern-skips-next-js-internals-and-all-static-files-unl" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-middleware-matcher-pattern-skips-next-js-internals-and-all-static-files-unl" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What middleware matcher pattern skips Next.js internals and all static files unless found in search params?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The pattern is: '/((?!_next|[^?]<em>.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).</em>)'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://clerk.com/blog/skip-nextjs-middleware-static-and-public-files" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>clerk.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZblLQE" prefix="r5685" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8479684373037070787"],"question":[0,"Does the default locale have a URL prefix in Next.js Pages Router sub-path routing?"],"answer":[0,"No, the default locale does not have a prefix. For example, with defaultLocale: 'en-US' and a pages/blog.js file, the URLs would be /blog (English), /fr/blog (French), and /nl-nl/blog (Dutch)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-default-locale-have-a-url-prefix-in-next-js-pages-router-sub-path-routi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-default-locale-have-a-url-prefix-in-next-js-pages-router-sub-path-routi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-default-locale-have-a-url-prefix-in-next-js-pages-router-sub-path-routi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the default locale have a URL prefix in Next.js Pages Router sub-path routing?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, the default locale does not have a prefix. For example, with defaultLocale: 'en-US' and a pages/blog.js file, the URLs would be /blog (English), /fr/blog (French), and /nl-nl/blog (Dutch).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1GuRwB" prefix="r5686" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8895065193401675733"],"question":[0,"What happens when localeDetection is set to false in Next.js Pages Router i18n config?"],"answer":[0,"When localeDetection is set to false, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale-based domain or locale path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-localedetection-is-set-to-false-in-next-js-pages-router-i18n-c"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-localedetection-is-set-to-false-in-next-js-pages-router-i18n-c" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-localedetection-is-set-to-false-in-next-js-pages-router-i18n-c" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when localeDetection is set to false in Next.js Pages Router i18n config?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When localeDetection is set to false, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale-based domain or locale path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1sUa8r" prefix="r5687" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10798596860000090568"],"question":[0,"What is the detection priority order for locale selection with prefix-based routing in Next.js App Router using next-intl?"],"answer":[0,"The priority order is: 1) locale prefix in the pathname, 2) cookie containing a previously detected locale, 3) locale matched based on the Accept-Language header."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-intl.dev/docs/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-detection-priority-order-for-locale-selection-with-prefix-based-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-detection-priority-order-for-locale-selection-with-prefix-based-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-detection-priority-order-for-locale-selection-with-prefix-based-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the detection priority order for locale selection with prefix-based routing in Next.js App Router using next-intl?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The priority order is: 1) locale prefix in the pathname, 2) cookie containing a previously detected locale, 3) locale matched based on the Accept-Language header.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-intl.dev/docs/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-intl.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1GqqAt" prefix="r5688" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10847551897137175735"],"question":[0,"What cookie does Next.js Pages Router use to store user locale preference, and what priority does it have?"],"answer":[0,"Next.js uses the NEXT_LOCALE cookie, which takes priority over the Accept-Language header. For example, if NEXT_LOCALE=en is set, the user will be redirected to the English locale even if their Accept-Language header prefers French."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-cookie-does-next-js-pages-router-use-to-store-user-locale-preference-and-wh"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-cookie-does-next-js-pages-router-use-to-store-user-locale-preference-and-wh" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-cookie-does-next-js-pages-router-use-to-store-user-locale-preference-and-wh" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What cookie does Next.js Pages Router use to store user locale preference, and what priority does it have?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses the NEXT_LOCALE cookie, which takes priority over the Accept-Language header. For example, if NEXT_LOCALE=en is set, the user will be redirected to the English locale even if their Accept-Language header prefers French.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="tmsvl" prefix="r5689" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11626397260215496458"],"question":[0,"In Next.js 15 App Router, what type should the params prop be declared as for components with dynamic locale segments?"],"answer":[0,"params should be declared as a Promise. Example: params: Promise<{locale: string}>. The params must be awaited before accessing properties using await params or React's use() hook for client components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-app-router-what-type-should-the-params-prop-be-declared-as-for-com"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-app-router-what-type-should-the-params-prop-be-declared-as-for-com" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-app-router-what-type-should-the-params-prop-be-declared-as-for-com" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15 App Router, what type should the params prop be declared as for components with dynamic locale segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>params should be declared as a Promise. Example: params: Promise<{locale: string}>. The params must be awaited before accessing properties using await params or React's use() hook for client components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/file-conventions/dynamic-routes" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1bwU6j" prefix="r5690" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12519733262389125970"],"question":[0,"What property must be added to domain objects in Next.js Pages Router i18n config to test locale domains locally with HTTP instead of HTTPS?"],"answer":[0,"Add the 'http: true' field to the domain object. For example: { domain: 'localhost', defaultLocale: 'en', http: true }"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-property-must-be-added-to-domain-objects-in-next-js-pages-router-i18n-confi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-property-must-be-added-to-domain-objects-in-next-js-pages-router-i18n-confi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-property-must-be-added-to-domain-objects-in-next-js-pages-router-i18n-confi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What property must be added to domain objects in Next.js Pages Router i18n config to test locale domains locally with HTTP instead of HTTPS?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Add the 'http: true' field to the domain object. For example: { domain: 'localhost', defaultLocale: 'en', http: true }</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1UKl5" prefix="r5691" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13266434227392375898"],"question":[0,"How should getDictionary be used in Client Components in Next.js App Router?"],"answer":[0,"You should call the server-only getDictionary function in a layout.tsx (Server Component) and pass its result to a Context Provider that wraps your client components. This prevents the server-only code from being imported directly in client components."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"how-should-getdictionary-be-used-in-client-components-in-next-js-app-router"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-should-getdictionary-be-used-in-client-components-in-next-js-app-router" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-should-getdictionary-be-used-in-client-components-in-next-js-app-router" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How should getDictionary be used in Client Components in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You should call the server-only getDictionary function in a layout.tsx (Server Component) and pass its result to a Context Provider that wraps your client components. This prevents the server-only code from being imported directly in client components.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1x31Kk" prefix="r5692" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14039913488509490434"],"question":[0,"What are the three required properties in the i18n configuration object in next.config.js for Pages Router?"],"answer":[0,"The i18n config requires: 'locales' (array of all locales you want to support), 'defaultLocale' (the locale used when visiting non-locale prefixed paths), and optionally 'domains' (only required when setting up domain routing)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-required-properties-in-the-i18n-configuration-object-in-next-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-required-properties-in-the-i18n-configuration-object-in-next-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-required-properties-in-the-i18n-configuration-object-in-next-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three required properties in the i18n configuration object in next.config.js for Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The i18n config requires: 'locales' (array of all locales you want to support), 'defaultLocale' (the locale used when visiting non-locale prefixed paths), and optionally 'domains' (only required when setting up domain routing).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ds88m" prefix="r5693" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14134245439893906800"],"question":[0,"What three locale-related properties does useRouter provide in Next.js Pages Router when i18n is enabled?"],"answer":[0,"useRouter provides: 'locale' (string - the currently active locale), 'locales' (string[] - all supported locales), and 'defaultLocale' (string - the configured default locale)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/use-router"]]],"topic":[0,"nextjs"],"slug":[0,"what-three-locale-related-properties-does-userouter-provide-in-next-js-pages-rou"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-three-locale-related-properties-does-userouter-provide-in-next-js-pages-rou" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-three-locale-related-properties-does-userouter-provide-in-next-js-pages-rou" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What three locale-related properties does useRouter provide in Next.js Pages Router when i18n is enabled?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useRouter provides: 'locale' (string - the currently active locale), 'locales' (string[] - all supported locales), and 'defaultLocale' (string - the configured default locale).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/use-router" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1mFEYV" prefix="r5694" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14167516653752398776"],"question":[0,"What format should generateStaticParams return for statically generating locale routes in Next.js App Router?"],"answer":[0,"It should return an array of objects with the locale property matching your dynamic segment name. Example: export function generateStaticParams() { return [{ lang: 'en-US' }, { lang: 'de' }] } or return ['en', 'fr'].map((locale) => ({ locale }))"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-format-should-generatestaticparams-return-for-statically-generating-locale-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-format-should-generatestaticparams-return-for-statically-generating-locale-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-format-should-generatestaticparams-return-for-statically-generating-locale-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What format should generateStaticParams return for statically generating locale routes in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It should return an array of objects with the locale property matching your dynamic segment name. Example: export function generateStaticParams() { return [{ lang: 'en-US' }, { lang: 'de' }] } or return ['en', 'fr'].map((locale) => ({ locale }))</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="25zWqC" prefix="r5695" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14569623683286033981"],"question":[0,"What known issue exists when using new Negotiator({ headers }).languages() with Next.js middleware?"],"answer":[0,"The Negotiator library may return ['*'] when it doesn't recognize the NextRequest object, which causes the match function from @formatjs/intl-localematcher to throw an error about incorrect locale information. The workaround is to convert NextRequest headers to a plain object before passing to Negotiator."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/issues/58556"]]],"topic":[0,"nextjs"],"slug":[0,"what-known-issue-exists-when-using-new-negotiator-headers-languages-with-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-known-issue-exists-when-using-new-negotiator-headers-languages-with-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-known-issue-exists-when-using-new-negotiator-headers-languages-with-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What known issue exists when using new Negotiator({ headers }).languages() with Next.js middleware?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Negotiator library may return ['*'] when it doesn't recognize the NextRequest object, which causes the match function from @formatjs/intl-localematcher to throw an error about incorrect locale information. The workaround is to convert NextRequest headers to a plain object before passing to Negotiator.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/issues/58556" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1OvCDV" prefix="r5696" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14576428358292904272"],"question":[0,"What matching algorithm does @formatjs/intl-localematcher use for locale matching in Next.js?"],"answer":[0,"It uses the 'best fit' algorithm to determine the best-matching locale. This is expected to provide better results than the more conservative 'lookup' algorithm specified in RFC 4647."],"confidence":[0,0.95],"sources":[1,[[0,"https://next-intl.dev/docs/routing/middleware"]]],"topic":[0,"nextjs"],"slug":[0,"what-matching-algorithm-does-formatjs-intl-localematcher-use-for-locale-matching"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-matching-algorithm-does-formatjs-intl-localematcher-use-for-locale-matching" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-matching-algorithm-does-formatjs-intl-localematcher-use-for-locale-matching" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What matching algorithm does @formatjs/intl-localematcher use for locale matching in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It uses the 'best fit' algorithm to determine the best-matching locale. This is expected to provide better results than the more conservative 'lookup' algorithm specified in RFC 4647.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://next-intl.dev/docs/routing/middleware" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>next-intl.dev</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2560Xz" prefix="r5697" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14637692702772433937"],"question":[0,"What package should be imported in a getDictionary function to ensure translations only run on the server in Next.js App Router?"],"answer":[0,"Import 'server-only' at the top of the file. Example: import 'server-only' at the beginning of the dictionary file ensures translation code only runs on the server and doesn't affect client bundle size."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-package-should-be-imported-in-a-getdictionary-function-to-ensure-translatio"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-package-should-be-imported-in-a-getdictionary-function-to-ensure-translatio" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-package-should-be-imported-in-a-getdictionary-function-to-ensure-translatio" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What package should be imported in a getDictionary function to ensure translations only run on the server in Next.js App Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Import 'server-only' at the top of the file. Example: import 'server-only' at the beginning of the dictionary file ensures translation code only runs on the server and doesn't affect client bundle size.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="internationalization-static-generation-rendering" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Internationalization > Static Generation & Rendering</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 16 questions </span> </div> <div class="space-y-4"> <astro-island uid="Z1q5TYs" prefix="r5698" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"210384952288561823"],"question":[0,"In Next.js Pages Router with i18n, how can you opt-out of pre-rendering a specific locale variant of a page?"],"answer":[0,"You can return `notFound: true` from getStaticProps and that variant of the page will not be generated for that locale."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-pages-router-with-i18n-how-can-you-opt-out-of-pre-rendering-a-specifi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-pages-router-with-i18n-how-can-you-opt-out-of-pre-rendering-a-specifi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-pages-router-with-i18n-how-can-you-opt-out-of-pre-rendering-a-specifi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js Pages Router with i18n, how can you opt-out of pre-rendering a specific locale variant of a page?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You can return <code>notFound: true</code> from getStaticProps and that variant of the page will not be generated for that locale.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="nbqFC" prefix="r5699" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"870838653866864971"],"question":[0,"When does generateStaticParams execute during next dev versus next build?"],"answer":[0,"During `next dev`, it executes when navigating to a route. During `next build`, it runs before corresponding layouts/pages generate. It won't execute again during revalidation (ISR)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"when-does-generatestaticparams-execute-during-next-dev-versus-next-build"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="when-does-generatestaticparams-execute-during-next-dev-versus-next-build" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#when-does-generatestaticparams-execute-during-next-dev-versus-next-build" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">When does generateStaticParams execute during next dev versus next build?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>During <code>next dev</code>, it executes when navigating to a route. During <code>next build</code>, it runs before corresponding layouts/pages generate. It won't execute again during revalidation (ISR).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1pkbYk" prefix="r5700" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1807434139195800013"],"question":[0,"What are the two required fields in the i18n configuration object in next.config.js for Next.js Pages Router?"],"answer":[0,"The two required fields are: `locales` (an array of all the locales you want to support) and `defaultLocale` (the default locale used when visiting a non-locale prefixed path, which must be one of the values from the locales array)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-required-fields-in-the-i18n-configuration-object-in-next-config"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-required-fields-in-the-i18n-configuration-object-in-next-config" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-required-fields-in-the-i18n-configuration-object-in-next-config" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two required fields in the i18n configuration object in next.config.js for Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The two required fields are: <code>locales</code> (an array of all the locales you want to support) and <code>defaultLocale</code> (the default locale used when visiting a non-locale prefixed path, which must be one of the values from the locales array).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZH1SWz" prefix="r5701" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1823298648045029770"],"question":[0,"In Next.js 15 App Router, how must you access the params prop in page and layout components?"],"answer":[0,"You must use async/await or React's use function to access params values (e.g., `const { lang } = await params`). In version 14 and earlier, params was synchronous, but accessing it synchronously in Next.js 15 will be deprecated in the future."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-15-app-router-how-must-you-access-the-params-prop-in-page-and-layout-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-15-app-router-how-must-you-access-the-params-prop-in-page-and-layout-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-15-app-router-how-must-you-access-the-params-prop-in-page-and-layout-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js 15 App Router, how must you access the params prop in page and layout components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>You must use async/await or React's use function to access params values (e.g., <code>const { lang } = await params</code>). In version 14 and earlier, params was synchronous, but accessing it synchronously in Next.js 15 will be deprecated in the future.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2eW8H5" prefix="r5702" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2055189708352741779"],"question":[0,"What does generateStaticParams return for a route with a single dynamic segment like /product/[id]?"],"answer":[0,"It returns an array of objects where each object has the segment name as a property with a string value, for example: `{ id: string }[]`."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-static-params"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-generatestaticparams-return-for-a-route-with-a-single-dynamic-segment-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-generatestaticparams-return-for-a-route-with-a-single-dynamic-segment-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-generatestaticparams-return-for-a-route-with-a-single-dynamic-segment-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does generateStaticParams return for a route with a single dynamic segment like /product/[id]?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>It returns an array of objects where each object has the segment name as a property with a string value, for example: <code>{ id: string }[]</code>.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/functions/generate-static-params" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="XhIaB" prefix="r5703" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3532268301280974582"],"question":[0,"In Next.js App Router, what function is used to generate static routes for multiple locales?"],"answer":[0,"generateStaticParams is used to generate static routes for a given set of locales. It can be used with any page or layout, typically returning an array like [{ lang: 'en-US' }, { lang: 'de' }]."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-app-router-what-function-is-used-to-generate-static-routes-for-multip"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-app-router-what-function-is-used-to-generate-static-routes-for-multip" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-app-router-what-function-is-used-to-generate-static-routes-for-multip" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js App Router, what function is used to generate static routes for multiple locales?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>generateStaticParams is used to generate static routes for a given set of locales. It can be used with any page or layout, typically returning an array like [{ lang: 'en-US' }, { lang: 'de' }].</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZnzYVG" prefix="r5704" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4130704052758751213"],"question":[0,"What standardized format does Next.js use for locale identifiers in the i18n configuration?"],"answer":[0,"Next.js uses UTS Locale Identifiers, which generally have the format `language-region-script` separated by dashes, where region and script are optional (e.g., 'en-US', 'fr', 'nl-NL')."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-standardized-format-does-next-js-use-for-locale-identifiers-in-the-i18n-con"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-standardized-format-does-next-js-use-for-locale-identifiers-in-the-i18n-con" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-standardized-format-does-next-js-use-for-locale-identifiers-in-the-i18n-con" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What standardized format does Next.js use for locale identifiers in the i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js uses UTS Locale Identifiers, which generally have the format <code>language-region-script</code> separated by dashes, where region and script are optional (e.g., 'en-US', 'fr', 'nl-NL').</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="JaGzx" prefix="r5705" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4257095658902280387"],"question":[0,"How many times is getStaticProps called during build if you have 50 locales configured with 10 non-dynamic pages using getStaticProps in Next.js Pages Router?"],"answer":[0,"getStaticProps will be called 500 times (50 locales × 10 pages), and 50 versions of the 10 pages will be generated during each build."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"how-many-times-is-getstaticprops-called-during-build-if-you-have-50-locales-conf"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-many-times-is-getstaticprops-called-during-build-if-you-have-50-locales-conf" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-many-times-is-getstaticprops-called-during-build-if-you-have-50-locales-conf" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How many times is getStaticProps called during build if you have 50 locales configured with 10 non-dynamic pages using getStaticProps in Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>getStaticProps will be called 500 times (50 locales × 10 pages), and 50 versions of the 10 pages will be generated during each build.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2euqpj" prefix="r5706" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5167117249164950567"],"question":[0,"In Next.js Pages Router, what i18n-related properties are available on the context parameter in getStaticPaths?"],"answer":[0,"When leveraging getStaticPaths with i18n, the context parameter includes `locales` (the configured locales) and `defaultLocale` (the configured default locale)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/building-your-application/routing/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-pages-router-what-i18n-related-properties-are-available-on-the-contex"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-pages-router-what-i18n-related-properties-are-available-on-the-contex" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-pages-router-what-i18n-related-properties-are-available-on-the-contex" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js Pages Router, what i18n-related properties are available on the context parameter in getStaticPaths?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When leveraging getStaticPaths with i18n, the context parameter includes <code>locales</code> (the configured locales) and <code>defaultLocale</code> (the configured default locale).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/building-your-application/routing/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="C2HHP" prefix="r5707" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"5244520006108291255"],"question":[0,"In Next.js Pages Router with i18n, what properties are available on the context object in getStaticProps for internationalization?"],"answer":[0,"The context object in getStaticProps includes three i18n properties: `locale` (contains the active locale if enabled), `locales` (contains all supported locales if enabled), and `defaultLocale` (contains the configured default locale if enabled)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/api-reference/functions/get-static-props"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-pages-router-with-i18n-what-properties-are-available-on-the-context-o"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-pages-router-with-i18n-what-properties-are-available-on-the-context-o" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-pages-router-with-i18n-what-properties-are-available-on-the-context-o" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js Pages Router with i18n, what properties are available on the context object in getStaticProps for internationalization?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The context object in getStaticProps includes three i18n properties: <code>locale</code> (contains the active locale if enabled), <code>locales</code> (contains all supported locales if enabled), and <code>defaultLocale</code> (contains the configured default locale if enabled).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/api-reference/functions/get-static-props" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1y1pX7" prefix="r5708" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8068005078595282907"],"question":[0,"What are the two main locale handling strategies available in Next.js Pages Router i18n?"],"answer":[0,"Sub-path Routing (locale in the URL path like /fr/blog) and Domain Routing (different domains for different locales like example.fr)."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-two-main-locale-handling-strategies-available-in-next-js-pages-rout"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-two-main-locale-handling-strategies-available-in-next-js-pages-rout" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-two-main-locale-handling-strategies-available-in-next-js-pages-rout" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the two main locale handling strategies available in Next.js Pages Router i18n?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Sub-path Routing (locale in the URL path like /fr/blog) and Domain Routing (different domains for different locales like example.fr).</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="pHFcf" prefix="r5709" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8189301201620345338"],"question":[0,"Is the Next.js Pages Router i18n configuration (i18n in next.config.js) compatible with static export (output: 'export')?"],"answer":[0,"No, Next.js does not support i18n with output: 'export'. The built-in i18n routing feature requires server-side functionality and is not compatible with static site generation. You must remove i18n from next.config.js to use static export."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/messages/export-no-i18n"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-next-js-pages-router-i18n-configuration-i18n-in-next-config-js-compatible"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-next-js-pages-router-i18n-configuration-i18n-in-next-config-js-compatible" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-next-js-pages-router-i18n-configuration-i18n-in-next-config-js-compatible" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the Next.js Pages Router i18n configuration (i18n in next.config.js) compatible with static export (output: 'export')?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, Next.js does not support i18n with output: 'export'. The built-in i18n routing feature requires server-side functionality and is not compatible with static site generation. You must remove i18n from next.config.js to use static export.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/messages/export-no-i18n" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2pyyM3" prefix="r5710" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"10056775066754165354"],"question":[0,"What happens when localeDetection is set to false in Next.js i18n configuration?"],"answer":[0,"When localeDetection is set to false, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale-based domain or locale path."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-when-localedetection-is-set-to-false-in-next-js-i18n-configuration"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-when-localedetection-is-set-to-false-in-next-js-i18n-configuration" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-when-localedetection-is-set-to-false-in-next-js-i18n-configuration" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens when localeDetection is set to false in Next.js i18n configuration?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>When localeDetection is set to false, Next.js will no longer automatically redirect based on the user's preferred locale and will only provide locale information detected from either the locale-based domain or locale path.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZSFogW" prefix="r5711" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11301697473987951886"],"question":[0,"What is the optional http field used for in the i18n domains configuration in next.config.js?"],"answer":[0,"The optional `http` field (set to true) can be used to test locale domains locally with http instead of https."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-optional-http-field-used-for-in-the-i18n-domains-configuration-in-ne"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-optional-http-field-used-for-in-the-i18n-domains-configuration-in-ne" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-optional-http-field-used-for-in-the-i18n-domains-configuration-in-ne" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the optional http field used for in the i18n domains configuration in next.config.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The optional <code>http</code> field (set to true) can be used to test locale domains locally with http instead of https.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZuyrIt" prefix="r5712" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11694051638808798620"],"question":[0,"What happens to Automatically Statically Optimized pages and non-dynamic getStaticProps pages when i18n is enabled in Next.js Pages Router?"],"answer":[0,"A version of the page will be generated for each configured locale. This can significantly increase build times depending on how many locales are configured."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-automatically-statically-optimized-pages-and-non-dynamic-getstat"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-automatically-statically-optimized-pages-and-non-dynamic-getstat" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-automatically-statically-optimized-pages-and-non-dynamic-getstat" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to Automatically Statically Optimized pages and non-dynamic getStaticProps pages when i18n is enabled in Next.js Pages Router?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>A version of the page will be generated for each configured locale. This can significantly increase build times depending on how many locales are configured.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="sLjqw" prefix="r5713" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13607742851092339710"],"question":[0,"In Next.js Pages Router with domain routing and i18n, what happens when a user with Accept-Language header fr;q=0.9 visits example.com (configured for en-US) when example.fr exists for the fr locale?"],"answer":[0,"The user will be redirected to example.fr since that domain handles the fr locale by default."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/pages/guides/internationalization"]]],"topic":[0,"nextjs"],"slug":[0,"in-next-js-pages-router-with-domain-routing-and-i18n-what-happens-when-a-user-wi"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="in-next-js-pages-router-with-domain-routing-and-i18n-what-happens-when-a-user-wi" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#in-next-js-pages-router-with-domain-routing-and-i18n-what-happens-when-a-user-wi" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">In Next.js Pages Router with domain routing and i18n, what happens when a user with Accept-Language header fr;q=0.9 visits example.com (configured for en-US) when example.fr exists for the fr locale?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The user will be redirected to example.fr since that domain handles the fr locale by default.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/pages/guides/internationalization" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="accessibility" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Accessibility</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 16 questions </span> </div> <div class="space-y-4"> <astro-island uid="ZTx29h" prefix="r5714" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"492068029941930933"],"question":[0,"What is the default tabIndex value for the Next.js Link component?"],"answer":[0,"The Next.js Link component has a default tabIndex of 0, which means it can receive keyboard focus and be activated with the keyboard in the natural tab order."],"confidence":[0,0.95],"sources":[1,[[0,"https://blog.openreplay.com/accessibility-in-next-js-version-13/"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-tabindex-value-for-the-next-js-link-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-tabindex-value-for-the-next-js-link-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-tabindex-value-for-the-next-js-link-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default tabIndex value for the Next.js Link component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Next.js Link component has a default tabIndex of 0, which means it can receive keyboard focus and be activated with the keyboard in the natural tab order.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://blog.openreplay.com/accessibility-in-next-js-version-13/" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>blog.openreplay.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZfiOIb" prefix="r5715" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"1439498075246268074"],"question":[0,"Is the Next.js route announcer enabled by default?"],"answer":[0,"Yes, Next.js includes a route announcer by default for client-side transitions to ensure that client-side route changes are announced to assistive technology."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/accessibility"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-next-js-route-announcer-enabled-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-next-js-route-announcer-enabled-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-next-js-route-announcer-enabled-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the Next.js route announcer enabled by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, Next.js includes a route announcer by default for client-side transitions to ensure that client-side route changes are announced to assistive technology.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/accessibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="16lmBU" prefix="r5716" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2150678940878210187"],"question":[0,"Which ESLint plugin does Next.js include by default for accessibility checking?"],"answer":[0,"Next.js includes eslint-plugin-jsx-a11y by default to help catch accessibility issues early."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/accessibility"]]],"topic":[0,"nextjs"],"slug":[0,"which-eslint-plugin-does-next-js-include-by-default-for-accessibility-checking"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="which-eslint-plugin-does-next-js-include-by-default-for-accessibility-checking" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#which-eslint-plugin-does-next-js-include-by-default-for-accessibility-checking" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Which ESLint plugin does Next.js include by default for accessibility checking?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js includes eslint-plugin-jsx-a11y by default to help catch accessibility issues early.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/accessibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="ZB4Rtl" prefix="r5717" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2919376116984153536"],"question":[0,"What are the three purposes of the alt attribute on Next.js Image components?"],"answer":[0,"The alt property is used to: 1) describe the image for screen readers and search engines, 2) provide fallback text if images have been disabled, and 3) display text if an error occurs while loading the image."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-are-the-three-purposes-of-the-alt-attribute-on-next-js-image-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-are-the-three-purposes-of-the-alt-attribute-on-next-js-image-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-are-the-three-purposes-of-the-alt-attribute-on-next-js-image-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What are the three purposes of the alt attribute on Next.js Image components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The alt property is used to: 1) describe the image for screen readers and search engines, 2) provide fallback text if images have been disabled, and 3) display text if an error occurs while loading the image.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="vaJLd" prefix="r5718" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"3906839306285222286"],"question":[0,"What hook replaced useFormState in Next.js 15 / React 19?"],"answer":[0,"useActionState replaced useFormState in Next.js 15 / React 19. useFormState is now deprecated and will be removed in a future release, though it's kept around for backwards compatibility."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/guides/upgrading/version-15"]]],"topic":[0,"nextjs"],"slug":[0,"what-hook-replaced-useformstate-in-next-js-15-react-19"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-hook-replaced-useformstate-in-next-js-15-react-19" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-hook-replaced-useformstate-in-next-js-15-react-19" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What hook replaced useFormState in Next.js 15 / React 19?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>useActionState replaced useFormState in Next.js 15 / React 19. useFormState is now deprecated and will be removed in a future release, though it's kept around for backwards compatibility.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/guides/upgrading/version-15" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2h47jr" prefix="r5719" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"4252768092270102227"],"question":[0,"What alt text guideline does Next.js documentation specify for Image components?"],"answer":[0,"Alt text should contain text that could replace the image without changing the meaning of the page. It is not meant to supplement the image and should not repeat information that is already provided in the captions above or below the image."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"what-alt-text-guideline-does-next-js-documentation-specify-for-image-components"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-alt-text-guideline-does-next-js-documentation-specify-for-image-components" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-alt-text-guideline-does-next-js-documentation-specify-for-image-components" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What alt text guideline does Next.js documentation specify for Image components?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Alt text should contain text that could replace the image without changing the meaning of the page. It is not meant to supplement the image and should not repeat information that is already provided in the captions above or below the image.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2lnsmO" prefix="r5720" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6538596374511634797"],"question":[0,"Does the Next.js Link component require a child <a> tag in Next.js 13+?"],"answer":[0,"No, in Next.js 13+, the Link component API has been updated and no longer requires wrapping children in an <a> tag, which resolves the jsx-a11y/anchor-is-valid ESLint conflict that existed in earlier versions."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/402"]]],"topic":[0,"nextjs"],"slug":[0,"does-the-next-js-link-component-require-a-child-a-tag-in-next-js-13"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="does-the-next-js-link-component-require-a-child-a-tag-in-next-js-13" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#does-the-next-js-link-component-require-a-child-a-tag-in-next-js-13" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Does the Next.js Link component require a child <a> tag in Next.js 13+?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>No, in Next.js 13+, the Link component API has been updated and no longer requires wrapping children in an <a> tag, which resolves the jsx-a11y/anchor-is-valid ESLint conflict that existed in earlier versions.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/402" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="zBNVs" prefix="r5721" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"6877902539087770789"],"question":[0,"What does Zod's safeParse() method return when validating form data in Next.js?"],"answer":[0,"Zod's safeParse() method returns an object containing either a 'success' or 'error' field, allowing for graceful error handling without try/catch blocks."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/improving-accessibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-does-zod-s-safeparse-method-return-when-validating-form-data-in-next-js"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-does-zod-s-safeparse-method-return-when-validating-form-data-in-next-js" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-does-zod-s-safeparse-method-return-when-validating-form-data-in-next-js" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What does Zod's safeParse() method return when validating form data in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Zod's safeParse() method returns an object containing either a 'success' or 'error' field, allowing for graceful error handling without try/catch blocks.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/improving-accessibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="2a4iQB" prefix="r5722" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7097423017936823343"],"question":[0,"What is the difference between eslint-config-next and eslint-config-next/core-web-vitals regarding accessibility?"],"answer":[0,"The core-web-vitals configuration includes everything from the base eslint-config-next, plus upgrades rules that impact Core Web Vitals from warnings to errors. It is stricter and recommended for most projects, including accessibility checks via eslint-plugin-jsx-a11y."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/config/eslint"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-difference-between-eslint-config-next-and-eslint-config-next-core-we" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the difference between eslint-config-next and eslint-config-next/core-web-vitals regarding accessibility?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The core-web-vitals configuration includes everything from the base eslint-config-next, plus upgrades rules that impact Core Web Vitals from warnings to errors. It is stricter and recommended for most projects, including accessibility checks via eslint-plugin-jsx-a11y.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/config/eslint" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1taLtq" prefix="r5723" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"7916724436889585254"],"question":[0,"What two arguments does the React useActionState hook accept in Next.js forms?"],"answer":[0,"The useActionState hook accepts two arguments: (action, initialState) and returns the form state plus a submission function."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/improving-accessibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-two-arguments-does-the-react-useactionstate-hook-accept-in-next-js-forms"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-two-arguments-does-the-react-useactionstate-hook-accept-in-next-js-forms" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-two-arguments-does-the-react-useactionstate-hook-accept-in-next-js-forms" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What two arguments does the React useActionState hook accept in Next.js forms?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The useActionState hook accepts two arguments: (action, initialState) and returns the form state plus a submission function.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/improving-accessibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1vKpcY" prefix="r5724" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"8884273045676936643"],"question":[0,"Is the alt prop required for the Next.js Image component?"],"answer":[0,"Yes, the alt prop is required for the Next.js Image component. TypeScript will show a type error if it's omitted, and the component will throw an error: 'Image is missing required \"alt\" property.'"],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/components/image"]]],"topic":[0,"nextjs"],"slug":[0,"is-the-alt-prop-required-for-the-next-js-image-component"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="is-the-alt-prop-required-for-the-next-js-image-component" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#is-the-alt-prop-required-for-the-next-js-image-component" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">Is the alt prop required for the Next.js Image component?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Yes, the alt prop is required for the Next.js Image component. TypeScript will show a type error if it's omitted, and the component will throw an error: 'Image is missing required "alt" property.'</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/app/api-reference/components/image" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2fNhAg" prefix="r5725" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"9520045108748260870"],"question":[0,"What ARIA live region politeness level does the Next.js route announcer use?"],"answer":[0,"The Next.js route announcer uses aria-live=\"assertive\" with role=\"alert\". This means route announcements will interrupt any announcement a screen reader is currently making."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/discussions/48097"]]],"topic":[0,"nextjs"],"slug":[0,"what-aria-live-region-politeness-level-does-the-next-js-route-announcer-use"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-aria-live-region-politeness-level-does-the-next-js-route-announcer-use" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-aria-live-region-politeness-level-does-the-next-js-route-announcer-use" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What ARIA live region politeness level does the Next.js route announcer use?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Next.js route announcer uses aria-live="assertive" with role="alert". This means route announcements will interrupt any announcement a screen reader is currently making.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/discussions/48097" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="wyzUu" prefix="r5726" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"11541608013134909643"],"question":[0,"What HTML elements does Next.js recommend for semantic form structure?"],"answer":[0,"Next.js emphasizes using semantic HTML elements (<input>, <label>) with proper labeling using htmlFor attributes to connect labels to inputs, and maintaining focus outlines for keyboard navigation visibility."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/learn/dashboard-app/improving-accessibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-html-elements-does-next-js-recommend-for-semantic-form-structure"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-html-elements-does-next-js-recommend-for-semantic-form-structure" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-html-elements-does-next-js-recommend-for-semantic-form-structure" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What HTML elements does Next.js recommend for semantic form structure?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js emphasizes using semantic HTML elements (<input>, <label>) with proper labeling using htmlFor attributes to connect labels to inputs, and maintaining focus outlines for keyboard navigation visibility.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/learn/dashboard-app/improving-accessibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="1VfShJ" prefix="r5727" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"12734407994037500152"],"question":[0,"What happens to form submissions in Client Components when JavaScript hasn't loaded yet in Next.js?"],"answer":[0,"In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations"]]],"topic":[0,"nextjs"],"slug":[0,"what-happens-to-form-submissions-in-client-components-when-javascript-hasn-t-loa"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-happens-to-form-submissions-in-client-components-when-javascript-hasn-t-loa" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-happens-to-form-submissions-in-client-components-when-javascript-hasn-t-loa" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What happens to form submissions in Client Components when JavaScript hasn't loaded yet in Next.js?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>In Client Components, forms invoking Server Actions will queue submissions if JavaScript isn't loaded yet, prioritizing client hydration. After hydration, the browser does not refresh on form submission.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/14/app/building-your-application/data-fetching/server-actions-and-mutations" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z1nj8lv" prefix="r5728" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"13933954218631677053"],"question":[0,"What specific ARIA-related ESLint rules does Next.js include by default?"],"answer":[0,"Next.js includes these eslint-plugin-jsx-a11y rules set to 'warn': aria-props, aria-proptypes, aria-unsupported-elements, role-has-required-aria-props, and role-supports-aria-props."],"confidence":[0,0.95],"sources":[1,[[0,"https://github.com/vercel/next.js/pull/25770"]]],"topic":[0,"nextjs"],"slug":[0,"what-specific-aria-related-eslint-rules-does-next-js-include-by-default"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-specific-aria-related-eslint-rules-does-next-js-include-by-default" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-specific-aria-related-eslint-rules-does-next-js-include-by-default" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What specific ARIA-related ESLint rules does Next.js include by default?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Next.js includes these eslint-plugin-jsx-a11y rules set to 'warn': aria-props, aria-proptypes, aria-unsupported-elements, role-has-required-aria-props, and role-supports-aria-props.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://github.com/vercel/next.js/pull/25770" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>github.com</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island><astro-island uid="Z2cH6je" prefix="r5729" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"14091046916760526990"],"question":[0,"What is the default priority order the Next.js route announcer uses to identify page names for announcement?"],"answer":[0,"The Next.js route announcer looks for the page name to announce by first inspecting document.title, then the <h1> element, and finally the URL pathname."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/architecture/accessibility"]]],"topic":[0,"nextjs"],"slug":[0,"what-is-the-default-priority-order-the-next-js-route-announcer-uses-to-identify-"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="what-is-the-default-priority-order-the-next-js-route-announcer-uses-to-identify-" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#what-is-the-default-priority-order-the-next-js-route-announcer-uses-to-identify-" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">What is the default priority order the Next.js route announcer uses to identify page names for announcement?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>The Next.js route announcer looks for the page name to announce by first inspecting document.title, then the <h1> element, and finally the URL pathname.</p> </div><div class="mt-4 pt-3 border-t border-gray-100"><span class="text-xs font-medium text-gray-500 uppercase tracking-wide">Sources</span><div class="mt-1.5 flex flex-wrap gap-2"><a href="https://nextjs.org/docs/architecture/accessibility" target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 hover:text-gray-800 rounded transition-colors"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>nextjs.org</a></div></div><div class="mt-4 flex items-center justify-between flex-wrap gap-2"><div class="flex items-center gap-2"><span class="text-sm text-amber-600 font-medium">95% confidence</span></div><button class="inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-colors"><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>Copy Answer</button></div></div></div></div></article><!--astro:end--></astro-island> </div> </section><section id="metadata-and-seo-metadata-composition" class="scroll-mt-24"> <div class="flex items-center gap-3 mb-6"> <h2 class="text-2xl font-bold text-gray-900">Metadata and SEO > Metadata Composition</h2> <span class="px-2.5 py-1 bg-gray-100 text-gray-600 text-sm font-medium rounded-lg"> 16 questions </span> </div> <div class="space-y-4"> <astro-island uid="LvfSD" prefix="r5730" component-url="/_astro/QACard.CAOZijaD.js" component-export="default" renderer-url="/_astro/client.DrE9CFQR.js" props="{"id":[0,"2748966583699268190"],"question":[0,"How can you provide a title that ignores title.template from parent segments?"],"answer":[0,"Use title.absolute to provide a title that ignores title.template set in parent segments. For example: title: { absolute: 'About' } will output <title>About</title> without applying any parent template."],"confidence":[0,0.95],"sources":[1,[[0,"https://nextjs.org/docs/app/api-reference/functions/generate-metadata"]]],"topic":[0,"nextjs"],"slug":[0,"how-can-you-provide-a-title-that-ignores-title-template-from-parent-segments"]}" ssr="" client="visible" opts="{"name":"QACard","value":true}" await-children=""><article id="how-can-you-provide-a-title-that-ignores-title-template-from-parent-segments" class="scroll-mt-20 bg-white border border-gray-200 rounded-xl mb-4 hover:border-gray-300 transition-colors"><div class="p-5 border-b border-gray-100"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-amber-500 text-white text-xs font-bold rounded flex-shrink-0">Q</span><div class="flex-1"><a href="#how-can-you-provide-a-title-that-ignores-title-template-from-parent-segments" class="text-lg font-medium text-gray-900 hover:text-amber-600 transition-colors">How can you provide a title that ignores title.template from parent segments?</a></div><div class="flex items-center gap-2 flex-shrink-0"><button class="p-1.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition-colors" title="Copy link to this Q&A" aria-label="Copy link to this answer"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path></svg></button></div></div></div><div class="p-5"><div class="flex items-start gap-3"><span class="px-2.5 py-1 bg-gray-900 text-white text-xs font-bold rounded flex-shrink-0">A</span><div class="flex-1 min-w-0"><div class="prose prose-sm max-w-none prose-p:my-2 prose-code:bg-gray-100 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-gray-800 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-gray-900 prose-pre:text-gray-100"><p>Use title.absolute to provide a title that ignores title.template set in parent segments. For example: title: { absolute: 'About' } will output <title>About without applying any parent template.

Sources
95% confidence
A

Metadata is evaluated in order starting from the root segment down to the segment closest to the final page.js segment. For example, for route app/blog/[slug]/page.tsx, evaluation proceeds: 1) app/layout.tsx (Root Layout), 2) app/blog/layout.tsx (Nested Blog Layout), 3) app/blog/[slug]/page.tsx (Blog Page).

Sources
95% confidence
A

title.template uses %s as a placeholder that gets replaced with child page titles. For example, template: '%s | Acme' in a parent layout transforms a child title of 'About' into 'About | Acme'. The template applies to child route segments and not the segment it's defined in.

Sources
95% confidence

Styling > CSS Preprocessors

14 questions

Loading UI and Streaming > SEO and Crawler Considerations

14 questions

Route Handlers > Caching & Rendering Behavior

14 questions

optimization

12 questions
A

No, Next.js does not prefetch on hover by default.

The default prefetch behavior depends on which router you're using:

App Router (v13+)

Default prefetching triggers when the <Link /> component enters the viewport (on initial load or through scroll). Hover is not a default trigger.

  • Default prefetch value: null or "auto"
  • Trigger: Viewport visibility
  • Hover behavior: May re-prefetch if cached data has expired, but hover is not the primary trigger

Pages Router (Legacy)

Default prefetching also triggers on viewport entry, not hover.

  • Default prefetch value: true
  • Trigger: Viewport visibility
  • Special case: Only when you explicitly set prefetch={false} does it switch to prefetching on hover instead

Key point: In both routers, the default trigger is viewport entry. Hover-based prefetching only occurs in the Pages Router when you explicitly disable viewport prefetching with prefetch={false}.

Note: Prefetching only works in production builds, not in development mode.

Sources:

95% confidence
A

No, prefetching is only enabled in production in Next.js.

During development mode, the <Link> component does not automatically prefetch routes when they enter the viewport. This behavior is intentional to optimize the development experience.

In production, prefetching occurs automatically when <Link> components become visible in the viewport (initially or through scroll), loading the linked route and its data in the background to improve client-side navigation performance.

Sources:

95% confidence
A

Install @next/bundle-analyzer and configure it in next.config.js:

1. Install:

npm i @next/bundle-analyzer

2. Configure next.config.js:

const withBundleAnalyzer = require('@next/bundle-analyzer')({
  enabled: process.env.ANALYZE === 'true',
})

/** @type {import('next').NextConfig} */
const nextConfig = {}

module.exports = withBundleAnalyzer(nextConfig)

3. Run analysis:

ANALYZE=true npm run build

This opens three browser tabs showing visual reports of your bundle sizes and module dependencies for client, server, and edge runtimes.

Sources:

95% confidence
A

Use the Next.js Script component by importing next/script and choosing the appropriate loading strategy to optimize third-party script performance.

Basic Usage:

import Script from 'next/script'

export default function MyApp() {
  return (
    <>
      <Script src="https://example.com/script.js" />
    </>
  )
}

Loading Strategies (the strategy prop):

  1. beforeInteractive - Loads before page hydration. Must be placed in the root layout. Use for critical scripts needed site-wide (bot detectors, consent managers).
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <Script
          src="https://example.com/consent-manager.js"
          strategy="beforeInteractive"
        />
      </body>
    </html>
  )
}
  1. afterInteractive (default) - Loads early after some hydration. Use for tag managers and analytics.
<Script
  src="https://www.googletagmanager.com/gtag/js?id=GA_ID"
  strategy="afterInteractive"
/>
  1. lazyOnload - Loads during browser idle time. Use for non-critical scripts (chat widgets, social media embeds).
<Script
  src="https://connect.facebook.net/en_US/sdk.js"
  strategy="lazyOnload"
/>
  1. worker (experimental) - Offloads to web worker. Requires nextScriptWorkers: true in next.config.js.

Event Handlers (require Client Components):

'use client'

import Script from 'next/script'

export default function Page() {
  return (
    <Script
      src="https://example.com/script.js"
      onLoad={() => {
        console.log('Script loaded')
      }}
      onReady={() => {
        console.log('Script ready')
      }}
      onError={(e) => {
        console.error('Script failed to load', e)
      }}
    />
  )
}

Inline Scripts:

<Script id="show-banner" strategy="lazyOnload">
  {`document.getElementById('banner').classList.remove('hidden')`}
</Script>

Optimization Key: Next.js ensures scripts load only once even when navigating between routes that share the same layout.

Sources:

95% confidence
A

Use the strategy="lazyOnload" prop on Next.js's Script component to defer non-critical scripts until browser idle time:

import Script from 'next/script'

export default function Page() {
  return (
    <>
      <Script src="https://example.com/script.js" strategy="lazyOnload" />
    </>
  )
}

How it works:

  • Loads after all page resources have been fetched
  • Executes during browser idle time
  • Does not block page interactivity

Best for:

  • Chat support plugins
  • Social media widgets
  • Analytics that aren't time-sensitive
  • Any third-party script that doesn't need immediate execution

The Script component must be imported from next/script and can be placed in any page or layout component.

Sources:

95% confidence
A

Install @next/bundle-analyzer and configure it to analyze your Next.js bundle size:

1. Install the package:

npm i @next/bundle-analyzer
# or
yarn add @next/bundle-analyzer
# or
pnpm add @next/bundle-analyzer

2. Configure in next.config.js:

const withBundleAnalyzer = require('@next/bundle-analyzer')({
  enabled: process.env.ANALYZE === 'true',
})

/** @type {import('next').NextConfig} */
const nextConfig = {}

module.exports = withBundleAnalyzer(nextConfig)

3. Run the analysis:

ANALYZE=true npm run build
# or
ANALYZE=true yarn build
# or
ANALYZE=true pnpm build

This will build your application and automatically open three browser tabs with visual reports showing the size of each module and their dependencies. Use these reports to identify large dependencies, optimize code splitting, and reduce client-side bundle size.

Sources:

95% confidence
A

No. The beforeInteractive strategy cannot be used outside _document (Pages Router) or root layout.tsx (App Router).

Pages Router: beforeInteractive must be placed inside pages/_document.js

App Router: beforeInteractive must be placed inside the root app/layout.tsx

This restriction exists because beforeInteractive scripts are injected into the initial HTML from the server and must load before any Next.js module. They need to be defined at the document/root layout level to ensure they're available for the entire application.

If you try to use beforeInteractive elsewhere, Next.js will throw an error.

Example (App Router):

// app/layout.tsx ✅ Correct
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <Script src="https://example.com/script.js" strategy="beforeInteractive" />
        {children}
      </body>
    </html>
  )
}
// app/page.tsx ❌ Will error
import Script from 'next/script'

export default function Page() {
  return <Script src="https://example.com/script.js" strategy="beforeInteractive" />
}

Sources:

95% confidence
A

The default loading strategy for next/script in Next.js is afterInteractive.

When you use the Script component without specifying a strategy prop, it defaults to afterInteractive, which loads the script early but after some hydration on the page occurs.

Example:

import Script from 'next/script'

export default function Page() {
  return (
    <Script src="https://example.com/script.js" />
    // This uses afterInteractive by default
  )
}

The available strategy options are:

  • afterInteractive (default) - Load early but after some hydration
  • beforeInteractive - Load before any Next.js code and before page hydration
  • lazyOnload - Load during browser idle time
  • worker (experimental) - Load in a web worker

Sources:

95% confidence
A

Import dynamic from next/dynamic and wrap your component import:

import dynamic from 'next/dynamic'

const DynamicComponent = dynamic(() => import('../components/MyComponent'))

With loading state:

const DynamicComponent = dynamic(
  () => import('../components/MyComponent'),
  { loading: () => <p>Loading...</p> }
)

Disable SSR (client-side only):

const DynamicComponent = dynamic(
  () => import('../components/MyComponent'),
  { ssr: false }
)

With named exports:

const DynamicComponent = dynamic(() =>
  import('../components/MyComponent').then((mod) => mod.SpecificExport)
)

The component is then code-split into a separate bundle and loaded only when rendered, reducing initial bundle size.

Sources:

95% confidence

metadata_seo

10 questions
A

Perfect! I found the authoritative answer.

File-based metadata has higher priority. The opengraph-image.jpg file will override any metadata.openGraph configuration.

According to the official Next.js documentation, the explicit rule is:

"File-based metadata has the higher priority and will override any config-based metadata."

This means if you have both:

  • An opengraph-image.jpg file in a route segment
  • An openGraph.images property in your metadata export

The opengraph-image.jpg file takes precedence and will be used as the Open Graph image, ignoring the config-based metadata.openGraph settings.

Priority Order:

  1. File-based metadata (opengraph-image.jpg) - Highest priority
  2. Config-based metadata (metadata.openGraph) - Lower priority

Sources:

95% confidence
A

Generate dynamic OpenGraph images in Next.js using ImageResponse from next/og. There are two approaches:

Approach 1: File-based (Recommended)

Create an opengraph-image.tsx file in any route segment:

// app/opengraph-image.tsx
import { ImageResponse } from 'next/og'

export const alt = 'My Site'
export const size = { width: 1200, height: 630 }
export const contentType = 'image/png'

export default async function Image() {
  return new ImageResponse(
    (
      <div
        style={{
          fontSize: 128,
          background: 'white',
          width: '100%',
          height: '100%',
          display: 'flex',
          alignItems: 'center',
          justifyContent: 'center',
        }}
      >
        Hello World!
      </div>
    ),
    { ...size }
  )
}

For dynamic routes with parameters:

// app/posts/[slug]/opengraph-image.tsx
export default async function Image({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params
  
  return new ImageResponse(
    (
      <div style={{ /* styles */ }}>
        Post: {slug}
      </div>
    ),
    { width: 1200, height: 630 }
  )
}

Approach 2: Route Handler

Create an API route that returns ImageResponse:

// app/api/og/route.tsx
import { ImageResponse } from 'next/og'

export async function GET(request: Request) {
  const { searchParams } = new URL(request.url)
  const title = searchParams.get('title') || 'Default Title'

  return new ImageResponse(
    (
      <div style={{ /* styles */ }}>
        {title}
      </div>
    ),
    { width: 1200, height: 630 }
  )
}

Key Constraints

  • Only flexbox layout supported (no CSS Grid)
  • Subset of CSS properties only
  • 500KB maximum bundle size
  • Font formats: ttf, otf, or woff (ttf/otf preferred)
  • Images are statically optimized at build time unless using Dynamic APIs

Constructor Options

new ImageResponse(element, {
  width: 1200,
  height: 630,
  emoji: 'twemoji', // or 'blobmoji', 'noto', 'openmoji'
  fonts: [{ name: 'MyFont', data: fontBuffer, weight: 400 }],
  status: 200,
  headers: { 'Cache-Control': 'public, max-age=31536000' }
})

Sources:

95% confidence
A

Next.js provides two approaches for defining metadata:

Config-Based Metadata

Defined by exporting a static metadata object or dynamic generateMetadata function from layout.js or page.js files:

// Static metadata object
export const metadata = {
  title: 'My Page',
  description: 'Page description',
}

// OR dynamic metadata function
export async function generateMetadata({ params }) {
  return {
    title: params.slug,
  }
}

This approach is code-based and supported only in Server Components.

File-Based Metadata

Defined by adding special files to route segments using naming conventions:

  • favicon.ico, icon.jpg, apple-icon.jpg - for icons
  • opengraph-image.jpg, twitter-image.jpg - for social media images
  • robots.txt - for crawler instructions
  • sitemap.xml - for site structure

These files are placed in app directory folders and automatically generate corresponding <head> elements.

Key Difference

File-based metadata has higher priority and will override config-based metadata. File-based uses naming conventions for automatic generation, while config-based requires explicit code exports. Choose file-based for static assets like images/icons, and config-based for dynamic metadata that depends on runtime information.

Sources:

95% confidence
A

Export a Metadata object from a layout.js or page.js file:

import type { Metadata } from 'next'

export const metadata: Metadata = {
  title: 'Page Title',
  description: 'Page description',
}

export default function Page() {
  return <div>Your content</div>
}

Or in JavaScript:

export const metadata = {
  title: 'Page Title',
  description: 'Page description',
}

export default function Page() {
  return <div>Your content</div>
}

Key requirements:

  • Export must be from a Server Component (not Client Component)
  • Only in layout.js/page.js files (not regular components)
  • Cannot export both metadata object and generateMetadata function from the same file
  • Use static metadata export when values don't depend on runtime information
  • For dynamic metadata based on route params or external data, use generateMetadata() instead

Available fields: title, description, openGraph, twitter, robots, icons, viewport, alternates, and more.

Sources:

95% confidence
A

Export a generateMetadata function from a Server Component (page or layout) to dynamically generate metadata. The function receives route params and searchParams as promises and returns a Metadata object.

Basic syntax:

import type { Metadata } from 'next'

export async function generateMetadata(): Promise<Metadata> {
  return {
    title: 'My Page',
    description: 'Page description'
  }
}

With dynamic route parameters:

type Props = {
  params: Promise<{ id: string }>
  searchParams: Promise<{ [key: string]: string | string[] | undefined }>
}

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  const { id } = await params
  const product = await fetch(`https://api.example.com/products/${id}`)
    .then(res => res.json())
  
  return {
    title: product.title,
    description: product.description,
  }
}

Accessing parent metadata:

export async function generateMetadata(
  { params }: Props,
  parent: ResolvingMetadata
): Promise<Metadata> {
  const previousImages = (await parent).openGraph?.images || []
  
  return {
    openGraph: {
      images: ['/new-image.jpg', ...previousImages],
    },
  }
}

Key rules:

  • Only works in Server Components (not Client Components)
  • Cannot export both metadata object and generateMetadata from same file
  • fetch requests are automatically memoized across the rendering tree
  • searchParams only available in page.js, not layouts
  • File-based metadata (like opengraph-image.jpg) overrides generateMetadata

Sources:

95% confidence
A

Yes, you can use both redirect() and notFound() inside generateMetadata in Next.js.

The official Next.js documentation explicitly states: "The redirect() and notFound() Next.js methods can also be used inside generateMetadata."

This allows you to handle conditional routing based on metadata generation logic - for example, redirecting when a resource has moved or showing a 404 when the requested content doesn't exist, all before the metadata is generated.

Example:

export async function generateMetadata({ params }) {
  const post = await getPost(params.id);
  
  if (!post) {
    notFound(); // Trigger 404 page
  }
  
  if (post.redirectUrl) {
    redirect(post.redirectUrl); // Redirect to new location
  }
  
  return {
    title: post.title,
  };
}

Sources:

95% confidence
A

No. ImageResponse in Next.js only supports the Edge Runtime. The default Node.js runtime will not work.

When using ImageResponse from next/og, you must explicitly set the runtime to edge:

import { ImageResponse } from 'next/og'

export const runtime = 'edge'

export async function GET() {
  return new ImageResponse(
    (
      <div
        style={{
          fontSize: 128,
          background: 'white',
          width: '100%',
          height: '100%',
          display: 'flex',
          alignItems: 'center',
          justifyContent: 'center',
        }}
      >
        Hello World!
      </div>
    ),
  )
}

Why Edge Runtime only:

  • ImageResponse uses the Edge Runtime for performance optimization
  • Next.js automatically adds correct headers to cached images at the edge
  • Helps improve performance and reduce recomputation

Sources:

95% confidence
A

Yes, generateMetadata is designed to be an async function and fully supports async/await.

The function signature is:

export async function generateMetadata(
  { params, searchParams }: Props,
  parent: ResolvingMetadata
): Promise<Metadata>

You can use await inside to fetch data, access route parameters, or extend parent metadata:

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  // Await route params
  const { id } = await params
  
  // Await fetch request
  const product = await fetch(`https://api.example.com/${id}`).then(res => res.json())
  
  return {
    title: product.title,
    description: product.description
  }
}

Key points:

  • The function must be async and return Promise<Metadata>
  • Fetch requests are automatically memoized across generateMetadata, pages, and layouts
  • Only supported in Server Components
  • In Next.js 15+, params and searchParams are Promises that must be awaited

Sources:

95% confidence
A

Yes, fetch requests in generateMetadata are automatically deduplicated in Next.js.

fetch requests inside generateMetadata are automatically memoized for the same data across generateMetadata, generateStaticParams, Layouts, Pages, and Server Components. This means if you make identical fetch requests in both your generateMetadata function and your page component, Next.js will only execute the network request once.

For non-fetch data fetching (like direct database calls), you can use React's cache function to achieve the same deduplication:

import { cache } from 'react'

export const getPost = cache(async (slug: string) => {
  const res = await db.query.posts.findFirst({ where: eq(posts.slug, slug) })
  return res
})

export async function generateMetadata({ params }: { params: { slug: string } }) {
  const post = await getPost(params.slug) // Called here
  return { title: post.title }
}

export default async function Page({ params }: { params: { slug: string } }) {
  const post = await getPost(params.slug) // And here - but executed only once
  return <div>{post.title}</div>
}

Sources:

95% confidence
A

Next.js streams metadata separately for regular browsers but inlines it for HTML-limited bots.

For regular browsers (streaming):

  • Next.js sends the initial UI immediately without waiting for generateMetadata() to complete
  • When generateMetadata() resolves, metadata tags are appended to the <body> tag
  • Improves TTFB and LCP by not blocking the initial page render

For HTML-limited bots (inline, blocking):

  • Next.js detects bots that cannot execute JavaScript (e.g., facebookexternalhit) via User Agent
  • For these bots, page rendering blocks until generateMetadata() completes
  • Metadata is included in the <head> tag before sending HTML
  • Ensures crawlers and social media platforms can read metadata

Customization:
You can configure which bots receive blocking behavior using the htmlLimitedBots option in next.config.js.

Version note: This streaming behavior was introduced in Next.js 15.2. Previously, all requests blocked on metadata generation.

Sources:

95% confidence

Lazy Loading

10 questions
A

dynamic() can't be used inside of React rendering as it needs to be marked in the top level of the module for preloading to work. It must be declared at module top level, similar to React.lazy.

Sources
95% confidence

error_handling

9 questions
A

Implementation of Custom Error Boundaries in Next.js App Router

Create error boundaries using error.tsx (for route segments) and global-error.tsx (for root-level errors).

error.tsx - Route Segment Error Boundary

Place error.tsx in any route segment to catch errors in that segment and its children.

Required props:

  • error: Error & { digest?: string } - The caught error with optional digest for tracking
  • reset: () => void - Function to attempt recovery by re-rendering the segment

Implementation:

'use client'

import { useEffect } from 'react'

export default function Error({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  useEffect(() => {
    console.error(error)
  }, [error])

  return (
    <div>
      <h2>Something went wrong!</h2>
      <button onClick={() => reset()}>Try again</button>
    </div>
  )
}

Key characteristics:

  • Must be a Client Component ('use client')
  • Automatically wraps the route segment and nested children in a React Error Boundary
  • Errors bubble up to nearest parent error boundary
  • Does NOT catch errors in layout.tsx or template.tsx of the same segment

global-error.tsx - Root-Level Error Boundary

Place global-error.tsx in the root app/ directory to handle errors in root layout.

Implementation:

'use client'

export default function GlobalError({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <html>
      <body>
        <h2>Something went wrong!</h2>
        <button onClick={() => reset()}>Try again</button>
      </body>
    </html>
  )
}

Critical requirements:

  • Must define its own <html> and <body> tags (replaces root layout when active)
  • Still recommended to also define root error.tsx for UI with shared branding/layout

Sources:

95% confidence
A

Create a file named not-found.tsx (or not-found.js) in your Next.js App Router directory structure. For a global 404 page, place it at app/not-found.tsx.

Basic Implementation:

import Link from 'next/link'

export default function NotFound() {
  return (
    <div>
      <h2>Not Found</h2>
      <p>Could not find requested resource</p>
      <Link href="/">Return Home</Link>
    </div>
  )
}

How It's Triggered:

  1. Automatically: When a URL doesn't match any route in your app
  2. Programmatically: Call the notFound() function from next/navigation:
import { notFound } from 'next/navigation'

export default async function Page({ params }) {
  const data = await fetchData(params.id)
  
  if (!data) {
    notFound() // Triggers the not-found.tsx component
  }
  
  return <div>{data.content}</div>
}

File Placement Options:

  • app/not-found.tsx - Global 404 for entire application
  • app/blog/not-found.tsx - Specific 404 for /blog/* routes
  • Works at any route segment level

HTTP Status: Next.js returns 404 status code for non-streamed responses, 200 for streamed responses.

Sources:

95% confidence
A

Yes, global-error.tsx must define its own <html> and <body> tags.

This is required because global-error.tsx replaces the root layout when active, wrapping the entire application. Unlike regular error.tsx files (which render within existing layouts), global-error.tsx needs to provide the complete HTML document structure.

'use client'
 
export default function GlobalError({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <html>
      <body>
        <h2>Something went wrong!</h2>
        <button onClick={() => reset()}>Try again</button>
      </body>
    </html>
  )
}

You should also include any global styles, fonts, or other dependencies your error page requires within these tags.

Sources:

95% confidence
A

error.tsx handles errors in a specific route segment and its nested children. It wraps that segment in a React Error Boundary and works within the existing layout hierarchy. Errors bubble up to the nearest parent error boundary, enabling granular error handling at different route levels.

global-error.tsx is a catch-all error boundary that wraps the entire application at the root level. It replaces the root layout when active, so it must define its own <html> and <body> tags. It catches errors that escape all other error.js boundaries.

Critical limitation of error.tsx: An error.js boundary cannot handle errors thrown in a layout.js component in the same segment, because the error boundary is nested inside that layout's component.

Best practice: Even if you define global-error.js, still define a root error.js whose fallback renders within the root layout, preserving globally shared UI and branding.

// app/error.tsx - Works within layout
'use client'
 
export default function Error({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <div>
      <h2>Something went wrong!</h2>
      <button onClick={() => reset()}>Try again</button>
    </div>
  )
}

// app/global-error.tsx - Must include html/body
'use client'
 
export default function GlobalError({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <html>
      <body>
        <h2>Something went wrong!</h2>
        <button onClick={() => reset()}>Try again</button>
      </body>
    </html>
  )
}

Sources:

95% confidence
A

Yes, error.tsx must be a Client Component in Next.js.

The official Next.js documentation explicitly states: "error.js needs to be a Client Component" and requires the 'use client' directive at the top of the file.

This is mandatory because error boundaries are a React feature that only works client-side - they need access to browser APIs and React hooks like useEffect to catch runtime errors during rendering.

Example:

'use client' // Required
 
export default function Error({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <div>
      <h2>Something went wrong!</h2>
      <button onClick={() => reset()}>Try again</button>
    </div>
  )
}

Without 'use client', the error boundary cannot function properly because it needs client-side capabilities to intercept and display errors.

Sources:

95% confidence
A

The error.tsx file in Next.js App Router creates a React Error Boundary that catches and handles runtime errors in a route segment and all its nested children.

Primary purpose: Display fallback UI when unexpected errors occur during rendering, preventing the entire application from crashing.

How it works:

  • Automatically wraps a route segment and its nested children in an Error Boundary
  • When an error is thrown within the boundary, the error component replaces the normal UI
  • Must be a Client Component (requires 'use client' directive)

Props received:

type ErrorProps = {
  error: Error & { digest?: string }  // Error instance with optional digest hash
  reset: () => void                    // Function to retry rendering the segment
}

Key characteristics:

  • Errors bubble up to the nearest parent error.tsx boundary, enabling granular error handling at different route levels
  • Does NOT catch errors in the root layout.tsx or template.tsx (use global-error.tsx for those)
  • In production, Server Component error messages are sanitized to prevent leaking sensitive data
  • The error.digest property allows matching client-side errors with server logs

Sources:

95% confidence
A

No, global-error.tsx is not enabled in development mode in Next.js.

In development, Next.js always displays the error overlay (the red error screen with stack traces) instead of global-error.tsx. The global-error.tsx file only works in production builds.

To test global-error.tsx, you must:

  1. Build for production: next build
  2. Run the production build locally: next start

The development error overlay takes precedence because it provides detailed debugging information that developers need during development.

Sources:

95% confidence
A

Yes. global-error.tsx is specifically designed to catch errors thrown in the root layout.tsx, which the standard error.tsx file cannot do.

Key points:

  • The root app/error.js boundary does not catch errors in root app/layout.js or app/template.js
  • app/global-error.js wraps the entire application and catches errors from the root layout
  • global-error.tsx must define its own <html> and <body> tags since it replaces the root layout when active
  • It only activates in production (development shows the error overlay instead)

Example structure:

'use client'
 
export default function GlobalError({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  return (
    <html>
      <body>
        <h2>Something went wrong!</h2>
        <button onClick={() => reset()}>Try again</button>
      </body>
    </html>
  )
}

Sources:

95% confidence
A

Use notFound() function when: You need to programmatically trigger a 404 error from within your component code (e.g., when data fetching returns null, a resource ID doesn't exist, or a database query fails).

Use not-found.tsx file to: Define the UI that displays when notFound() is called or when Next.js encounters an unmatched route.

They Work Together

  1. Call notFound() in your Server Component or Route Handler when a resource doesn't exist:
import { notFound } from 'next/navigation'
 
async function fetchUser(id) {
  const res = await fetch(`https://api.example.com/user/${id}`)
  if (!res.ok) return undefined
  return res.json()
}
 
export default async function Page({ params }) {
  const user = await fetchUser(params.id)
  if (!user) notFound() // Triggers the not-found.tsx UI
  return <div>{user.name}</div>
}
  1. Create not-found.tsx at the appropriate segment level to define the UI:
export default function NotFound() {
  return <h2>User Not Found</h2>
}

Key Points

  • notFound() throws a NEXT_NOT_FOUND error and stops rendering the current segment
  • not-found.tsx at segment level renders when notFound() is called in that segment
  • app/not-found.tsx (root) catches unmatched URLs for the entire application
  • Calling notFound() injects <meta name="robots" content="noindex" /> automatically
  • Returns 404 HTTP status for non-streamed responses, 200 for streamed

Sources:

95% confidence

caching_revalidation

8 questions
A

updateTag immediately expires cached data and forces a fresh fetch on the next request. revalidateTag marks data as stale and can serve cached content while revalidating in the background.

Key Differences:

Aspect updateTag revalidateTag
Where callable Server Actions only Server Actions and Route Handlers
Cache behavior Immediate expiration, blocks next request until fresh data fetched With profile="max": serves stale content while revalidating in background (stale-while-revalidate)
Use case Read-your-own-writes scenarios - user must see their changes immediately General cache invalidation where slight delay is acceptable (blog posts, product catalogs)

Example:

// updateTag - for immediate cache invalidation
'use server'

import { updateTag } from 'next/cache'

export async function updatePost(id: string) {
  await db.posts.update(id)
  updateTag('posts') // Next request will WAIT for fresh data
}
// revalidateTag - for background revalidation
'use server'

import { revalidateTag } from 'next/cache'

export async function refreshProducts() {
  revalidateTag('products', { profile: 'max' }) // Serves stale while fetching fresh
}

When to use which:

  • Use updateTag: In Server Actions when users must immediately see their own changes (forms, mutations)
  • Use revalidateTag: In Server Actions or Route Handlers when background updates are acceptable and you want to avoid blocking

Sources:

95% confidence
A

unstable_cache allows you to cache the results of expensive operations (like database queries or API calls) and reuse them across multiple requests.

Primary purpose: Reduce performance overhead by avoiding redundant execution of expensive async operations. The cached results persist across requests and deployments using Next.js' built-in Data Cache.

Basic usage:

import { unstable_cache } from 'next/cache';

const getCachedUser = unstable_cache(
  async (id) => getUser(id),
  ['my-app-user']
);

// Later in your component
const user = await getCachedUser(userID);

API signature:

unstable_cache(fetchData, keyParts, options)
  • fetchData: Async function that returns a Promise with data to cache
  • keyParts: Array of additional keys for cache identification
  • options: Configuration for revalidation and tags

Critical limitation: Cannot access dynamic data sources (headers, cookies) inside the cached function. These must be accessed outside and passed as arguments.

Sources:

95% confidence
A

Data Cache stores the results of individual data fetches (like fetch() requests) across server requests and deployments. It caches the raw data returned from external sources.

Full Route Cache stores the fully rendered output of static routes—the React Server Component Payload and HTML—generated at build time or during background revalidation.

Key Differences:

What they cache:

  • Data Cache: Individual fetch request results (data layer)
  • Full Route Cache: Complete rendered route output (presentation layer)

When they operate:

  • Data Cache: Works during both static rendering (build time) and dynamic rendering (request time), persists across deployments
  • Full Route Cache: Only applies to statically rendered routes; dynamic routes bypass it entirely

How they interact:

  • Revalidating or opting out of the Data Cache invalidates the Full Route Cache (because rendered output depends on data)
  • Invalidating the Full Route Cache does not affect the Data Cache (asymmetric relationship)

This enables hybrid caching: you can dynamically render a route while still using cached data for some components, or render statically while fetching specific data at request time.

Sources:

95% confidence
A

To opt out of the Data Cache for a specific fetch request in Next.js, use the cache: 'no-store' option:

fetch('https://api.example.com/data', { cache: 'no-store' })

This fetches data from the remote server on every request, bypassing Next.js's Data Cache completely.

Alternative method:

fetch('https://api.example.com/data', { next: { revalidate: 0 } })

Setting revalidate: 0 also prevents caching.

Important: Don't combine conflicting options like { revalidate: 3600, cache: 'no-store' } - they'll be ignored and trigger a warning in development.

Sources:

95% confidence
A

router.refresh() makes a new request to the server, re-fetches data requests, and re-renders Server Components. The client merges the updated React Server Component payload without losing unaffected client-side React state (e.g., useState) or browser state (e.g., scroll position).

What gets refreshed:

  • Server Components are re-rendered with fresh data
  • Data requests are re-fetched from the server

What is preserved:

  • Client-side React state (useState, etc.)
  • Browser state (scroll position)
  • Unaffected client components

Important caveat:
refresh() may reproduce the same result if fetch requests are cached. Other Dynamic APIs like cookies and headers could also change the response.

Usage:

'use client'
import { useRouter } from 'next/navigation'

export default function Page() {
  const router = useRouter()
  
  return (
    <button onClick={() => router.refresh()}>
      Refresh
    </button>
  )
}

Sources:

95% confidence
A

The Router Cache in Next.js handles dynamic routes differently based on how they're prefetched:

Default Prefetching (prefetch={null} or unspecified):

  • Dynamic routes: Not cached
  • Static routes: 30 seconds

Full Prefetching (prefetch={true} or router.prefetch()):

  • Dynamic routes: 5 minutes
  • Static routes: 5 minutes

The Router Cache is a client-side in-memory cache that stores the React Server Component Payload. It persists across navigations but is cleared on page refresh.

Sources:

95% confidence
A

Use the next.tags option in fetch to tag requests for cache invalidation:

fetch('https://api.example.com/posts', { 
  next: { tags: ['posts'] } 
})

You can assign multiple tags to a single request:

fetch('https://api.example.com/posts/1', { 
  next: { tags: ['posts', 'post-1'] } 
})

Limitations:

  • Maximum tag length: 256 characters
  • Maximum number of tags: 128 per request

To invalidate the cache, use revalidateTag in Server Actions or Route Handlers:

'use server'
import { revalidateTag } from 'next/cache'

export async function updatePost() {
  await savePost()
  revalidateTag('posts', 'max')
}

The recommended profile="max" marks data as stale while continuing to serve cached content until the next page visit fetches fresh data.

Sources:

95% confidence
A

Next.js App Router provides multiple ways to cache database queries with Prisma and Drizzle:

1. React's cache() Function (Request-Level Memoization)

Wrap your database queries to deduplicate requests within a single render:

import { cache } from 'react'
import { prisma } from '@/lib/prisma'

export const getUser = cache(async (id: string) => {
  return await prisma.user.findUnique({ where: { id } })
})

This prevents the same query from running multiple times during one request, but does not persist across requests.

2. unstable_cache() (Data Cache - Persists Across Requests)

For persistent caching across requests and deployments:

import { unstable_cache } from 'next/cache'
import { prisma } from '@/lib/prisma'

export const getUser = unstable_cache(
  async (id: string) => {
    return await prisma.user.findUnique({ where: { id } })
  },
  ['user-cache'], // cache key
  {
    revalidate: 3600, // revalidate every hour
    tags: ['users'] // for cache invalidation
  }
)

Despite the name, unstable_cache is production-ready and widely used.

3. use cache Directive (Next.js 15+)

The newer approach for caching functions:

'use cache'

import { db } from '@/lib/db'

export async function getProducts() {
  return await db.query.products.findMany()
}

Or inline:

import { db } from '@/lib/db'

export async function getProducts() {
  'use cache'
  return await db.query.products.findMany()
}

4. Revalidation

Invalidate caches after mutations:

import { revalidatePath, revalidateTag } from 'next/cache'

// Revalidate specific path
revalidatePath('/users')

// Revalidate by cache tag
revalidateTag('users')

5. Opt-Out of Caching

Force dynamic rendering for always-fresh data:

export const dynamic = 'force-dynamic' // route segment config

Key Difference: cache() deduplicates within a request, while unstable_cache and use cache persist across requests.

Sources:

95% confidence

image_optimization

8 questions
A

To prevent Cumulative Layout Shift (CLS) with next/image in Next.js, use one of these approaches:

1. Specify width and height (recommended for static images)

Provide explicit width and height props - these infer the aspect ratio so browsers can reserve space before the image loads:

import Image from 'next/image'

<Image
  src="/photo.jpg"
  width={500}
  height={300}
  alt="Description"
/>

2. Use static imports (automatic dimensions)

For local images, import them directly. Next.js automatically determines width and height from the file:

import Image from 'next/image'
import photo from '../public/photo.jpg'

<Image
  src={photo}
  alt="Description"
/>

3. Use fill prop for responsive containers

When dimensions are unknown or for responsive layouts, use fill with a positioned parent:

<div style={{ position: 'relative', width: '100%', height: '400px' }}>
  <Image
    src="/photo.jpg"
    fill
    sizes="100vw"
    alt="Description"
  />
</div>

The parent must have position: relative, fixed, or absolute.

4. Add sizes prop for responsive images

When using fill or responsive layouts, add the sizes prop to prevent unnecessarily large downloads:

<Image
  src="/photo.jpg"
  fill
  sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
  alt="Description"
/>

Key principle: The browser needs aspect ratio information before the image loads. Providing width and height (or using static imports) allows the browser to reserve the correct space, preventing layout shift.

Sources:

95% confidence
A

To enable remote images in Next.js, configure remotePatterns in your next.config.js or next.config.ts file.

Configuration

Add the images.remotePatterns array to specify allowed external image URLs:

// next.config.ts
import type { NextConfig } from 'next'

const config: NextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: 'example.com',
        port: '',
        pathname: '/images/**',
      },
    ],
  },
}

export default config

remotePatterns Properties

  • protocol: 'http' or 'https' (required for security)
  • hostname: Domain name, supports wildcards (*.example.com)
  • port: Port number or empty string for any port
  • pathname: Path pattern, supports * (single segment) and ** (multiple segments)
  • search: Query string pattern (optional)

Wildcard Examples

remotePatterns: [
  {
    protocol: 'https',
    hostname: '**.example.com', // All subdomains
    pathname: '/images/**',      // All paths under /images
  },
]

Security Note

Be specific with patterns. Omitting protocol, port, pathname, or search implies wildcard **, which can allow malicious optimization of unintended URLs.

Deprecated Alternative

The domains array (deprecated in Next.js 14) is less secure:

images: {
  domains: ['example.com'], // Less specific, not recommended
}

Use remotePatterns instead for granular control.

Sources:

95% confidence
A

Configure custom image breakpoints in next.config.js using the deviceSizes property:

module.exports = {
  images: {
    deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
  }
}

What deviceSizes does: Specifies device width breakpoints used when the next/image component has a sizes prop to ensure the correct image is served for the user's device.

Default values: [640, 750, 828, 1080, 1200, 1920, 2048, 3840]

Limit: Maximum 25 values

Related configuration - imageSizes: For images with sizes prop that are less than full screen width:

module.exports = {
  images: {
    deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
    imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
  }
}

The imageSizes values should all be smaller than the smallest size in deviceSizes. Both arrays are concatenated to form the complete set of sizes used to generate image srcsets.

Sources:

95% confidence
A

The default loading strategy for next/image in Next.js is "lazy".

Images with loading="lazy" defer loading until they reach a calculated distance from the viewport. This is the default behavior when the loading prop is not specified.

You can override this by setting loading="eager" to load the image immediately, or by using the priority prop (which automatically sets eager loading and adds preload tags for critical images like LCP elements).

Sources:

95% confidence
A

The sizes prop tells the browser what width the image will be at different viewport sizes, enabling it to select the optimal image from the generated srcset.

Usage

The sizes prop accepts a media query string that maps viewport widths to expected image display widths:

import Image from 'next/image'

<Image
  fill
  src="/example.png"
  sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
/>

This reads as:

  • Below 768px: image takes 100% of viewport width
  • Between 768px-1200px: image takes 50% of viewport width
  • Above 1200px: image takes 33% of viewport width

When to Use

Use sizes when:

  • The image uses the fill prop (layout fills parent container)
  • CSS makes the image responsive (not fixed width)

Important: If omitted, browser assumes 100vw (full viewport width), causing unnecessarily large images to download on smaller screens.

How It Works

The sizes prop affects srcset generation:

  • Without sizes: Next.js generates density descriptors (1x, 2x) for fixed-size images
  • With sizes: Next.js generates width descriptors (640w, 750w, 828w, 1080w, 1200w, 1920w, 2048w, 3840w) for responsive images

Common Patterns

// Full width on mobile, half width on desktop
sizes="(max-width: 768px) 100vw, 50vw"

// Sidebar image: full width mobile, fixed 300px desktop
sizes="(max-width: 768px) 100vw, 300px"

// Grid layout: varies by breakpoint
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"

Sources:

95% confidence
A

Use the fill prop when:

  1. You don't know the image dimensions ahead of time - The fill prop is designed for cases where height and width are unknown.

  2. The image should fill its parent container - fill makes the image expand to match the size of its parent element, useful for responsive layouts.

  3. You want the parent to control sizing - Instead of setting explicit width/height on the image, you control dimensions via CSS on the parent container.

Use width and height when:

  • You know the image dimensions - These props are required unless using fill or importing a static image. They prevent layout shift by establishing the aspect ratio before the image loads.

Key requirements when using fill:

<div style={{ position: 'relative', width: '100%', height: '400px' }}>
  <Image
    fill
    src="/my-image.png"
    alt="Description"
    sizes="100vw"
    style={{ objectFit: 'cover' }}
  />
</div>
  • Parent must have position: relative, fixed, or absolute
  • Use the sizes prop to prevent downloading unnecessarily large images
  • Use object-fit (cover, contain, fill) to control how the image fills the space

Sources:

95% confidence
A

Use the next/image component from Next.js to get automatic image optimization including format conversion (WebP/AVIF), responsive sizing, and lazy loading.

Basic Implementation

import Image from 'next/image'

export default function Page() {
  return (
    <Image
      src="/profile.png"
      width={500}
      height={500}
      alt="Picture of the author"
    />
  )
}

Required Props

  • src: Image path (local or remote URL)
  • alt: Accessibility text
  • width and height: Image dimensions in pixels (unless using fill)

Key Optimization Props

sizes - Critical for responsive images. Tells the browser which image size to load at different breakpoints:

<Image
  src="/hero.png"
  fill
  sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
  alt="Hero image"
/>

quality - Compression level from 1-100 (default: 75)

priority - Set to true for above-the-fold images to disable lazy loading and preload them:

<Image
  src="/hero.png"
  width={1200}
  height={600}
  priority
  alt="Hero"
/>

placeholder="blur" - Shows blur-up effect while loading (requires blurDataURL for remote images)

Remote Images Configuration

Add allowed domains to next.config.js:

module.exports = {
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: 'example.com',
        pathname: '/images/**',
      },
    ],
  },
}

Fill Mode for Unknown Dimensions

When dimensions are unknown, use fill (parent must have position: relative):

<div style={{ position: 'relative', width: '100%', height: '400px' }}>
  <Image
    src="/image.png"
    fill
    style={{ objectFit: 'cover' }}
    alt="Cover image"
  />
</div>

Automatic Optimizations

Next.js automatically:

  • Serves modern formats (WebP, AVIF)
  • Generates responsive image sizes
  • Lazy loads images when they enter viewport
  • Prevents layout shift
  • Optimizes images on-demand (not at build time)

Sources:

95% confidence
A

Perfect! I have the authoritative answer from the official Next.js documentation. Let me provide the verified answer.


Next.js 15+: No manual installation needed. Next.js automatically uses sharp when running next start or standalone output mode.

Next.js 14 and earlier: Install sharp manually for production:

npm install sharp

Or with other package managers:

yarn add sharp
pnpm add sharp
bun add sharp

Why sharp matters: When using next/image with the default loader in production (self-hosted), sharp provides significantly more performant image optimization than the fallback option. Without sharp installed (in Next.js 14 and earlier), Next.js will use a slower image optimization library.

No additional configuration required - once installed, Next.js automatically detects and uses sharp for Image Optimization.

Platform note: On Linux, sharp may require additional configuration to prevent excessive memory usage.

Sources:

95% confidence

experimental_features

8 questions
A

The use cache directive in Next.js 15.4+ allows you to cache routes, React components, or functions. It can be placed at file-level (caches all exports), component-level, or function-level.

Configuration

First, enable it in next.config.ts:

import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  cacheComponents: true,
}

export default nextConfig

Usage Syntax

File-level (caches all exports):

'use cache'

export default async function Page() {
  // entire file cached
}

Component-level:

export async function MyComponent() {
  'use cache'
  return <div>Cached component</div>
}

Function-level:

export async function getData() {
  'use cache'
  const data = await fetch('/api/data')
  return data
}

Critical Limitations

  • Cannot directly access runtime APIs like cookies(), headers(), or searchParams inside cached functions. Read these values outside the cached scope and pass them as arguments.
  • Arguments and return values must be serializable. Cannot cache: class instances, functions (except pass-throughs), Symbols, WeakMaps, WeakSets, or URL instances.

Default Cache Behavior

  • Client stale time: 5 minutes
  • Server revalidation: 15 minutes
  • Expiration: no time-based limit

Customize using cacheLife() function or invalidate on-demand with cacheTag() and revalidateTag().

Sources:

95% confidence
A

Use unstable_after instead of removing await when you need guaranteed execution of background tasks in serverless environments.

The Problem with Removing await (Fire-and-Forget)

Removing await starts execution during the response, which:

  • Uses resources while the response is being generated (blocks/slows the response)
  • Is unreliable in serverless - the function stops computation immediately after sending the response, potentially interrupting the task mid-execution

When to Use unstable_after

Use unstable_after for secondary tasks that should:

  • Not block the primary response
  • Execute reliably even in serverless environments
  • Complete even if the response didn't succeed

Example use cases:

  • Logging and analytics
  • Cleanup operations
  • Non-critical API calls

How It Works

import { unstable_after as after } from 'next/server';

export default function Layout({ children }) {
  after(() => {
    // This runs AFTER the response finishes
    // Execution is guaranteed up to the serverless function timeout
    logAnalytics();
  });
  
  return <>{children}</>;
}

Key difference: While waitUntil() enqueues a promise during the request lifecycle, unstable_after accepts a callback executed after the response completes, extending the serverless function's execution window to ensure completion.

Sources:

95% confidence
A

Yes, unstable_after (now after in Next.js 15) executes even if the response fails.

This includes scenarios where:

  • An error is thrown
  • notFound() is called
  • redirect() is called

The callback runs regardless of whether the request completes successfully, making it reliable for side effects like logging and analytics that need to capture all request outcomes.

Important constraints:

  • Cookies cannot be set inside unstable_after (response already sent)
  • Dynamic APIs cannot be called within it
  • Execution time is bounded by the serverless function's max duration

Sources:

95% confidence
A

unstable_after is an API that allows you to schedule work to be executed after a response (or prerender) has finished. It enables you to process secondary tasks (like logging, analytics, or other side effects) without blocking the primary response.

How It Works

The callback runs after the response is sent to the user, executing even if the response didn't complete successfully (including errors, notFound(), or redirect() calls).

Usage Example

import { unstable_after as after } from 'next/server';

export default function Layout({ children }) {
  after(() => {
    // Execute secondary tasks
    console.log('Log analytics');
    saveToDatabase();
  });
  
  return <>{children}</>;
}

Key Limitations

  • Cannot set cookies - The response has already been sent
  • Cannot call dynamic APIs like cookies() or headers() in Server Components
  • Not for static exports - Platform support varies (Node.js/Docker supported)
  • Duration limits - Runs for the platform's default or configured max duration
  • Not a Dynamic API - Calling it doesn't make a route dynamic

Use Cases

  • Logging and analytics after mutations
  • Background tasks in Server Actions and Route Handlers
  • Side effects that shouldn't delay user response

Status

unstable_after was introduced in Next.js 15 and became stable as after() in Next.js 15.1. The unstable_ prefix indicates it's now deprecated in favor of the stable after API.

Sources:

95% confidence
A

Enable Partial Prerendering incrementally in Next.js by setting ppr: 'incremental' in your config, then opt-in per route with experimental_ppr = true.

Step 1: Configure next.config.ts

import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  experimental: {
    ppr: 'incremental',
  },
}

export default nextConfig

Step 2: Opt-in per route

Export experimental_ppr = true at the top of specific layout or page files:

import { Suspense } from "react"
import { StaticComponent, DynamicComponent, Fallback } from "@/app/ui"

export const experimental_ppr = true

export default function Page() {
  return (
    <>
      <StaticComponent />
      <Suspense fallback={<Fallback />}>
        <DynamicComponent />
      </Suspense>
    </>
  )
}

Routes without experimental_ppr will default to false and won't use PPR. This allows you to adopt PPR route-by-route rather than globally.

Note: PPR is experimental in Next.js 15 and not recommended for production.

Sources:

95% confidence
A

PPR (Partial Prerendering) uses Suspense boundaries to define the split between static and dynamic content in Next.js routes.

How it works:

Suspense boundaries mark dynamic boundaries in your component tree. At build time, Next.js prerenders:

  • The static shell (everything outside Suspense boundaries)
  • The fallback UI (what's inside <Suspense fallback={...}>)

The actual dynamic content wrapped by Suspense is postponed until runtime.

Key mechanism:

When a component uses dynamic APIs (like cookies(), headers(), or fetches without caching), wrapping it in Suspense creates a boundary. Next.js then:

  1. Prerenders the static parts and fallback
  2. Streams the dynamic content when the user requests the route
  3. Sends everything in a single HTTP request to avoid extra roundtrips

Important distinction:

Wrapping a component in Suspense doesn't make it dynamic—your use of dynamic APIs does. Suspense is the boundary that tells Next.js "this part streams at runtime" and enables that streaming behavior.

Example pattern:

export default function Page() {
  return (
    <>
      <StaticHeader />
      <Suspense fallback={<Loading />}>
        <DynamicComponent /> {/* Uses cookies(), headers(), etc. */}
      </Suspense>
      <StaticFooter />
    </>
  )
}

Sources:

95% confidence
A

Yes in Route Handlers and Server Actions. No in Server Components.

You can use cookies() and headers() inside unstable_after in:

  • Server Actions
  • Route Handlers

You cannot use cookies() and headers() inside unstable_after in:

  • Server Components (including generateMetadata())

This restriction exists because Next.js needs to know which parts of the tree access request APIs to support Partial Prerendering, but after runs after React's rendering lifecycle.

Example (Route Handler):

import { after } from 'next/server'
import { cookies, headers } from 'next/headers'

export async function POST(request: Request) {
  after(async () => {
    const userAgent = (await headers()).get('user-agent') || 'unknown'
    const sessionCookie = (await cookies()).get('session-id')?.value || 'anonymous'
    logUserAction({ sessionCookie, userAgent })
  })
  
  return new Response(JSON.stringify({ status: 'success' }), { status: 200 })
}

Important: You can only read cookies/headers inside after, not set them (the response has already been sent).

Sources:

95% confidence
A

No, Partial Prerendering (PPR) is not stable in Next.js 15.

PPR remains experimental in Next.js 15 and is explicitly not recommended for production use. The feature is subject to change.

To enable PPR experimentally in Next.js 15:

// next.config.ts
const nextConfig: NextConfig = {
  experimental: {
    ppr: 'incremental',
  },
}

Then opt-in per route:

// app/page.tsx
export const experimental_ppr = true

Sources:

95% confidence

server_actions

8 questions
A

Yes. You can call Server Actions from Client Components in Next.js, but you cannot define them in Client Components.

How it works:

  1. Define the Server Action in a separate file with "use server" directive at the top
  2. Import that Server Action into your Client Component
  3. Call it in forms, event handlers, or pass it as props

Example:

// app/actions.ts
"use server"

export async function createPost(formData: FormData) {
  // Server-side logic here
}
// app/components/form.tsx
"use client"

import { createPost } from '@/app/actions'

export function CreatePostForm() {
  return (
    <form action={createPost}>
      <button type="submit">Create Post</button>
    </form>
  )
}

You can also call Server Actions in event handlers or use .bind() to pass additional arguments.

Sources:

95% confidence
A

Use revalidatePath() or revalidateTag() inside your Server Action to invalidate the cache after a mutation.

revalidatePath

Invalidates cached data for a specific route:

'use server'
import { revalidatePath } from 'next/cache'

export async function createPost(formData: FormData) {
  // Perform mutation (e.g., database update)
  await db.posts.create({ ... })
  
  // Invalidate cache for the /posts route
  revalidatePath('/posts')
}

Parameters:

  • path (string): Route pattern like /product/[slug] or specific URL like /product/123
  • type (optional): 'page' or 'layout' - required for dynamic segments

revalidateTag

Invalidates cached data by tag across all routes that use it:

'use server'
import { revalidateTag } from 'next/cache'

export async function updatePost(id: string) {
  // Perform mutation
  await db.posts.update({ id, ... })
  
  // Invalidate all cache entries tagged with 'posts'
  revalidateTag('posts', 'max')
}

Parameters:

  • tag (string): Cache tag identifier (max 256 chars)
  • profile: Use "max" for stale-while-revalidate behavior (recommended)

Note: To use tags, you must first tag your data fetches:

fetch('https://api.example.com/posts', { 
  next: { tags: ['posts'] } 
})

Which to Use?

  • revalidatePath: When you know the specific page(s) that need updating
  • revalidateTag: When the same data appears across multiple pages

Sources:

95% confidence
A

Define a Zod schema matching your form fields, then use safeParse() to validate the FormData in your Server Action:

import { z } from 'zod'

// Define validation schema
const schema = z.object({
  email: z.string({
    invalid_type_error: 'Invalid Email',
  }),
  name: z.string().min(1, 'Name is required'),
})

// Server Action
export async function createUser(formData: FormData) {
  const validatedFields = schema.safeParse({
    email: formData.get('email'),
    name: formData.get('name'),
  })

  // Check validation result
  if (!validatedFields.success) {
    return {
      errors: validatedFields.error.flatten().fieldErrors,
    }
  }

  // Access validated data
  const { email, name } = validatedFields.data
  
  // Mutate data...
}

Key steps:

  1. Import Zod and define a schema with z.object()
  2. Extract form fields from FormData using .get()
  3. Call schema.safeParse() with the form data
  4. Check validatedFields.success - if false, return flattened errors
  5. If valid, access typed data via validatedFields.data

Use .flatten().fieldErrors to get a field-level error object suitable for displaying validation messages next to form inputs.

Sources:

95% confidence
A

Yes. Server Actions work with progressive enhancement when passed directly to a <form> element in Server Components. The form will function and submit data even if JavaScript is disabled or hasn't loaded yet.

Key points:

  • Server Components: Full progressive enhancement by default. Forms are interactive before hydration occurs and work without JavaScript.

  • Client Components: Forms queue submissions if JavaScript isn't loaded, then process them after hydration. The browser does not refresh on form submission after hydration.

Example:

// app/actions.ts
'use server'
 
export async function createUser(formData: FormData) {
  const name = formData.get('name')
  // Process data...
}

// app/page.tsx (Server Component)
import { createUser } from './actions'
 
export default function Page() {
  return (
    <form action={createUser}>
      <input name="name" type="text" />
      <button type="submit">Create</button>
    </form>
  )
}

This form will submit and execute the Server Action even with JavaScript disabled.

Sources:

95% confidence
A

POST

Server Actions in Next.js exclusively use the POST HTTP method. Only POST requests can invoke Server Actions - no other HTTP method is permitted.

Behind the scenes, when you define a Server Action (using "use server"), Next.js creates an endpoint that accepts only POST requests. This design choice provides built-in security benefits, as POST requests prevent CSRF vulnerabilities in modern browsers (especially with SameSite cookies as the default).

// Server Action example
"use server"

export async function createUser(formData: FormData) {
  // This will only be invoked via POST
  const name = formData.get('name')
  // ... mutation logic
}

Sources:

95% confidence
A

Use JavaScript's .bind() method to pass additional arguments to a Server Action beyond the form data.

How it works

Call .bind(null, argument) on your Server Action to create a new function with the argument pre-filled. The first parameter to .bind() is the this context (use null for Server Actions), and subsequent parameters become the bound arguments.

Example

Client Component:

'use client'

import { updateUser } from './actions'

export function UserProfile({ userId }: { userId: string }) {
  const updateUserWithId = updateUser.bind(null, userId)

  return (
    <form action={updateUserWithId}>
      <input type="text" name="name" />
      <button type="submit">Update User Name</button>
    </form>
  )
}

Server Action:

'use server'

export async function updateUser(userId: string, formData: FormData) {
  // userId is the bound argument
  // formData contains the form fields
}

The bound argument (userId) becomes the first parameter to the Server Action, followed by the formData.

Key Points

  • Works in both Server and Client Components
  • Supports progressive enhancement
  • Bound values are encoded (unlike hidden input fields which are visible in rendered HTML)
  • You can bind multiple arguments: action.bind(null, arg1, arg2)

Sources:

95% confidence
A

Yes. Server Actions in Next.js have built-in CSRF protection through multiple mechanisms:

1. POST-only method restriction - Server Actions only accept POST requests, which provides baseline CSRF protection in modern browsers (especially with SameSite cookies being default).

2. Origin/Host header validation - Next.js compares the Origin header against the Host header (or X-Forwarded-Host). If they don't match, the request is rejected. This means Server Actions can only be invoked from the same host as the page hosting them.

3. Configuration for complex setups - For applications using reverse proxies or multi-layered architectures, you can configure allowed origins:

module.exports = {
  experimental: {
    serverActions: {
      allowedOrigins: ['my-proxy.com', '*.my-proxy.com'],
    },
  },
}

Important: Server Actions do NOT use CSRF tokens. The protection relies on HTTP method restriction, SameSite cookies, and origin validation. You should still treat Server Actions with the same security rigor as public-facing API endpoints.

Sources:

95% confidence
A

Create a Server Action by adding the "use server" directive to an async function. There are two approaches:

Option 1: Inline in a Server Component

// app/page.tsx (Server Component)
export default function Page() {
  async function createPost(formData: FormData) {
    'use server'
    // This runs on the server
    const title = formData.get('title')
    // Process data, update database, etc.
  }

  return (
    <form action={createPost}>
      <input type="text" name="title" />
      <button type="submit">Submit</button>
    </form>
  )
}

Option 2: In a separate file (module-level)

// app/actions.ts
'use server'

export async function createPost(formData: FormData) {
  const title = formData.get('title')
  // Server-side logic here
}

Then import and use it:

// app/page.tsx or Client Component
import { createPost } from './actions'

export default function Page() {
  return <form action={createPost}>...</form>
}

Usage patterns:

  • Forms: Pass to the action prop (works in both Server and Client Components)
  • Event handlers: Call in Client Components with onClick, onChange, etc. (requires 'use client')
  • useEffect: Invoke inside Client Component effects

The 'use server' directive must be at the top of the function body or at the top of the file (before any imports) for module-level marking.

Sources:

95% confidence

middleware_authentication

7 questions
A

In NextAuth.js v5 (Auth.js), you export an auth() function from your configuration file and import it directly wherever you need to access the session—no need to pass authOptions anymore.

Setup (auth.ts or auth.js):

import NextAuth from "next-auth"

export const { auth, handlers, signIn, signOut } = NextAuth({
  providers: [/* your providers */],
})

Usage in Server Components:

import { auth } from "@/auth"

export default async function Page() {
  const session = await auth()
  return <p>Welcome {session?.user.name}!</p>
}

Usage in API Routes (App Router):

import { auth } from "@/auth"

export const GET = auth((req) => {
  if (req.auth) {
    // User is authenticated
    return Response.json({ data: "protected data" })
  }
  return Response.json({ message: "Not authenticated" }, { status: 401 })
})

Usage in Middleware:

export { auth as middleware } from "@/auth"

Key Difference from v4:

  • v4: await getServerSession(authOptions) - required passing config
  • v5: await auth() - config is already bound to the function

The auth() function is now a universal replacement for getServerSession, getToken, and withAuth depending on the context.

Sources:

95% confidence
A

Auth.js v5 Setup in Next.js 14/15

1. Install Auth.js

npm install next-auth@beta

2. Generate Secret

npx auth secret

Or manually:

openssl rand -base64 33

3. Environment Variables

Create .env.local:

AUTH_SECRET="your-generated-secret"
AUTH_GITHUB_ID="your-github-client-id"
AUTH_GITHUB_SECRET="your-github-client-secret"

Auth.js automatically infers environment variables prefixed with AUTH_.

4. Create Auth Configuration

Create auth.ts in project root:

import NextAuth from "next-auth"
import GitHub from "next-auth/providers/github"

export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [GitHub],
})

5. Create API Route Handler

Create app/api/auth/[...nextauth]/route.ts:

import { handlers } from "@/auth"
export const { GET, POST } = handlers

Requirements:

  • Minimum Next.js version: 14.0
  • When deploying behind reverse proxy, set AUTH_TRUST_HOST=true

Sources:

95% confidence
A

Yes, you CAN check user authentication in layout.tsx, BUT you should NOT rely on it for security.

The Problem:
Layouts in Next.js App Router use partial rendering and don't re-render on navigation. This means authentication checks in layouts only run once on initial page load, not on subsequent route changes. Users could navigate to protected routes without the auth check running again.

What Next.js Recommends Instead:

  1. Fetch user data in layouts - It's fine to call getUser() or similar in layouts to get session data

  2. Do auth checks closer to data - Perform actual authorization checks in:

    • Your Data Access Layer (DAL)
    • Page components
    • Leaf components that consume the data
    • Server Actions
  3. Don't return null from layouts for auth - Returning null from a layout when unauthorized doesn't prevent access to nested routes or Server Actions (multiple entry points exist)

Example Pattern:

// layout.tsx - Fetch user, don't check auth
export default async function Layout({ children }) {
  const user = await getUser() // Just fetch
  return <div>{children}</div>
}

// page.tsx or component - Check auth
export default async function Page() {
  const data = await getData() // getData() checks auth internally
  return <div>{data}</div>
}

Sources:

95% confidence
A

Based on the official Next.js documentation, here's how to implement role-based access control (RBAC) in Next.js middleware:

Implementation Pattern

Create a middleware.ts file at your project root (same level as app or pages):

import { NextResponse, NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
  // 1. Extract user session/token (from cookie, header, or JWT)
  const token = request.cookies.get('auth-token')?.value
  
  // 2. Decode and get user role
  const userRole = getUserRoleFromToken(token) // Your auth logic
  
  // 3. Define route-role mappings
  const path = request.nextUrl.pathname
  
  if (path.startsWith('/admin')) {
    if (userRole !== 'admin') {
      return NextResponse.redirect(new URL('/unauthorized', request.url))
    }
  }
  
  if (path.startsWith('/dashboard')) {
    if (!['admin', 'user'].includes(userRole)) {
      return NextResponse.redirect(new URL('/login', request.url))
    }
  }
  
  return NextResponse.next()
}

// 4. Specify which routes to protect
export const config = {
  matcher: ['/admin/:path*', '/dashboard/:path*']
}

Key Components

1. Matcher Configuration - Specify which routes trigger middleware:

export const config = {
  matcher: ['/admin/:path*', '/api/admin/:path*']
}

2. Session/Token Extraction - Read from cookies, headers, or JWT:

const token = request.cookies.get('session')?.value
const authHeader = request.headers.get('authorization')

3. Role Validation - Check role and return appropriate response:

if (userRole !== 'admin') {
  return NextResponse.redirect(new URL('/unauthorized', request.url))
}

// Or return JSON for API routes
return Response.json(
  { success: false, message: 'insufficient permissions' },
  { status: 403 }
)

4. NextResponse Actions:

  • NextResponse.redirect() - Redirect to different URL
  • NextResponse.rewrite() - Display different URL content
  • NextResponse.next() - Continue to requested route
  • Response.json() - Return JSON response

Execution Timing

Middleware runs before routes are rendered and after next.config.js redirects, making it ideal for authentication/authorization checks.

Sources:

95% confidence
A

To protect routes with middleware authentication in Next.js, create a middleware.ts (or .js) file in the root of your project (same level as pages or app, or inside src if you use that structure).

Basic Implementation:

import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
  // Check authentication (e.g., session cookie)
  const token = request.cookies.get('auth-token')
  
  if (!token) {
    return NextResponse.redirect(new URL('/login', request.url))
  }
  
  return NextResponse.next()
}

// Specify which routes to protect
export const config = {
  matcher: ['/dashboard/:path*', '/account/:path*']
}

Protect API Routes:

import { NextRequest } from 'next/server'

export const config = {
  matcher: '/api/:function*',
}

export function middleware(request: NextRequest) {
  const isAuthenticated = request.cookies.get('session')
  
  if (!isAuthenticated) {
    return Response.json(
      { success: false, message: 'authentication failed' },
      { status: 401 }
    )
  }
}

Matcher Patterns:

The matcher config targets specific routes:

  • /dashboard/:path* - Protects all dashboard routes
  • ['/about/:path*', '/profile/:path*'] - Multiple route patterns
  • /((?!api|_next/static|_next/image|.*\\.png$).*) - Everything except specified patterns

Key Points:

  • Middleware executes before cached content and routes are matched
  • Place middleware.ts at project root (or in src/)
  • Use matcher to target specific routes that need protection
  • Check cookies/headers for authentication tokens
  • Redirect unauthenticated users or return 401 responses

Important: Extensive session management should be handled by dedicated authentication services or Route Handlers, not solely in middleware.

Sources:

95% confidence
A

Based on the official Auth.js documentation, NextAuth.js middleware runs exclusively in the Edge runtime, not Node.js runtime.

Key Facts:

  1. Next.js Middleware Requirement: Next.js middleware (including NextAuth.js middleware) only runs in the Edge runtime by default. This is a Next.js platform constraint, not a NextAuth.js limitation.

  2. Edge-Only Execution: When you use NextAuth.js middleware in your middleware.ts file, it executes in the Edge runtime automatically.

  3. Compatibility Strategy: To make NextAuth.js work in Edge runtime, you must:

    • Use JWT session strategy (not database sessions)
    • Separate edge-compatible config from Node.js-dependent features (like database adapters)
    • Create an auth.config.ts with edge-compatible options only
    • Import this config in your middleware file
  4. Database Adapter Limitation: Database adapters (MongoDB, Prisma, etc.) require Node.js APIs and cannot run in Edge runtime, so they must be excluded from middleware configuration.

Code Pattern:

// auth.config.ts (edge-compatible)
export default {
  providers: [...],
  session: { strategy: "jwt" }
  // No adapter here
}

// middleware.ts
import authConfig from "./auth.config"
export { auth as middleware } from "@auth/nextjs"

The middleware itself doesn't support dual runtime execution - it's Edge-only by architectural design of Next.js middleware.

Sources:

95% confidence

deployment

7 questions
A

Add output: 'export' to your next.config.js file:

/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'export',
}

module.exports = nextConfig

Then run next build. Next.js will generate static HTML/CSS/JS files in an out folder.

Optional configurations:

  • trailingSlash: true - Changes links /me/me/ and emits /me.html/me/index.html
  • skipTrailingSlashRedirect: true - Prevents automatic /me/me/ redirects
  • distDir: 'dist' - Changes output directory from out to dist

Important limitations with static export:

  • Server Components run during build time only
  • API Routes are not supported
  • Dynamic routes require generateStaticParams
  • Features requiring a Node.js server (ISR, middleware) are not available

Sources:

95% confidence
A

No, you cannot use next start with output: 'standalone' in Next.js.

When you configure output: 'standalone' in next.config.js, Next.js creates a .next/standalone folder with a minimal server.js file that replaces next start.

To run a standalone build:

node .next/standalone/server.js

With custom port/hostname:

PORT=8080 HOSTNAME=0.0.0.0 node .next/standalone/server.js

The standalone output automatically creates a minimal production server that includes only the necessary files and dependencies. The next start command is incompatible with this mode because the standalone build uses its own optimized server implementation.

Note: The standalone build doesn't copy public or .next/static folders by default—these should be served separately (typically via CDN).

Sources:

95% confidence
A

output: 'standalone' creates a self-contained Node.js server with minimal dependencies for production deployment, while output: 'export' generates a fully static site with pre-rendered HTML files.

Key Differences

output: 'standalone'

  • Generates .next/standalone/ folder with a minimal server.js and only necessary node_modules
  • Requires a Node.js runtime to run the server
  • Supports all Next.js features including SSR, API routes, dynamic rendering, ISR, and Image Optimization
  • Ideal for containerized deployments (Docker) and cloud platforms
  • Produces a running server that handles requests dynamically

output: 'export'

  • Generates out/ folder with static HTML/CSS/JS files (e.g., out/index.html, out/blog/post-1.html)
  • No Node.js server required - can be served from any static host (Nginx, CDN, S3)
  • Does NOT support server-side features: SSR, API routes, dynamic routes without generateStaticParams(), cookies, Server Actions, default Image Optimization, ISR
  • Ideal for purely static sites, SPAs, or content that can be fully pre-rendered at build time

When to Use Each

Use standalone when you need server-side features but want optimized deployment size.

Use export when your entire site can be pre-rendered to static HTML and you want to deploy to static hosting without a Node.js server.

Sources:

95% confidence
A

Based on my research of the official Next.js documentation and the Vercel Next.js repository, here's the verified answer:

Configuration

Add to next.config.js:

module.exports = {
  output: 'standalone',
}

What It Does

Running next build creates a .next/standalone folder containing only the necessary files for production deployment, including select files from node_modules. A minimal server.js file is generated that replaces next start. This results in ~80% smaller Docker images (approximately 110 MB).

Critical: Manual Copying Required

The standalone build does not include public or .next/static folders. You must copy these manually in your Dockerfile.

Multi-Stage Dockerfile Pattern

# Stage 1: Dependencies
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci

# Stage 2: Builder
FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build

# Stage 3: Runner (Production)
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# Copy these three things from builder:
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs
EXPOSE 3000
ENV PORT=3000 HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]

Key Points

  • The server.js file is automatically generated in .next/standalone/ by Next.js
  • Run with node server.js (not next start)
  • Configure with environment variables: PORT=8080 HOSTNAME=0.0.0.0 node server.js
  • Public and static folders must be explicitly copied or the app will be missing assets

Bootstrap Example

npx create-next-app --example with-docker nextjs-docker

Sources:

95% confidence
A

When you set output: 'standalone' in Next.js, the build process creates .next/standalone containing:

Automatically copied to .next/standalone:

  • Traced and minified node_modules files (only the dependencies required for production)
  • Built application code
  • A minimal server.js file

NOT automatically copied (must be copied manually):

  • public/ folder
  • .next/static/ folder

These static asset folders are excluded by default because they should ideally be served by a CDN. However, if you want the standalone build to be fully self-contained, you must manually copy them:

cp -r public .next/standalone/
cp -r .next/static .next/standalone/.next/

Once manually copied, the generated server.js will serve these static files automatically.

Next.js uses @vercel/nft (Node File Trace) to statically analyze imports, requires, and fs usage to determine which files from node_modules are actually needed.

Sources:

95% confidence
A

Yes, you need to manually copy both public and .next/static folders when using standalone output.

The standalone build creates a minimal server at .next/standalone that does not automatically include these folders. They are excluded by default because Next.js assumes you'll serve static assets from a CDN.

What to do:

After running next build, manually copy:

  • public/.next/standalone/public/
  • .next/static/.next/standalone/.next/static/

Once copied to these locations, the server.js file will automatically serve them.

Example copying command:

cp -r public .next/standalone/
cp -r .next/static .next/standalone/.next/

Sources:

95% confidence
A

Set the PORT environment variable when running the standalone server:

PORT=8080 node server.js

The standalone server (generated with output: 'standalone' in next.config.js) reads the PORT environment variable to determine which port to listen on. If not set, it defaults to port 3000.

You can also set the HOSTNAME environment variable to specify the host:

PORT=8080 HOSTNAME=0.0.0.0 node server.js

In production environments, set these as environment variables in your deployment platform:

  • Docker: Use ENV PORT=8080 in Dockerfile or pass via docker run
  • Kubernetes: Set in pod spec environment variables
  • Cloud platforms: Configure in platform settings

Sources:

95% confidence

turbopack

7 questions
A

Yes, Turbopack supports many webpack loaders in Next.js, but with specific limitations.

What Works

Many webpack loaders already work with Turbopack. Tested loaders include:

  • babel-loader
  • @svgr/webpack
  • svg-inline-loader
  • yaml-loader
  • string-replace-loader
  • raw-loader
  • sass-loader
  • graphql-tag/loader

Configuration

Configure webpack loaders in next.config.js:

module.exports = {
  turbopack: {
    rules: {
      '*.svg': {
        loaders: ['@svgr/webpack'],
        as: '*.js',
      },
    },
  },
}

Limitations

  1. JavaScript output only: Only loaders that return JavaScript code are supported. Loaders that transform stylesheets or images are not currently supported.

  2. Limited API coverage: Only a core subset of the webpack loader API is implemented (via loader-runner library).

  3. Simple options only: Options passed to loaders must be plain JavaScript primitives, objects, and arrays. Cannot pass require() plugin modules.

  4. No module loading: importModule and loadModule are not supported.

Sources:

95% confidence
A

Incremental bundling in Turbopack is a performance optimization strategy where the bundler only processes and bundles code that is actually requested, rather than rebuilding the entire application on every change.

How It Works

Turbopack uses two core mechanisms:

  1. Lazy Bundling: Only bundles files that are actually requested by the dev server, skipping unnecessary work on unused files. This reduces initial compile times and memory consumption.

  2. Function-Level Caching: Parallelizes work across CPU cores and caches results at the function level. Once a piece of work is completed, Turbopack won't repeat it unless its dependencies change.

Key Difference from Traditional Bundlers

Traditional bundlers like webpack typically bundle the entire application in development mode, or rely on the browser's native ES modules (causing excessive network requests). Turbopack takes a middle path: it bundles only what's requested while maintaining granular caches, providing faster iteration especially for large codebases.

When you make a change, Turbopack intelligently tracks dependencies and only recomputes what's necessary, rather than rebuilding large portions of the application.

Sources:

95% confidence
A

No, Turbopack does not support Webpack plugins in Next.js. This affects third-party tools that rely on webpack's plugin system for integration.

What Turbopack Does Support:

  • Webpack loaders (with limitations): Only loaders that return JavaScript code are supported. Loaders that transform files like stylesheets or images are not currently supported. Only a core subset of the webpack loader API is implemented.

If You Need Webpack Plugins:
You have two options:

  1. Find Turbopack-compatible alternatives
  2. Continue using webpack until equivalent functionality becomes available

Configuration Example for Loaders:

module.exports = {
  turbopack: {
    rules: {
      '*.svg': {
        loaders: ['@svgr/webpack'],
        as: '*.js',
      },
    },
  },
}

Sources:

95% confidence
A

No. Turbopack in Next.js 15 is stable for development only, not for production.

In Next.js 15, next dev --turbo became stable and ready for development use. However, production builds (next build --turbo) were not supported and remained experimental.

Timeline:

  • Next.js 15: Turbopack stable for development (next dev --turbo)
  • Next.js 15.3: Production builds entered alpha
  • Next.js 15.5: Production builds entered beta
  • Next.js 16: Turbopack became stable for both development and production

If you need Turbopack for production builds, you must use Next.js 16 or later.

Sources:

95% confidence
A

Turbopack is an incremental bundler written in Rust and built into Next.js, serving as the successor to Webpack. It became the default bundler in Next.js 16.0.

Key Architectural Differences from Webpack:

Unified Graph: Turbopack uses a single, unified graph for all environments (client and server), while Webpack requires running at least two separate compilers for multi-environment builds.

Incremental Computation: Turbopack uses the Turbo Engine with automatic demand-driven incremental computation that caches results down to the function level. Work scales with the size of changes, not the entire application. Webpack must recompute outputs even for unchanged modules.

Parallelization: Written in Rust, Turbopack parallelizes work across CPU cores natively. Webpack cannot effectively parallelize because JavaScript objects cannot be easily shared between threads without expensive serialization.

Lazy Bundling: Turbopack only bundles what is actually requested by the dev server, reducing initial compile times and memory usage.

Development Strategy: Turbopack bundles in dev (in an optimized way), rather than relying solely on browser-native ESM.

Performance Improvements:

On large applications like vercel.com:

  • 76.7% faster local server startup
  • 96.3% faster code updates with Fast Refresh
  • 45.8% faster initial route compilation without caching
  • 25-35% reduction in memory usage

Trade-offs:

Turbopack currently lacks an equivalent to Webpack's Inner Graph Optimization, which can impact tree-shaking efficiency for some applications.

Sources:

95% confidence
A

Add the --turbo flag to your development command:

next dev --turbo

Or update your package.json scripts:

{
  "scripts": {
    "dev": "next dev --turbo"
  }
}

Note: As of Next.js 16 (released in 2024), Turbopack is now the default bundler for next dev, so the --turbo flag is no longer necessary. Simply run next dev without any flags.

For Next.js 15 and earlier, you must explicitly use --turbo to enable Turbopack.

Sources:

95% confidence
A

Based on the official Next.js announcement, Turbopack in development mode shows these performance improvements over Webpack:

Development Performance (tested on vercel.com codebase):

  • Local server startup: 76.7% faster
  • Code updates with Fast Refresh: 96.3% faster
  • Initial route compilation (without caching): 45.8% faster

Additional metrics:

  • Memory usage: 25-35% reduction
  • With persistent caching: routes that take 10+ seconds initially compile in under 500ms after first compilation

Important caveat: These benchmarks specifically apply to development mode (next dev --turbo). For production builds, the official documentation states that Turbopack "generally produces bundles that are similar in size to Webpack" and recommends comparing based on Core Web Vitals rather than build speed alone.

The exact performance gain varies significantly by application size and characteristics. The percentages above represent "up to" improvements on large Next.js applications.

Sources:

95% confidence

integration_patterns

7 questions
A

Install Tailwind CSS v3 and configure it for Next.js App Router:

1. Install dependencies:

npm install -D tailwindcss@^3 postcss autoprefixer
npx tailwindcss init -p

2. Configure template paths in tailwind.config.js:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    './app/**/*.{js,ts,jsx,tsx,mdx}',
    './pages/**/*.{js,ts,jsx,tsx,mdx}',
    './components/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

3. Add Tailwind directives to your global CSS file (app/globals.css):

@tailwind base;
@tailwind components;
@tailwind utilities;

4. Import the global CSS in your root layout (app/layout.tsx):

import './globals.css'

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

5. Use Tailwind classes in your components:

export default function Page() {
  return <h1 className="text-3xl font-bold underline">Hello world!</h1>
}

Turbopack (Next.js 13.1+) fully supports this workflow.

Sources:

95% confidence
A

CSS Modules in Next.js App Router work out of the box with zero configuration.

File Naming: Use the .module.css extension (e.g., styles.module.css)

Usage:

  1. Create your CSS Module file
  2. Import it as a JavaScript object
  3. Apply classes using the imported object

Example:

/* app/dashboard/styles.module.css */
.container {
  padding: 24px;
  background: white;
}

.title {
  font-size: 2rem;
  color: navy;
}
/* app/dashboard/page.tsx */
import styles from './styles.module.css'

export default function Dashboard() {
  return (
    <div className={styles.container}>
      <h1 className={styles.title}>Dashboard</h1>
    </div>
  )
}

Key Features:

  • Automatic local scoping (unique class names generated)
  • Can import into any file in the app directory
  • Production builds automatically concatenate, minify, and code-split CSS files
  • No naming collisions across components

Sources:

95% confidence
A

Yes, you can use the initialData pattern with TanStack Query in Next.js.

The initialData option allows you to provide data fetched from Next.js data fetching methods (getServerSideProps, getStaticProps, or Server Components in App Router) directly to your useQuery hook.

Basic Example (Pages Router):

export async function getServerSideProps() {
  const posts = await getPosts()
  return { props: { posts } }
}

function Posts(props) {
  const { data } = useQuery({
    queryKey: ['posts'],
    queryFn: getPosts,
    initialData: props.posts
  })
}

Important Tradeoffs:

  1. No shared cache: If you call useQuery with the same query key in multiple locations, you must pass initialData to all of them
  2. Stale timing issues: There's no way to know when the query was fetched on the server, so dataUpdatedAt is based on when the page loaded, not when data was actually fetched
  3. No cache updates on navigation: With getServerSideProps, navigating back and forth fetches new server data each time, but the client cache won't update because it uses the initialData from the first load

Recommended Alternative:

TanStack Query's official documentation recommends using prefetching with hydration instead, as it doesn't have these drawbacks and properly synchronizes server and client state.

Sources:

95% confidence
A

Based on the official TanStack Query documentation, here's how to use the dehydrate/hydrate pattern with Next.js:

The Pattern

  1. On the server: Use dehydrate() to serialize prefetched queries into a transferable state
  2. Pass to client: Send the dehydrated state as props to the client component
  3. On the client: Use <HydrationBoundary> to hydrate the queries into the client-side cache

Next.js Pages Router Example

// pages/posts.jsx
import { dehydrate, HydrationBoundary, QueryClient, useQuery } from '@tanstack/react-query'

export async function getServerSideProps() {
  const queryClient = new QueryClient()

  await queryClient.prefetchQuery({
    queryKey: ['posts'],
    queryFn: getPosts,
  })

  return {
    props: {
      dehydratedState: dehydrate(queryClient),
    },
  }
}

function Posts() {
  const { data } = useQuery({ queryKey: ['posts'], queryFn: getPosts })
  // data is immediately available
}

export default function PostsPage({ dehydratedState }) {
  return (
    <HydrationBoundary state={dehydratedState}>
      <Posts />
    </HydrationBoundary>
  )
}

Next.js App Router Example

// app/posts/page.jsx
import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query'
import Posts from './posts'

export default async function PostsPage() {
  const queryClient = new QueryClient()

  await queryClient.prefetchQuery({
    queryKey: ['posts'],
    queryFn: getPosts,
  })

  return (
    <HydrationBoundary state={dehydrate(queryClient)}>
      <Posts />
    </HydrationBoundary>
  )
}

Key Points

  • Create a new QueryClient instance on the server for each request (don't share between requests)
  • Use prefetchQuery() to fetch data on the server
  • dehydrate() only includes successfully fetched queries by default
  • Queries are cached on the client with their staleTime, so they won't refetch immediately unless stale
  • <HydrationBoundary> (v5) replaces the older <Hydrate> component (v4)

Sources:

95% confidence
A

No, you do NOT need HydrationBoundary in every route.

HydrationBoundary is only needed when you want to prefetch data on the server and pass that prefetched state to client components. If a route doesn't prefetch data server-side, you don't need it.

When to use HydrationBoundary:

  • You're prefetching queries in a Server Component using prefetchQuery
  • You want to pass that prefetched data to Client Components
  • You want to avoid loading states for server-fetched data

When you DON'T need it:

  • Routes where all data is fetched client-side (queries will fetch after the app is interactive)
  • Content that appears only after user interaction
  • Data that's shown far down on the page

Common pattern in Next.js App Router:

// app/posts/page.tsx (Server Component)
import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query'
import Posts from './posts'

export default async function PostsPage() {
  const queryClient = new QueryClient()
  
  // Only prefetch if you want server-side data
  await queryClient.prefetchQuery({
    queryKey: ['posts'],
    queryFn: getPosts,
  })

  return (
    <HydrationBoundary state={dehydrate(queryClient)}>
      <Posts />
    </HydrationBoundary>
  )
}

It's also fine to use multiple HydrationBoundaries across different routes—each can have its own QueryClient and prefetched data.

Sources:

95% confidence
A

Based on the official TanStack Query documentation, here's how to use TanStack Query with Server Components in Next.js:

Using TanStack Query with Server Components

Server Components are for prefetching only. TanStack Query itself requires client-side hooks, so you prefetch data in Server Components and hydrate it in Client Components.

Recommended Approach:

  1. Prefetch in Server Components - Use Server Components to prefetch queries before they're needed by Client Components
  2. Hydrate in Client Components - Use useSuspenseQuery or useQuery in Client Components to access the prefetched data
  3. Use the experimental package - The @tanstack/react-query-next-experimental package provides utilities to simplify server-side data fetching

Key Pattern:

// Server Component (app/page.tsx)
import { HydrationBoundary, QueryClient, dehydrate } from '@tanstack/react-query'

export default async function ServerPage() {
  const queryClient = new QueryClient()
  
  // Prefetch on the server
  await queryClient.prefetchQuery({
    queryKey: ['posts'],
    queryFn: getPosts,
  })
  
  return (
    <HydrationBoundary state={dehydrate(queryClient)}>
      <ClientComponent />
    </HydrationBoundary>
  )
}

// Client Component (components/ClientComponent.tsx)
'use client'
import { useSuspenseQuery } from '@tanstack/react-query'

export function ClientComponent() {
  const { data } = useSuspenseQuery({
    queryKey: ['posts'],
    queryFn: getPosts,
  })
  // Data is already available from server prefetch
}

Experimental Server Fetching:

The @tanstack/react-query-next-experimental package allows you to fetch directly on the server within Client Components using useSuspenseQuery, eliminating some boilerplate.

Important: TanStack Query works seamlessly with Next.js streaming and Suspense boundaries.

Sources:

95% confidence
A

Pass your Next.js Server Action directly as the mutationFn to useMutation from TanStack Query.

Pattern:

  1. Create a Server Action (in a separate file or inline with 'use server'):
'use server'

export async function createTodoAction(data: { title: string }) {
  // Your server-side logic here
  const result = await db.todo.create({ data });
  return result;
}
  1. Use it in a Client Component with useMutation:
'use client'

import { useMutation, useQueryClient } from '@tanstack/react-query';
import { createTodoAction } from './actions';

export function TodoForm() {
  const queryClient = useQueryClient();
  
  const mutation = useMutation({
    mutationFn: createTodoAction,
    onSuccess: () => {
      // Invalidate and refetch
      queryClient.invalidateQueries({ queryKey: ['todos'] });
    },
    onError: (error) => {
      console.error('Failed:', error.message);
    }
  });

  return (
    <button 
      onClick={() => mutation.mutate({ title: 'New Todo' })}
      disabled={mutation.isPending}
    >
      {mutation.isPending ? 'Creating...' : 'Create Todo'}
    </button>
  );
}

Key Points:

  • Use Server Actions for mutations only (create/update/delete), not data fetching
  • The Server Action is passed directly as mutationFn - no need to wrap it
  • Use queryClient.invalidateQueries() in onSuccess to refresh cached data
  • Access mutation state via isPending, isError, isSuccess, etc.

Sources:

95% confidence

migration_pages_to_app

7 questions
A

usePathname

Client Component hook that returns the current URL's pathname as a string, excluding query parameters.

'use client'
import { usePathname } from 'next/navigation'

export default function ExampleComponent() {
  const pathname = usePathname()
  // pathname = '/dashboard' for URL '/dashboard?v=2'
  return <p>Current path: {pathname}</p>
}

Returns: String representing the pathname (e.g., /, /dashboard, /blog/hello-world)

Key constraints:

  • Must be used in Client Components only (mark with 'use client')
  • Not supported in Server Components (to preserve layout state during navigation)
  • Returns null during initial render in Pages Router compatibility mode

useSearchParams

Client Component hook that returns a read-only URLSearchParams object for accessing the current URL's query string.

'use client'
import { useSearchParams } from 'next/navigation'

export default function SearchComponent() {
  const searchParams = useSearchParams()
  const page = searchParams.get('page') // '1' for ?page=1
  return <p>Page: {page}</p>
}

Returns: ReadonlyURLSearchParams with methods: .get(name), .has(name), .getAll(), .keys(), .values(), .entries(), .toString()

Critical requirement: When used in statically rendered routes, wrap the component in <Suspense> boundary to avoid forcing the entire route to client-side rendering:

import { Suspense } from 'react'

export default function Page() {
  return (
    <Suspense fallback={<div>Loading...</div>}>
      <SearchComponent />
    </Suspense>
  )
}

Key constraints:

  • Must be used in Client Components only
  • Server Components should use the searchParams prop instead
  • Production builds fail without Suspense boundaries in static routes

Sources:

95% confidence
A

In App Router, getStaticProps is removed. Instead, fetch data directly in async Server Components.

Pages Router (old):

export async function getStaticProps() {
  const res = await fetch(`https://...`)
  const projects = await res.json()
  return { props: { projects } }
}

export default function Index({ projects }) {
  return projects.map((project) => <div>{project.name}</div>)
}

App Router (new):

async function getProjects() {
  const res = await fetch(`https://...`)
  const projects = await res.json()
  return projects
}

export default async function Index() {
  const projects = await getProjects()
  return projects.map((project) => <div>{project.name}</div>)
}

Key Changes:

  • Make your component async
  • Fetch data directly in the component (or helper function)
  • fetch() defaults to cache: 'force-cache' (same as getStaticProps)
  • No separate data fetching function needed

For Dynamic Routes:

  • getStaticPathsgenerateStaticParams

Revalidation:

  • revalidate option → use export const revalidate = 60 in the route segment or next: { revalidate: 60 } in fetch options

Sources:

95% confidence
A

Replace getStaticPaths with generateStaticParams when migrating to Next.js App Router. The new function has a simplified API:

Pages Router (old):

// app/posts/[id]/page.tsx
export async function getStaticPaths() {
  return {
    paths: [
      { params: { id: '1' } },
      { params: { id: '2' } }
    ],
    fallback: false
  }
}

export async function getStaticProps({ params }) {
  return { props: { id: params.id } }
}

App Router (new):

// app/posts/[id]/page.tsx
export async function generateStaticParams() {
  return [
    { id: '1' },
    { id: '2' }
  ]
}

// Data fetching happens directly in the component
export default async function Page({ params }: { params: { id: string } }) {
  // Fetch data here
}

Key differences:

  1. Return shape: Returns flat array of params [{ id: '1' }] instead of nested objects [{ params: { id: '1' } }]

  2. Fallback behavior: Use dynamicParams segment config instead of fallback option:

    export const dynamicParams = true  // equivalent to fallback: true or 'blocking'
    export const dynamicParams = false // equivalent to fallback: false
    
  3. Location: Can be used in page.tsx or layout.tsx files

  4. Data fetching: No need for getStaticProps - fetch data directly in async Server Components

Sources:

95% confidence
A

Yes. You can use both Pages Router and App Router simultaneously in the same Next.js project.

The app directory is intentionally designed to work simultaneously with the pages directory to allow for incremental page-by-page migration. This means you can:

  • Gradually migrate routes from Pages Router to App Router
  • Keep existing pages/ routes working while building new routes in app/
  • Maintain both routers in production during the migration period

Important considerations:

  1. Styles: Styles in app/layout.tsx will NOT apply to pages/* routes. Keep your _app.js/_document.js files until migration is complete.

  2. Navigation: When navigating between routes served by different routers (pages/ to app/ or vice versa), there will be a hard navigation (full page reload) rather than a client-side transition.

  3. Route Priority: If both routers define the same path, App Router takes precedence in production builds.

This simultaneous support enables incremental adoption rather than requiring a complete rewrite.

Sources:

95% confidence
A

Replace useRouter from next/router with three separate hooks from next/navigation:

1. Change the import:

// Old (Pages Router)
import { useRouter } from 'next/router'

// New (App Router)
'use client'
import { useRouter, usePathname, useSearchParams } from 'next/navigation'

2. Split functionality across hooks:

Old API (next/router) New API (next/navigation)
router.push() / router.replace() useRouter() - same methods
router.pathname usePathname()
router.query useSearchParams() for query strings, useParams() for dynamic route params
router.asPath, router.basePath, router.locale, router.isReady, router.isFallback Removed (no replacement)

3. Example migration:

'use client'
import { useRouter, usePathname, useSearchParams } from 'next/navigation'

export default function MyComponent() {
  const router = useRouter()      // For navigation methods only
  const pathname = usePathname()  // Get current path
  const searchParams = useSearchParams()  // Get query params
  
  // Navigation still works the same
  router.push('/dashboard')
  router.back()
  
  // Access path and params through separate hooks
  console.log(pathname)  // e.g., '/dashboard'
  console.log(searchParams.get('id'))  // e.g., '123'
}

Note: Components using next/navigation must have 'use client' directive.

Sources:

95% confidence
A

To migrate API routes from pages/api to App Router Route Handlers in Next.js:

File Structure Changes

Pages Router:

pages/api/users.js

App Router:

app/api/users/route.js

Route files must be named route.js or route.ts and can be placed anywhere inside the app directory.

API Syntax Changes

Before (Pages API Routes):

// pages/api/users.js
export default function handler(req, res) {
  if (req.method === 'GET') {
    res.status(200).json({ users: [] })
  }
  if (req.method === 'POST') {
    // handle POST
  }
}

After (App Router Route Handlers):

// app/api/users/route.js
export async function GET(request) {
  return Response.json({ users: [] })
}

export async function POST(request) {
  const body = await request.json()
  return Response.json({ data: body }, { status: 201 })
}

Key Differences

  1. Web Standards: Route Handlers use Web Request/Response APIs instead of Node.js req/res
  2. HTTP Method Exports: Export separate async functions (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) instead of a single default handler
  3. Request Data Access:
    • Query params: request.nextUrl.searchParams.get('query')
    • Headers: request.headers or headers() from next/headers
    • Cookies: request.cookies or cookies() from next/headers
    • Body: await request.json() or await request.formData()
  4. Dynamic Routes: Access params via const { slug } = await params

Migration Note

Route Handlers and API Routes cannot coexist at the same path. Pages Router API routes will continue working, but should be migrated to Route Handlers for new development.

Alternative: For fetching external APIs, consider using Server Components instead of Route Handlers.

Sources:

95% confidence
A

Replace next/head imports with static metadata exports or the generateMetadata function in Server Components.

Static Metadata (for fixed values)

Before (Pages Router):

import Head from 'next/head'

export default function Page() {
  return (
    <>
      <Head>
        <title>My page title</title>
        <meta name="description" content="Page description" />
      </Head>
    </>
  )
}

After (App Router):

import type { Metadata } from 'next'

export const metadata: Metadata = {
  title: 'My page title',
  description: 'Page description',
}

export default function Page() {
  return '...'
}

Dynamic Metadata (for values from props/params)

Before (Pages Router):

import Head from 'next/head'

export default function Page({ data }) {
  return (
    <>
      <Head>
        <title>{data.title}</title>
      </Head>
    </>
  )
}

After (App Router):

import type { Metadata } from 'next'

export async function generateMetadata({ params }): Promise<Metadata> {
  const data = await fetch(`/api/data/${params.id}`).then(res => res.json())
  
  return {
    title: data.title,
  }
}

export default function Page() {
  return '...'
}

Key Points:

  • Remove all next/head imports
  • Export metadata object for static values
  • Use generateMetadata function for dynamic values
  • Only works in Server Components (not Client Components)
  • Can be used in both page.tsx and layout.tsx files

Sources:

95% confidence

dynamic_routes

7 questions
A

Yes. Child route segments can access params from parent generateStaticParams through the params argument passed to their own generateStaticParams function.

The child generateStaticParams is executed once for each segment the parent generates. The child function receives the parent's params synchronously and can use them to dynamically generate its own segments.

Example:

// app/products/[category]/[product]/page.tsx
export async function generateStaticParams({
  params: { category },
}: {
  params: { category: string }
}) {
  const products = await fetch(
    `https://.../products?category=${category}`
  ).then((res) => res.json())

  return products.map((product) => ({
    product: product.id,
  }))
}

In this pattern:

  1. Parent generates [category] segments
  2. Child generateStaticParams receives each category value via the params argument
  3. Child uses that category to fetch data and generate [product] segments specific to that category

Sources:

95% confidence
A

generateStaticParams runs at build time (next build), before the corresponding Layouts or Pages are generated.

The execution sequence is:

  1. generateStaticParams executes first to determine which dynamic route segments need static generation
  2. After all params are collected, Next.js generates the corresponding Layouts and Pages using those params

Important behaviors:

  • Runs before page/layout rendering starts
  • Does not run again during revalidation (ISR)
  • For nested dynamic segments, child generateStaticParams executes once for each set of params the parent generates
  • fetch requests inside generateStaticParams are automatically deduplicated across the function and other components

This is the App Router equivalent of getStaticPaths from the Pages Router.

Sources:

95% confidence
A

dynamicParams = false controls whether Next.js can render dynamic routes that weren't pre-generated by generateStaticParams.

When set to false:

  • Only paths returned by generateStaticParams will be served
  • All other dynamic routes return 404 (or match in catch-all routes)
  • Prevents on-demand rendering of unspecified paths at runtime
// app/blog/[slug]/page.tsx
export const dynamicParams = false // default is true

export async function generateStaticParams() {
  return [
    { slug: 'post-1' },
    { slug: 'post-2' },
    { slug: 'post-3' },
  ]
}

// /blog/post-1 ✅ works
// /blog/post-2 ✅ works  
// /blog/post-4 ❌ returns 404

Use case: When you want a closed, predictable set of routes (e.g., only top 10 blog posts) rather than allowing Next.js to generate pages on-demand for any requested path.

Default behavior (dynamicParams = true): Unspecified routes are rendered on-demand using Streaming Server Rendering.

Sources:

95% confidence
A

Use generateStaticParams with ISR by combining it with the revalidate export in your dynamic route segment:

// app/blog/[id]/page.tsx
export async function generateStaticParams() {
  const posts = await fetch('https://api.vercel.app/blog').then((res) =>
    res.json()
  )
  
  return posts.map((post) => ({
    id: String(post.id),
  }))
}

export const revalidate = 60 // Revalidate every 60 seconds

export default async function Page({ params }: { params: { id: string } }) {
  const post = await fetch(`https://api.vercel.app/blog/${params.id}`).then(
    (res) => res.json()
  )
  
  return <article>{post.title}</article>
}

How it works:

  1. At build time, all routes returned by generateStaticParams are pre-generated as static pages
  2. After the revalidation period (60 seconds), the next request returns the cached (stale) page
  3. Next.js regenerates the page in the background
  4. Subsequent requests get the fresh page

Important behaviors:

  • generateStaticParams runs only at build time, NOT during revalidation
  • Routes not in generateStaticParams are generated on-demand when first requested (unless dynamicParams = false)
  • To enable pure on-demand ISR (no build-time generation), return an empty array from generateStaticParams or use export const dynamic = 'force-static'

Sources:

95% confidence
A

generateStaticParams is a function in Next.js App Router used to statically generate routes with dynamic segments at build time instead of on-demand at request time.

Purpose:
Pre-renders dynamic routes during next build for improved performance. It replaces getStaticPaths from the Pages Router.

Usage:
Export it from a page.js or layout.js file that uses dynamic route segments:

// app/blog/[slug]/page.tsx
export async function generateStaticParams() {
  const posts = await fetch('https://api.example.com/posts').then(res => res.json())
 
  return posts.map((post) => ({
    slug: post.slug,
  }))
}

export default function Page({ params }: { params: { slug: string } }) {
  return <div>Post: {params.slug}</div>
}

Return Value:
An array of objects where each object represents the dynamic segments for one route. Property names must match the dynamic segment names ([slug]slug).

Key Behaviors:

  • Runs during next build before pages/layouts are generated
  • Does NOT run again during revalidation (ISR)
  • In development, runs when navigating to the route
  • For multiple dynamic segments, child generateStaticParams executes once for each parent param set
  • Can generate all paths or a subset (remaining paths render on-demand based on dynamicParams config)

Sources:

95% confidence
A

Yes. Fetch requests in generateStaticParams are automatically deduplicated (memoized) by Next.js.

If you make the same fetch request across multiple generate-prefixed functions, Layouts, Pages, and Server Components during the same render, Next.js will cache the result and reuse it rather than making duplicate network calls. This optimization applies during both static generation and rendering.

Example:

// This fetch will be deduplicated if called elsewhere with the same URL
export async function generateStaticParams() {
  const posts = await fetch('https://api.example.com/posts').then(res => res.json())
  
  return posts.map((post) => ({
    slug: post.slug,
  }))
}

If you're using a data fetching method other than fetch (like Axios or direct database queries), you can use React's cache() function to achieve the same deduplication behavior.

Sources:

95% confidence
A

No, you don't must return an empty array, but it's one of two ways to enable ISR for dynamic routes.

To enable ISR (on-demand static generation at runtime), you have two options:

  1. Return an empty array from generateStaticParams
  2. Use export const dynamic = 'force-static'

Both approaches allow Next.js to statically generate pages the first time they're visited at runtime, rather than at build time.

Important: You must always return an array from generateStaticParams (even if empty). If you omit it entirely, the route will be dynamically rendered instead of using ISR.

Example:

export async function generateStaticParams() {
  return [] // Enables ISR - pages generated on first visit
}

export const revalidate = 3600 // Revalidate every hour

This is useful when you have many routes or frequently added content, as it avoids long build times while still providing static generation benefits.

Sources:

95% confidence

route_handlers

7 questions
A

Create a GET Route Handler in Next.js App Router by defining a route.ts (or route.js) file with an exported async GET function:

export async function GET() {
  return Response.json({ message: 'Hello World' })
}

File location determines the route:

  • app/api/hello/route.ts/api/hello
  • app/items/route.ts/items

With request parameters:

import type { NextRequest } from 'next/server'

export async function GET(request: NextRequest) {
  const searchParams = request.nextUrl.searchParams
  const query = searchParams.get('query')
  
  return Response.json({ query })
}

With dynamic route segments:

export async function GET(
  request: NextRequest,
  { params }: { params: Promise<{ slug: string }> }
) {
  const { slug } = await params
  return Response.json({ slug })
}

Important:

  • Route handlers cannot coexist with page.ts at the same route segment level
  • GET handlers are NOT cached by default (add export const dynamic = 'force-static' to opt into caching)
  • Use Web Response API (not Next.js-specific APIs)

Sources:

95% confidence
A

Create a Route Handler with a POST function that processes the raw webhook payload using request.text():

export async function POST(request: Request) {
  try {
    const text = await request.text()
    // Process the webhook payload
  } catch (error) {
    return new Response(`Webhook error: ${error.message}`, {
      status: 400,
    })
  }
  return new Response('Success!', {
    status: 200,
  })
}

Place this in app/api/webhook/route.ts to create an endpoint at /api/webhook.

Key points:

  • Use request.text() to get the raw body (needed for signature verification)
  • Use request.json() if you don't need signature verification
  • No special configuration required (unlike Pages Router API Routes which needed bodyParser disabled)
  • Return appropriate status codes: 200 for success, 400/500 for errors
  • Route Handlers only work in the app directory

For signature verification:

export async function POST(request: Request) {
  const payload = await request.text()
  const signature = request.headers.get('x-webhook-signature')
  
  // Verify signature here
  
  const data = JSON.parse(payload)
  // Process webhook
  
  return new Response('Success!', { status: 200 })
}

Sources:

95% confidence
A

Create a file named route.ts (or route.js) in your app directory and export an async POST function:

// app/api/items/route.ts
export async function POST(request: Request) {
  const data = await request.json()
  
  // Process your data here
  
  return Response.json({ success: true, data })
}

Key details:

  • File must be named route.ts or route.js
  • File location determines the endpoint (e.g., app/api/items/route.ts/api/items)
  • Export an async function named POST
  • Receives Web Standard Request object
  • Return a Response object (use Response.json() for JSON responses)

For form data instead of JSON:

export async function POST(request: Request) {
  const formData = await request.formData()
  const name = formData.get('name')
  const email = formData.get('email')
  
  return Response.json({ name, email })
}

Cannot coexist: A route.ts file cannot exist at the same segment level as page.ts.

Sources:

95% confidence
A

To opt into caching for GET Route Handlers in Next.js, use route segment config options:

Option 1: Use dynamic = 'force-static'

export const dynamic = 'force-static'

export async function GET() {
  const res = await fetch('https://api.example.com/data')
  const data = await res.json()
  return Response.json({ data })
}

Option 2: Use revalidate

export const revalidate = 60 // Cache for 60 seconds

export async function GET() {
  const res = await fetch('https://api.example.com/data')
  const data = await res.json()
  return Response.json({ data })
}

Important context: In Next.js 15, GET Route Handlers are not cached by default (changed from Next.js 14 where they were cached by default). You must explicitly opt in using route segment config options.

Other route segment config options that affect caching:

  • fetchCache - Controls fetch cache behavior
  • dynamic - Set to 'force-static' for static generation

Sources:

95% confidence
A

No, you cannot have both page.tsx and route.ts at the same route level in Next.js. This results in a conflict.

Why: Each route.js or page.js file takes over all HTTP verbs for that route. Since they both handle requests for the same path, they cannot coexist at the same route segment.

Example of Conflict:

app/dashboard/page.tsx   ✗
app/dashboard/route.ts   ✗

Valid Alternative:

app/dashboard/page.tsx      ✓ (UI page)
app/api/dashboard/route.ts  ✓ (API endpoint - different segment)

The files must be in separate route segments to avoid the conflict. Use page.tsx for UI rendering and place API routes in a different path like /api/... or another segment.

Sources:

95% confidence
A

Next.js Route Handlers support seven HTTP methods: GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS.

If an unsupported method is called, Next.js returns a 405 Method Not Allowed response.

If OPTIONS is not explicitly defined, Next.js automatically implements it and sets the appropriate Allow header based on the other methods defined in the Route Handler.

Example:

// app/api/route.ts
export async function GET(request: Request) {
  // Handle GET requests
}

export async function POST(request: Request) {
  // Handle POST requests
}

Sources:

95% confidence
A

In Next.js Route Handlers, you read the request body using standard Web API methods on the request object:

For JSON:

export async function POST(request: Request) {
  const body = await request.json()
  return Response.json({ body })
}

For FormData:

export async function POST(request: Request) {
  const formData = await request.formData()
  const name = formData.get('name')
  return Response.json({ name })
}

For plain text:

export async function POST(request: Request) {
  const text = await request.text()
  return Response.json({ text })
}

All three methods (request.json(), request.formData(), request.text()) are async and return a Promise. Unlike the Pages Router API Routes, no bodyParser configuration is needed.

Sources:

95% confidence

nextjs_15_features

6 questions
A

React 19 introduces these new hooks, all available in Next.js 15:

New Hooks in React 19

  1. use - Reads resources like Promises and Context during render. Unlike traditional hooks, it can be called conditionally and in loops. When reading a Promise, React suspends until resolved.

  2. useActionState - Manages state from async Server Actions. Returns current state, a wrapped action function, and pending status. Automatically handles pending states and sequential submissions.

  3. useFormStatus - Provides access to parent <form> status without prop drilling. Returns pending state and form data. Must be called from components rendered inside a <form>.

  4. useOptimistic - Shows optimistic UI updates immediately while async operations process. Updates instantly, then reverts or commits based on the actual response.

These hooks work in both Next.js App Router and Pages Router with React 19 support.

Example:

'use client'
import { useActionState } from 'react'

function Form({ updateName }) {
  const [state, submitAction, isPending] = useActionState(updateName, { name: '' })
  
  return (
    <form action={submitAction}>
      <input type="text" name="name" />
      <button disabled={isPending}>Update</button>
    </form>
  )
}

Sources:

95% confidence
A

Yes, Next.js 15 fully supports React 19.

Initial support: Next.js 15 (released October 2024) shipped with support for React 19 RC (Release Candidate). The App Router used React 19 RC by default, while maintaining backwards compatibility with React 18 for the Pages Router.

Stable support: Next.js 15.1 (released December 2024) added stable React 19 support for both the App Router and Pages Router.

React 18 compatibility: Next.js 15 can still work with React 18, particularly for the Pages Router, though mixing React 18 (Pages Router) and React 19 (App Router) in the same application is not recommended due to potential unpredictable behavior and typing inconsistencies.

Sources:

95% confidence
A

Yes, Next.js 15 supports ESLint 9.

Next.js 15 introduced support for ESLint 9 (following ESLint 8's end-of-life on October 5, 2024) while maintaining backward compatibility with ESLint 8.

Key Details:

  • Dual Support: You can use either ESLint 8 or ESLint 9 with Next.js 15
  • Automatic Migration Aid: If you upgrade to ESLint 9 without adopting the new flat config format, Next.js automatically applies ESLINT_USE_FLAT_CONFIG=false to ease migration
  • Breaking Changes: Deprecated options like --ext and --ignore-path are removed when running next lint with ESLint 9
  • Flat Config Support: Next.js 15 supports ESLint 9's new flat config format

Additional Changes:

  • eslint-plugin-react-hooks upgraded to v5.0.0 with new rules for React Hook usage

Sources:

95% confidence
A

The Static Indicator is a development-time visual indicator that displays on your screen to show whether the current route is being rendered as static or dynamic.

Visual Symbols:

  • = Static (prerendered) route
  • ƒ = Dynamic (server-rendered on demand) route

Purpose: Helps developers identify which routes are static vs dynamic during development, making it easier to optimize performance by understanding rendering strategies.

Configuration: Can be controlled via devIndicators in next.config.js:

module.exports = {
  devIndicators: false, // Disable the indicator
  // Or customize position:
  devIndicators: {
    position: 'bottom-right' // Options: 'bottom-right', 'bottom-left', 'top-right', 'top-left'
  }
}

Verification: To confirm if a route is static or dynamic, run next build --debug and check the terminal output.

Common Causes of Dynamic Routes:

  • Dynamic APIs that depend on runtime information
  • Uncached data requests (database/ORM calls)

Sources:

95% confidence
A

The after() API in Next.js 15 allows you to schedule work to execute after a response (or prerender) is finished, without blocking the response to the user.

What It Is

import { after } from 'next/server';

export default function Layout({ children }) {
  after(() => {
    // This runs after the response is sent
    log();
  });
  return <>{children}</>;
}

When to Use It

Use after() for tasks that should not block the response:

  • Logging and analytics - Track user activity without slowing response times
  • Cleanup tasks - Defer cleanup operations
  • Non-critical side effects - Any work that doesn't need to complete before responding

Key Characteristics

Availability: Can be used in Server Components (including generateMetadata), Server Actions, Route Handlers, and Middleware

Stability: Became stable in Next.js 15.1 (was unstable_after in 15.0)

Runtime behavior:

  • Executes even if the response fails, notFound() is called, or redirect() occurs
  • Does NOT make a route dynamic - on static pages, callbacks execute at build time or revalidation
  • Respects maxDuration route segment config for execution time limits

Request APIs (cookies, headers): Only available inside after() when used in Server Actions and Route Handlers - NOT in Server Components due to React's rendering lifecycle

Example with Request APIs

import { after } from 'next/server';
import { cookies } from 'next/headers';

export async function logUserAction() {
  after(async () => {
    const sessionId = (await cookies()).get('session-id');
    await logActivity({ sessionId });
  });
}

Sources:

95% confidence
A

forbidden() and unauthorized() are experimental functions in Next.js 15.1 that handle authentication and authorization errors by throwing errors that render custom error pages.

Key Difference

  • unauthorized(): Throws a 401 error when a user is not authenticated (not logged in)
  • forbidden(): Throws a 403 error when a user is authenticated but not authorized (logged in but lacks permissions)

Common Features

Both functions:

  • Are experimental (require authInterrupts: true in next.config.js)
  • Can be invoked in Server Components, Server Actions, and Route Handlers
  • Cannot be called in the root layout
  • Accept no parameters and don't return values (they throw errors)

Usage Example

// next.config.js
const nextConfig = {
  experimental: {
    authInterrupts: true,
  },
}
// Using unauthorized() - user not logged in
export default async function DashboardPage() {
  const session = await verifySession()
  if (!session) {
    unauthorized() // 401 - needs to login
  }
  // ...
}

// Using forbidden() - user logged in but lacks permission
export default async function AdminPage() {
  const session = await verifySession()
  if (session.role !== 'admin') {
    forbidden() // 403 - logged in but not an admin
  }
  // ...
}

Custom Error Pages

Customize the UI by creating:

  • unauthorized.tsx for 401 errors (e.g., show login form)
  • forbidden.tsx for 403 errors (e.g., show "access denied" message)

Sources:

95% confidence

middleware

6 questions
A

Next.js middleware defaults to the Edge Runtime, not Node.js.

As of Next.js 15.5 (released 2025), you can now configure middleware to use the Node.js runtime by adding this export to your middleware file:

export const config = {
  runtime: 'nodejs'
}

Key facts:

  • Default: Edge Runtime (in all versions including latest)
  • Edge Runtime limitations: No native Node.js APIs (no filesystem, limited npm packages)
  • Node.js runtime: Stable support added in Next.js 15.5 (experimental in 15.2), provides full Node.js API access
  • Pre-15.2 versions: Edge Runtime only, no configuration option

The Next.js team is considering making Node.js the default runtime starting with Next.js 17, but currently Edge Runtime remains the default.

Sources:

95% confidence
A

In Next.js middleware, set response headers using the NextResponse API by calling response.headers.set(name, value):

import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
  const response = NextResponse.next()
  
  // Set response header
  response.headers.set('x-custom-header', 'value')
  
  return response
}

Additional methods:

// For redirects or rewrites
const response = NextResponse.redirect(new URL('/home', request.url))
response.headers.set('x-custom-header', 'value')

// Setting multiple headers
response.headers.set('x-header-one', 'value1')
response.headers.set('x-header-two', 'value2')

// For direct responses
const response = NextResponse.json({ message: 'Hello' })
response.headers.set('x-custom-header', 'value')

Important: Avoid setting large headers as it might cause 431 Request Header Fields Too Large error depending on your backend web server configuration.

Sources:

95% confidence
A

Use the matcher config in your middleware with negative lookahead regex to exclude specific paths:

export const config = {
  matcher: [
    /*
     * Match all request paths except for the ones starting with:
     * - api (API routes)
     * - _next/static (static files)
     * - _next/image (image optimization files)
     * - favicon.ico (favicon file)
     */
    '/((?!api|_next/static|_next/image|favicon.ico).*)',
  ],
}

Pattern explanation:

  • (?!pattern) is a negative lookahead that excludes paths matching the pattern
  • Separate multiple exclusions with | (pipe)
  • Add more exclusions by extending the pattern: '/((?!api|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)'

The matcher config supports full regex, so you have complete control over path matching. This approach is crucial because middleware invokes for every route by default.

Sources:

95% confidence
A

No, you cannot use Node.js APIs like fs and path in Next.js middleware.

Next.js middleware runs in the Edge Runtime by default, which does not support native Node.js APIs. According to the official documentation: "Native Node.js APIs are not supported. For example, you can't read or write to the filesystem."

Why this limitation exists:

  • Middleware runs before cached content and route matching
  • The Edge Runtime uses Web Standard APIs only
  • It's designed for performance and can be deployed to CDNs/edge networks

What you should use instead:

  • Server Components: For file system operations during rendering
  • Route Handlers: For API endpoints that need Node.js APIs
  • Server Actions: For server-side logic with filesystem access

Note on Next.js 15: Starting in Next.js 15.5, you can opt into the Node.js runtime for middleware by setting runtime: 'nodejs' in the config. However, this is a recent addition and goes against the architectural design of middleware being lightweight and edge-deployable.

Sources:

95% confidence
A

Use NextResponse.rewrite() to internally route requests to different URLs without changing the visible URL in the browser.

Basic syntax:

import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
  // Rewrite /about to /about-2
  if (request.nextUrl.pathname.startsWith('/about')) {
    return NextResponse.rewrite(new URL('/about-2', request.url))
  }
  
  // Rewrite /dashboard to /dashboard/user
  if (request.nextUrl.pathname.startsWith('/dashboard')) {
    return NextResponse.rewrite(new URL('/dashboard/user', request.url))
  }
}

Key points:

  • Always use new URL(destination, request.url) with absolute paths
  • The first parameter is the destination path (where to route internally)
  • The second parameter is request.url to preserve protocol and domain
  • The browser URL stays unchanged (unlike redirects)
  • The request is processed at the destination path server-side

Common use cases:

  • A/B testing (route to variants without changing URL)
  • Localization (route based on headers/cookies)
  • Feature flags (conditionally serve different implementations)
  • API versioning (route to different handlers transparently)

Sources:

95% confidence
A

In Next.js middleware, request.nextUrl is automatically available as a property on the NextRequest parameter passed to your middleware function.

Access it directly:

import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function middleware(request: NextRequest) {
  // Access nextUrl directly
  const pathname = request.nextUrl.pathname
  const searchParams = request.nextUrl.searchParams
  
  if (request.nextUrl.pathname.startsWith('/about')) {
    return NextResponse.rewrite(new URL('/about-2', request.url))
  }
}

Available properties on request.nextUrl:

request.nextUrl extends the native URL API with Next.js-specific properties:

  • pathname - The URL path (e.g., /home)
  • searchParams - Query parameters as an object (e.g., { 'name': 'lee' } for /home?name=lee)
  • basePath - The configured base path for your app
  • buildId - The Next.js build identifier (configurable via next.config.js)

Getting search params:

const searchParams = request.nextUrl.searchParams
const query = searchParams.get('query')

Sources:

95% confidence

environment_variables

6 questions
A

Prefix environment variables with NEXT_PUBLIC_ to expose them to the browser.

How it works

  1. Define the variable in your .env file:
NEXT_PUBLIC_API_URL=https://api.example.com
NEXT_PUBLIC_ANALYTICS_ID=abc123
  1. Access it in your code (client or server):
// Works in browser and server
const apiUrl = process.env.NEXT_PUBLIC_API_URL
  1. Next.js inlines these values at build time, replacing all references to process.env.NEXT_PUBLIC_* with the actual hardcoded value in the JavaScript bundle sent to the browser.

Critical constraints

  • Build-time only: Values are frozen when you run next build. Runtime changes to these variables have no effect.
  • Not truly secret: Since they're embedded in client-side JavaScript, anyone can inspect them. Never use for API keys, secrets, or credentials.
  • Server-only variables: Variables without NEXT_PUBLIC_ prefix remain server-only and are not accessible in the browser.

Example transformation

Your code:

setupAnalytics(process.env.NEXT_PUBLIC_ANALYTICS_ID)

After build:

setupAnalytics('abc123')

Sources:

95% confidence
A

Yes. NEXT_PUBLIC_ environment variables are embedded directly into the JavaScript bundle at build time through inline replacement.

When you run next build, Next.js replaces all references to process.env.NEXT_PUBLIC_* with their literal values. For example:

// Before build
setupAnalyticsService(process.env.NEXT_PUBLIC_ANALYTICS_ID)

// After build (in the bundle)
setupAnalyticsService('abcdefghijk')

Critical implications:

  • Values are frozen at build time
  • Changing environment variables after build has no effect
  • All NEXT_PUBLIC_ variables are visible in client-side JavaScript (viewable in browser)
  • Cannot be used for runtime environment values (use API routes for that)

Sources:

95% confidence
A

Create a .env.local file in your project root with key-value pairs:

DB_HOST=localhost
DB_USER=myuser
DB_PASS=mypassword

Syntax rules:

  • One variable per line
  • Format: KEY=value
  • No quotes needed (unless part of the actual value)
  • No spaces around the = sign

Server vs Browser access:

  • Server-only (default): Regular variables are only available in Node.js environment

    DATABASE_URL=postgresql://localhost:5432
    API_SECRET=abc123
    
  • Browser-accessible: Prefix with NEXT_PUBLIC_ to expose to the browser

    NEXT_PUBLIC_API_URL=https://api.example.com
    NEXT_PUBLIC_ANALYTICS_ID=GA-12345
    

Important notes:

  • .env.local is loaded in development and production (but NOT in test environment)
  • Always add .env.local to .gitignore (done by default with create-next-app)
  • NEXT_PUBLIC_ variables are inlined into the JavaScript bundle at build time

Sources:

95% confidence
A

No, Next.js does not load .env.local in the test environment.

When NODE_ENV is set to test, Next.js intentionally skips .env.local to ensure tests produce the same results for everyone. This way every test execution uses the same env defaults across different executions by ignoring your .env.local (which is intended to override the default set).

For test environments, use:

  • .env.test - Should be committed to your repository for shared test defaults
  • .env.test.local - Not loaded by default, and should be in .gitignore

Environment files loaded in test environment (in order):

  1. .env.test
  2. .env

Environment files NOT loaded in test:

  • .env.local
  • .env.development
  • .env.production

Sources:

95% confidence
A

The NEXT_PUBLIC_ prefix makes environment variables accessible in the browser by inlining their values into the JavaScript bundle at build time.

How It Works

Server-only by default: Environment variables without the NEXT_PUBLIC_ prefix are only available in the Node.js environment (server-side).

Browser exposure: Adding the NEXT_PUBLIC_ prefix tells Next.js to make the variable available in browser JavaScript.

Build-time inlining: Next.js replaces all references to process.env.NEXT_PUBLIC_VARIABLE_NAME with the actual hard-coded value during the next build process. The value gets baked into the client-side JavaScript bundle.

Example

// .env.local
NEXT_PUBLIC_ANALYTICS_ID=abc123
DATABASE_URL=secret

// In your component
console.log(process.env.NEXT_PUBLIC_ANALYTICS_ID) // "abc123" (works in browser)
console.log(process.env.DATABASE_URL) // undefined (browser), "secret" (server)

Critical Limitations

  1. Values are frozen at build time - After building, the app won't respond to changes in NEXT_PUBLIC_ variables
  2. Dynamic lookups don't work - process.env[variableName] won't be inlined, only direct references like process.env.NEXT_PUBLIC_API_KEY
  3. Same build = same values - Deploying one Docker image to multiple environments will have identical NEXT_PUBLIC_ values from the original build

Runtime Alternative

For values that must change per environment after deployment, you must set up your own API to provide them to the client.

Sources:

95% confidence
A

Next.js loads environment variables from different .env* files based on NODE_ENV and file priority.

.env.local:

  • Loaded in all environments (development, production) except test
  • Used for local overrides and secrets that shouldn't be committed to git
  • Higher priority than environment-specific files like .env.production
  • Should be in .gitignore
  • Skipped during NODE_ENV=test to ensure consistent test results

.env.production:

  • Loaded only when NODE_ENV=production
  • Used for production-specific defaults
  • Can be committed to version control (should not contain secrets)
  • Lower priority than .env.production.local and .env.local

Loading Priority (highest to lowest):

  1. process.env
  2. .env.$(NODE_ENV).local (e.g., .env.production.local)
  3. .env.local (not loaded when NODE_ENV=test)
  4. .env.$(NODE_ENV) (e.g., .env.production)
  5. .env

Example:

  • Running next build sets NODE_ENV=production
  • Variables are loaded from: .env.production.local.env.local.env.production.env
  • Running next dev sets NODE_ENV=development
  • Variables are loaded from: .env.development.local.env.local.env.development.env

Sources:

95% confidence

advanced_routing

6 questions
A

Combine Parallel Routes and Intercepting Routes by creating a parallel slot (e.g., @auth) with an intercepting route inside it that renders a modal, while maintaining a separate dedicated page for direct access.

Folder Structure

app/
├── layout.tsx              # Root layout that renders both @auth slot and children
├── @auth/                  # Parallel route slot
│   ├── (.)login/          # Intercepting route (intercepts /login)
│   │   └── page.tsx       # Modal version of login
│   ├── default.tsx        # Returns null when slot is inactive
│   └── page.tsx           # Returns null on root route
└── login/
    └── page.tsx           # Dedicated /login page (direct access)

Implementation Steps

1. Create the dedicated page (app/login/page.tsx):

import { Login } from '@/app/ui/login'

export default function Page() {
  return <Login />
}

2. Create the parallel slot default (app/@auth/default.tsx):

export default function Default() {
  return null
}

3. Create the intercepting route (app/@auth/(.)login/page.tsx):

import { Modal } from '@/app/ui/modal'
import { Login } from '@/app/ui/login'

export default function Page() {
  return (
    <Modal>
      <Login />
    </Modal>
  )
}

4. Configure parent layout (app/layout.tsx):

export default function Layout({
  auth,
  children,
}: {
  auth: React.ReactNode
  children: React.ReactNode
}) {
  return (
    <>
      <nav>
        <Link href="/login">Open modal</Link>
      </nav>
      <div>{auth}</div>
      <div>{children}</div>
    </>
  )
}

5. Implement modal with close (app/ui/modal.tsx):

'use client'

import { useRouter } from 'next/navigation'

export function Modal({ children }: { children: React.ReactNode }) {
  const router = useRouter()

  return (
    <>
      <button onClick={() => router.back()}>Close modal</button>
      <div>{children}</div>
    </>
  )
}

6. Handle slot closure (app/@auth/page.tsx):

export default function Page() {
  return null
}

How It Works

  • Client-side navigation to /login: Intercepts and renders modal in @auth slot
  • Direct access to /login (page refresh, direct URL): Renders dedicated page
  • Back navigation: Closes modal using router.back()
  • Navigate away: Slot renders null, modal disappears

Key insight: The (.) matcher means the route is one segment level higher, not filesystem level. Since slots (@auth) don't count as segments, (.)login intercepts /login even though it's two filesystem levels deep.

Sources:

95% confidence
A

When you refresh a page with an Intercepting Route modal in Next.js, the modal closes and the full page renders instead.

On hard navigation (page refresh, direct URL access, or browser back/forward), Next.js does NOT intercept the route. The user sees the complete page at that route, not the modal overlay.

On soft navigation (client-side navigation using <Link> or router.push()), Next.js intercepts the route and displays it as a modal.

Example:

  • You click a photo thumbnail → Opens as modal (intercepted route)
  • You refresh the page → Modal closes, full photo page renders (no interception)
  • You share the URL → Recipient sees full photo page (no interception)

This design preserves shareable URLs while maintaining the modal UX during app navigation. The intercepted route still exists as a standalone page, so refreshing doesn't break the application—it just changes the presentation.

Sources:

95% confidence
A

default.js is a fallback file for Parallel Routes that renders when Next.js cannot recover a slot's active state after a full-page load (hard navigation).

When You Need It:

You need default.js when using Parallel Routes if:

  1. Slots have mismatched routes - If one slot has a page for a route but another slot doesn't, the slot without a matching page needs default.js on refresh

    • Example: @team has /settings but @analytics doesn't → @analytics needs default.js
  2. For EVERY named slot - All named slots (@folder pattern) require default.js to prevent errors during hard navigation

  3. For the implicit children slot - Even the default slot needs default.js to prevent 404 errors when Next.js can't recover the parent page's active state

What Happens Without It:

  • Named slots without default.js → Error
  • children slot without default.js → 404 page

Common Pattern:
For modals or conditional UI, return null to hide the slot when inactive:

// app/@modal/default.tsx
export default function Default() {
  return null
}

To Preserve 404 Behavior:

import { notFound } from 'next/navigation'

export default function Default() {
  notFound()
}

Sources:

95% confidence
A

Create a slot in Next.js Parallel Routes by using the @folder naming convention.

Steps:

  1. Create a folder with @ prefix - Name it @slotname (e.g., @analytics, @team, @dashboard)
  2. Place it at the same level as other route segments - The folder sits alongside other app directory folders
  3. Add a page.tsx inside - Create content that will render in that slot
  4. Access as props in parent layout - The slot name (without @) becomes a prop in the shared layout

Example Structure:

app/
├── layout.tsx          # Receives slots as props
├── page.tsx           # children prop
├── @analytics/        # Slot named "analytics"
│   └── page.tsx
└── @team/             # Slot named "team"
    └── page.tsx

Parent Layout Implementation:

export default function Layout({
  children,
  analytics,
  team,
}: {
  children: React.ReactNode
  analytics: React.ReactNode
  team: React.ReactNode
}) {
  return (
    <>
      {children}
      {analytics}
      {team}
    </>
  )
}

Important: Slots do NOT affect the URL structure. A file at /@analytics/views will have the URL /views.

Sources:

95% confidence
A

Parallel Routes allow you to render multiple pages simultaneously or conditionally within the same layout using named slots defined with the @folder convention.

How they work:

Named slots are created using folders prefixed with @ (e.g., @analytics, @team). These slots are passed as props to the shared parent layout and can render different content side-by-side. Critically, slots are not route segments and do not affect the URL structure—/@analytics/views renders at /views.

File structure example:

app/
  @analytics/
    page.tsx
  @team/
    page.tsx
  layout.tsx

Layout receives slots as props:

export default function Layout({
  children,
  analytics,
  team,
}: {
  children: React.ReactNode
  analytics: React.ReactNode
  team: React.ReactNode
}) {
  return (
    <>
      {children}
      {analytics}
      {team}
    </>
  )
}

When to use them:

  • Dashboards with multiple independent sections
  • Conditional rendering based on user roles/permissions
  • Tabbed interfaces within the same layout
  • Modals with deep linking (combined with Intercepting Routes)
  • Independent loading/error states for each section (each route can stream independently)

Key feature: Each slot can have its own default.js file to render as a fallback for unmatched slots during initial load or full-page reload, preventing 404 errors.

Sources:

95% confidence
A

To close a modal created with Intercepting Routes in Next.js, use router.back() or navigate with a Link component to a route where the modal slot returns null.

Method 1: Using router.back()

'use client'
import { useRouter } from 'next/navigation'

export function Modal({ children }: { children: React.ReactNode }) {
  const router = useRouter()
  
  return (
    <>
      <button onClick={() => router.back()}>Close modal</button>
      <div>{children}</div>
    </>
  )
}

Method 2: Using Link component

import Link from 'next/link'

export function Modal({ children }: { children: React.ReactNode }) {
  return (
    <>
      <Link href="/">Close modal</Link>
      <div>{children}</div>
    </>
  )
}

Required: Create a default.js file in your slot

To ensure the modal closes properly when navigating to routes that don't match the intercepting route, add a default.js file in your slot directory that returns null:

// app/@modal/default.js
export default function Default() {
  return null
}

This prevents the modal from remaining visible after navigation to unmatched routes.

Sources:

95% confidence

rendering_strategies

6 questions
A

Partial Prerendering (PPR) is a Next.js rendering strategy that combines static and dynamic rendering within a single route by serving an instant static HTML shell while streaming dynamic content.

How It Works

PPR uses React Suspense boundaries to separate static and dynamic parts of a page:

  1. Static Shell (Build Time): Next.js prerenders static content and Suspense fallback UI into a static HTML shell during the build process
  2. Dynamic Content (Request Time): Dynamic sections wrapped in <Suspense> are postponed and streamed to the client when the user requests the route
  3. Parallel Streaming: Dynamic parts resolve concurrently rather than sequentially, reducing total load time

The result is a static shell sent immediately to the browser, with dynamic content updating the UI as it becomes available.

Three Content Types

Static Content - Automatically included in the shell (synchronous operations, pure computations)

Cached Dynamic Content - Uses use cache directive with cacheLife for data that doesn't need request context

Streaming Dynamic Content - Wrapped in <Suspense>, requires runtime data (cookies, headers, params)

Configuration

PPR is currently experimental. Enable it in next.config.ts:

const nextConfig: NextConfig = {
  experimental: {
    ppr: 'incremental',
  },
}

Then opt-in per route:

export const experimental_ppr = true

The 'incremental' value allows adopting PPR for specific routes rather than globally. The flag applies to all children of the route segment.

Sources:

95% confidence
A

Yes. ISR uses a stale-while-revalidate strategy.

When the revalidation period expires, the next visitor receives the cached (stale) page immediately, while Next.js regenerates a fresh version in the background. Once regeneration completes, subsequent requests receive the updated page.

This ensures:

  • Zero downtime during regeneration
  • Fast response times (serving from cache)
  • The stale page is only replaced after the new version is successfully built

The Cache-Control header is set to: s-maxage=<revalidate>, stale-while-revalidate

Sources:

95% confidence
A

When the ISR revalidation time expires in Next.js, the page follows a stale-while-revalidate pattern:

  1. First request after expiration: Returns the cached (now stale) page immediately to the user

  2. Background regeneration: Next.js triggers a regeneration of the page in the background

  3. Cache invalidation: Once the new page generates successfully, Next.js invalidates the old cache and replaces it with the updated page

  4. Subsequent requests: Receive the freshly regenerated page

Key behavior: Users never wait for regeneration. The stale page is served instantly while Next.js updates the cache behind the scenes. If background regeneration fails, the old page remains unchanged.

Example with revalidate: 60:

  • Minutes 0-1: All visitors see the same cached version (instantaneous)
  • Minute 1+: Next request still gets the cached page but triggers background rebuild
  • After rebuild completes: New requests get the updated page

Sources:

95% confidence
A

Use SSG when you can pre-render a page ahead of a user's request. This is the key decision criterion.

Best for:

  • Marketing pages
  • Blog posts and articles
  • E-commerce product listings
  • Documentation
  • Help pages
  • Any content that doesn't change frequently

Why use it:

  • Page HTML is generated at build time (next build)
  • Built once, served by CDN on every request
  • Maximum performance and SEO benefits
  • Both HTML and JSON files can be cached

When NOT to use SSG:

  • Content changes on every request
  • Frequently updated data
  • User-specific or personalized content

Alternatives for dynamic content:

  • Server-Side Rendering (SSR) - for always fresh data
  • Client-side fetching - for portions of the page
  • Incremental Static Regeneration (ISR) - for periodic updates

Next.js recommends using Static Generation whenever possible because it's faster than server-rendering on each request.

Sources:

95% confidence
A

Yes. Next.js allows you to use different rendering strategies for different pages within the same application.

This is explicitly stated in the official documentation: "One of the major strengths of Next.js is that each one of the above rendering methods can be done on a per-page basis."

How it works:

Each page in your Next.js application can independently choose from:

  • Static Site Generation (SSG) - Use getStaticProps to pre-render at build time
  • Server-Side Rendering (SSR) - Use getServerSideProps to render on each request
  • Incremental Static Regeneration (ISR) - Use revalidate option with getStaticProps to update static pages periodically
  • Client-Side Rendering (CSR) - Fetch data on the client using React hooks

Example mix:

// pages/blog/[slug].tsx - Static Generation
export async function getStaticProps() { ... }

// pages/dashboard.tsx - Server-Side Rendering  
export async function getServerSideProps() { ... }

// pages/profile.tsx - Client-Side Rendering
// (no data fetching functions, uses useEffect)

In Next.js App Router (13+), the framework automatically chooses the best rendering strategy per route based on features used, or you can mix static/cached/dynamic content within a single route using the use cache directive and <Suspense> boundaries.

Sources:

95% confidence
A

Use ISR (Incremental Static Regeneration) in Next.js when you have static content that needs periodic updates without rebuilding your entire site.

When to Use ISR:

1. Content-heavy sites at scale

  • Blogs with hundreds or thousands of posts
  • E-commerce sites with large product catalogs
  • Documentation sites
  • News sites with frequent but not real-time updates

2. Content that updates periodically

  • Data that changes hourly, daily, or on a schedule
  • Content management systems where editors publish updates
  • Product information that refreshes regularly

3. High-traffic applications needing performance

  • ISR serves prerendered static pages for most requests, reducing server load
  • Pages are cached and served statically until revalidation time expires

4. On-demand content updates

  • Use revalidatePath() or revalidateTag() to trigger updates via webhooks or API routes
  • Example: CMS webhook triggers revalidation when content is published

When NOT to Use ISR:

1. Static exports - ISR requires a Node.js server and is explicitly unsupported for static exports

2. Real-time data requirements - If you need instant updates (live scores, stock tickers, chat), use dynamic rendering instead

3. Non-Node.js runtimes - ISR only works with the Node.js runtime, not Edge Runtime

Example Implementation:

// App Router
export const revalidate = 3600; // Revalidate every hour

export default async function Page() {
  const data = await fetch('https://api.example.com/data');
  return <div>{/* content */}</div>;
}
// Pages Router
export async function getStaticProps() {
  return {
    props: { data },
    revalidate: 3600, // Revalidate every hour
  };
}

Sources:

95% confidence

database_integration

5 questions
A

Based on the official Prisma documentation from the web search results:

For serverless deployments (including Next.js on Vercel), set connection_limit=1 as the starting point.

In serverless environments, each function invocation creates a short-lived Node.js process with its own Prisma Client instance and connection pool. During traffic spikes, many concurrent functions with higher connection limits can quickly exhaust your database's maximum connections.

Configuration:

DATABASE_URL="postgresql://user:password@host:5432/database?connection_limit=1"

After setting connection_limit=1, you can optimize based on your actual performance needs.

Exception: If you're using an external connection pooler (like PgBouncer), use the default pool size formula (num_physical_cpus * 2 + 1) as your starting point instead, since the pooler prevents connection exhaustion.

Additional Next.js Best Practice: Use a singleton pattern for PrismaClient in development to prevent multiple instances from creating separate connection pools.

Sources:

95% confidence
A

Instantiate PrismaClient once as a singleton in a separate module, then import that instance in your API routes.

Create a file (e.g., lib/prisma.ts or db.ts) with this pattern:

import { PrismaClient } from '@prisma/client'

const prismaClientSingleton = () => {
  return new PrismaClient()
}

declare const globalThis: {
  prismaGlobal: ReturnType<typeof prismaClientSingleton>;
} & typeof global;

const prisma = globalThis.prismaGlobal ?? prismaClientSingleton()

export default prisma

if (process.env.NODE_ENV !== 'production') globalThis.prismaGlobal = prisma

Then import it in your API routes:

import prisma from '@/lib/prisma'

export default async function handler(req, res) {
  const users = await prisma.user.findMany()
  res.json(users)
}

Why this pattern: In development, Next.js hot reloading clears the Node.js cache on each change, which would create a new PrismaClient instance every time. Since each instance maintains its own connection pool, this quickly exhausts database connections. The globalThis approach ensures only one instance exists across hot reloads in development, while staying clean in production.

Sources:

95% confidence
A

Based on the official Prisma documentation, create a singleton pattern by storing the PrismaClient instance on the globalThis object to prevent multiple instances during Next.js hot reloading in development:

import { PrismaClient } from '@prisma/client'

const globalForPrisma = globalThis as unknown as {
  prisma: PrismaClient | undefined
}

export const prisma = globalForPrisma.prisma ?? new PrismaClient()

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma

Why this works:

  • In development, Next.js hot-reloading can cause the module to be reinitialized multiple times
  • Each new PrismaClient() instance creates its own connection pool
  • Storing the instance on globalThis prevents creating new instances on hot reload
  • In production, this singleton behavior isn't needed since there's no hot reloading

Usage:
Import from this file throughout your application instead of creating new PrismaClient instances:

import { prisma } from '@/lib/prisma' // or wherever you placed the singleton

// Use prisma in your API routes, Server Components, etc.
const users = await prisma.user.findMany()

Sources:

95% confidence
A

Based on the official Prisma documentation search results, I can provide the authoritative answer:

No, you should NOT explicitly call $disconnect() on PrismaClient in Next.js serverless functions.

In serverless environments like Next.js API routes, serverless containers are often reused across multiple invocations. If you disconnect at the end of each function execution, the next invocation must create a new database connection, which adds latency and degrades performance.

Best practice:

  • Instantiate PrismaClient once (typically as a singleton)
  • Do NOT call $disconnect() at the end of each request
  • Let the serverless platform manage the lifecycle

When you SHOULD disconnect:
Only call $disconnect() for infrequent scripts (like scheduled jobs) that run in the context of a long-running application but don't benefit from persistent connections.

Recommended pattern for Next.js:

// lib/prisma.ts
import { PrismaClient } from '@prisma/client'

const globalForPrisma = global as unknown as { prisma: PrismaClient }

export const prisma = globalForPrisma.prisma || new PrismaClient()

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma

Sources:

95% confidence
A

Based on the web search results, I can provide an authoritative answer from Prisma's official documentation:

YES - Use PgBouncer (or external connection pooling) with Prisma in serverless Next.js deployments.

In serverless environments, each function invocation creates new database connections. Without connection pooling, you'll quickly exhaust your database's connection limit. PgBouncer acts as an external connection pooler between Prisma Client and your database, managing a pool of connections that can be shared across serverless function invocations.

Configuration:

Add the pgbouncer=true flag to your PostgreSQL connection URL:

datasource db {
  provider = "postgresql"
  url      = "postgresql://USER:PASSWORD@HOST:PORT/DATABASE?pgbouncer=true"
}

For Next.js on Vercel specifically, use a pooled connection string:

POSTGRES_PRISMA_URL="postgres://user:[email protected]:5432/name?pgbouncer=true&connect_timeout=15"

Additional serverless recommendations:

  • Set connection_limit = 1 in your Prisma Client configuration as a starting point for serverless
  • Use connection pooling services (PgBouncer, Supavisor, or provider-specific poolers)

Sources:

95% confidence

streaming_suspense

5 questions
A

loading.tsx is a Next.js file convention that automatically wraps the page.js file and any children below in a <Suspense> boundary at the route segment level.

Manual Suspense boundaries are React <Suspense> components you place explicitly within your code to control loading states for specific parts of a page.

Key Difference

loading.tsx is a convenience wrapper - it automatically creates a Suspense boundary for an entire route segment, while manual boundaries give you fine-grained control over individual components within a page.

When to Use Each

Use loading.tsx:

  • Route-level loading UI (whole page or layout)
  • Automatic instant loading states during navigation
  • Simple, convention-based approach

Use manual Suspense boundaries:

  • Granular control within a single page
  • Independent loading states for different sections (e.g., one spinner for comments, another for sidebar)
  • Streaming different content at different times on the same page

Example

// app/dashboard/loading.tsx - wraps entire route
export default function Loading() {
  return <Spinner />
}

// vs manual Suspense - granular control
export default function Page() {
  return (
    <>
      <Suspense fallback={<CommentsSkeleton />}>
        <Comments />
      </Suspense>
      <Suspense fallback={<WeatherSkeleton />}>
        <Weather />
      </Suspense>
    </>
  )
}

Sources:

95% confidence
A

Streaming with Suspense is enabled by default in Next.js App Router. You implement it using two methods:

Method 1: Page-Level Streaming with loading.js

Create a loading.js (or .tsx) file in your route folder:

// app/dashboard/loading.tsx
export default function Loading() {
  return <LoadingSkeleton />
}

This automatically wraps your page.js in a <Suspense> boundary.

Method 2: Component-Level Streaming with <Suspense>

Wrap specific components for granular control:

import { Suspense } from 'react'
import { PostFeed, Weather } from './Components'

export default function Posts() {
  return (
    <section>
      <Suspense fallback={<p>Loading feed...</p>}>
        <PostFeed />
      </Suspense>
      <Suspense fallback={<p>Loading weather...</p>}>
        <Weather />
      </Suspense>
    </section>
  )
}

No configuration needed - streaming works automatically in the App Router when you use these patterns. Components wrapped in <Suspense> that perform async operations (like data fetching) will stream progressively from server to client.

Note: Streaming requires a dynamic server environment (Node.js or Edge runtime) and is not supported with static exports.

Sources:

95% confidence
A

Yes. The loading.tsx file automatically wraps page.tsx and any children below it in a <Suspense> boundary.

When you create a loading.tsx file in the same directory as page.tsx, Next.js:

  1. Nests loading.tsx inside layout.tsx
  2. Automatically wraps the page.tsx file and children in a Suspense boundary
  3. Shows the loading UI instantly while the page content streams in

You don't need to manually add <Suspense> when using loading.tsx - Next.js handles this automatically to enable streaming and progressive rendering.

Sources:

95% confidence
A

Use next/dynamic with the ssr: false option to disable server-side rendering for a Client Component:

import dynamic from 'next/dynamic'

const ComponentName = dynamic(() => import('./component'), {
  ssr: false
})

The component will only load on the client side, skipping server-side rendering entirely. This is useful when your component relies on browser APIs like window or uses third-party libraries that require the browser environment.

With loading state:

import dynamic from 'next/dynamic'

const ComponentName = dynamic(() => import('./component'), {
  ssr: false,
  loading: () => <p>Loading...</p>
})

Important: In React 18+ with suspense: true, the ssr: false option is ignored as React always resolves Suspense boundaries on the server.

Sources:

95% confidence

common_errors

4 questions
A

Use useEffect with a state variable to ensure the server and client render identical initial HTML, then conditionally render client-specific content after hydration completes.

The Pattern

function MyComponent() {
  const [didMount, setDidMount] = useState(false);
  
  useEffect(() => {
    setDidMount(true);
  }, []);
  
  if (didMount) {
    // ... return client-only JSX ...
  } else {
    // ... return initial JSX ...
  }
}

Why This Works

  • useEffect only runs on the client, never during server rendering
  • The didMount state starts as false on both server and client initial render
  • This ensures identical HTML output during hydration (preventing mismatches)
  • After hydration completes, the Effect runs and sets didMount to true
  • The component re-renders with client-specific content

Common Use Cases

// Browser APIs (window, localStorage, etc.)
const [windowWidth, setWindowWidth] = useState(0);

useEffect(() => {
  setWindowWidth(window.innerWidth);
}, []);

// Conditional rendering based on client state
if (windowWidth === 0) {
  return <div>Loading...</div>; // Server render
}
return <div>Width: {windowWidth}px</div>; // Client render

Important Considerations

  • Use this pattern sparingly - users on slow connections will see the initial content for extended periods
  • Avoid jarring visual changes between server and client renders
  • Don't use typeof window !== 'undefined' checks in render logic (causes hydration errors)

Sources:

95% confidence
A

To fix hydration errors caused by browser extensions in Next.js, use the suppressHydrationWarning prop on elements that extensions are likely to modify (typically <html>, <head>, or <body>):

<html suppressHydrationWarning>
  <body suppressHydrationWarning>
    {children}
  </body>
</html>

How it works: Browser extensions often inject scripts, styles, or modify the DOM before React hydrates, causing mismatches between server-rendered HTML and client expectations. The suppressHydrationWarning prop tells React to skip mismatch warnings for that element (one level deep only).

React 19 improvement: If you upgrade to React 19 (Next.js 15 uses React 19), this problem is largely solved automatically. React 19 now skips over unexpected tags inserted by browser extensions in <head> and <body>, avoiding mismatch errors entirely.

Alternative approaches:

  1. Wrap extension-prone content in client components with useEffect to render only on client side
  2. Use dynamic imports with ssr: false for components affected by extensions
  3. Upgrade to Next.js 15 (which uses React 19) for automatic handling

Important: Only use suppressHydrationWarning as an escape hatch for content you know will differ. Don't apply it broadly across your application.

Sources:

95% confidence
A

No. suppressHydrationWarning does not fix hydration errors—it only silences the warning.

What It Actually Does

suppressHydrationWarning={true} prevents React from warning you about content mismatches between server and client, but the mismatch still exists. React will not attempt to patch the mismatched content.

Usage

<time dateTime="2016-10-25" suppressHydrationWarning={true}>
  {new Date().toLocaleDateString()}
</time>

Critical Limitations

  • Works one level deep only - only suppresses warnings on the direct element, not children
  • Intended as an escape hatch - not a solution for general hydration errors
  • Don't overuse it - the official docs explicitly warn against overuse

When It's Appropriate

Use it only for unavoidable differences between server and client, such as:

  • Timestamps that will always differ
  • Time-sensitive data that can't be synchronized

How to Actually Fix Hydration Errors

Instead of suppressing warnings, fix the root cause:

  1. Ensure server and client render the same initial content
  2. Use useEffect for client-only content
  3. Use dynamic imports with ssr: false for components that can't be server-rendered
  4. Avoid browser-only APIs during initial render

Sources:

95% confidence
A

A hydration error in Next.js occurs when the HTML generated on the server doesn't match the HTML React expects to render on the client during hydration—the process where React attaches event handlers and interactivity to the server-rendered HTML.

What Causes Hydration Errors

Common causes:

  1. Invalid HTML nesting - Using incorrect tag hierarchies:

    • <p> inside <p>
    • <div> inside <p>
    • <ul> or <ol> inside <p>
    • Interactive elements nested: <a> inside <a>, <button> inside <button>
  2. Browser-only APIs in render logic:

    • Using typeof window !== 'undefined' checks
    • Accessing window or localStorage during render
    • Date/time APIs like new Date() that differ between server and client
  3. External modifications:

    • Browser extensions modifying the HTML
    • CDN/Edge configurations (e.g., Cloudflare Auto Minify) altering HTML
    • Incorrectly configured CSS-in-JS libraries

Example of problematic code:

// ❌ Causes hydration error - different on server vs client
function Component() {
  return <div>{Math.random()}</div>
}

Fix using useEffect:

// ✅ Prevents hydration error
function Component() {
  const [value, setValue] = useState(null)
  
  useEffect(() => {
    setValue(Math.random())
  }, [])
  
  return <div>{value}</div>
}

Fix using dynamic import:

// ✅ Disable SSR for specific component
import dynamic from 'next/dynamic'

const NoSSR = dynamic(() => import('./component'), { ssr: false })

Sources:

95% confidence

nextjs_15_breaking_changes

4 questions
A
npx @next/codemod@latest next-async-request-api .

This codemod transforms previously synchronous Dynamic APIs in Next.js 15 that now return promises:

  • cookies(), headers(), and draftMode() from next/headers
  • params and searchParams in pages, layouts, and route handlers

What it does:

  • Adds await to these API calls (e.g., cookies()await cookies())
  • Wraps with React.use() where appropriate
  • Leaves @next-codemod-error comments where manual intervention is needed

Example transformation:

// Before
const cookieStore = cookies()
const headersList = headers()

// After
const cookieStore = await cookies()
const headersList = await headers()

Run the command in your project root (the . specifies the target directory).

Sources:

95% confidence
A

In Next.js 15+, params is passed as a Promise. In Client Components (which cannot be async), use React's use() hook to unwrap it:

'use client'

import { use } from 'react'

export default function Page({
  params,
}: {
  params: Promise<{ slug: string }>
}) {
  const { slug } = use(params)
  return <div>Slug: {slug}</div>
}

Key points:

  • Client Components cannot be async functions
  • params is a Promise in Next.js 15+
  • use() unwraps the Promise synchronously after it resolves
  • Type params as Promise<{ yourParamName: string }> for TypeScript

Contrast with Server Components:
In Server Components, await the params instead:

export default async function Page({
  params,
}: {
  params: Promise<{ slug: string }>
}) {
  const { slug } = await params
  return <div>Slug: {slug}</div>
}

Sources:

95% confidence
A

In Next.js 15, headers() is an asynchronous function that returns a Promise. You must await it.

Syntax

import { headers } from 'next/headers'

export default async function Page() {
  const headersList = await headers()
  const userAgent = headersList.get('user-agent')
}

Key Requirements

  • Must use await: headers() returns a Promise, so you must await it
  • Server Components only: Works only in async Server Components
  • Returns Web Headers object: Standard read-only Headers API

Example: Authorization Header

import { headers } from 'next/headers'

export default async function Page() {
  const authorization = (await headers()).get('authorization')
  const res = await fetch('https://api.example.com/data', {
    headers: { authorization }
  })
  const user = await res.json()
  return <h1>{user.name}</h1>
}

Available Methods

After awaiting, you can use:

  • .get(name) - retrieve header value
  • .has(name) - check if header exists
  • .entries(), .keys(), .values() - iterate headers
  • .forEach() - loop through headers

Sources:

95% confidence
A

Yes. In Next.js 15, both params and searchParams are async (they return Promises).

What Changed

Previously synchronous props are now asynchronous:

  • params (in Page and Layout components)
  • searchParams (in Page components)

How to Access Them

Server Components (recommended):

export default async function Page({
  params,
  searchParams,
}: {
  params: Promise<{ slug: string }>
  searchParams: Promise<{ [key: string]: string | string[] | undefined }>
}) {
  const { slug } = await params
  const { query } = await searchParams
  return <h1>Blog Post: {slug}</h1>
}

Client Components:

'use client'
import { use } from 'react'

export default function Page({ params, searchParams }) {
  const { slug } = use(params)
  const { query } = use(searchParams)
}

Migration

Run the codemod to auto-convert your code:

npx @next/codemod@canary upgrade latest

Temporary Backward Compatibility

In Next.js 15, you can still access these synchronously, but this triggers warnings and will be removed in a future version.

Sources:

95% confidence

content_management

4 questions
A

Yes, you can use remark/rehype plugins with Turbopack in Next.js, with limitations.

How to Use Plugins with Turbopack

Upgrade to the latest @next/mdx and specify plugin names as strings (not imports):

const withMDX = createMDX({
  options: {
    remarkPlugins: [
      'remark-gfm',
      ['remark-toc', { heading: 'The Table' }],
    ],
    rehypePlugins: [
      'rehype-slug',
      ['rehype-katex', { strict: true, throwOnError: true }],
    ],
  },
})

Critical Limitation

Remark and rehype plugins without serializable options cannot be used yet with Turbopack, because JavaScript functions can't be passed to Rust.

You can only use plugins with serializable configuration options (strings, numbers, booleans, plain objects). Plugins requiring function callbacks or non-serializable options won't work.

Sources:

95% confidence
A

Configure remark plugins with @next/mdx by passing them in the options.remarkPlugins array when calling createMDX() in your Next.js config file:

import createMDX from '@next/mdx'

/** @type {import('next').NextConfig} */
const nextConfig = {
  pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
}

const withMDX = createMDX({
  options: {
    remarkPlugins: [
      // Plugin without options
      'remark-gfm',
      // Plugin with options
      ['remark-toc', { heading: 'Contents' }],
    ],
    rehypePlugins: [
      'rehype-slug',
    ],
  },
})

export default withMDX(nextConfig)

Key requirements:

  • Use next.config.mjs or next.config.ts (the remark/rehype ecosystem is ESM only)
  • Plugins are specified as strings (without options) or arrays with [pluginName, options] (with options)
  • Install plugins separately: npm install remark-gfm remark-toc

Current limitation: Plugins with non-serializable options (JavaScript functions) don't work with Turbopack yet.

Sources:

95% confidence
A

Use next-mdx-remote with trusted sources only. Remote MDX compiles to JavaScript and executes on the server, creating remote code execution (RCE) risk if you fetch from untrusted sources.

Safe Implementation

For App Router (Server Components):

import { MDXRemote } from 'next-mdx-remote/rsc'

export default async function Page() {
  // Fetch from TRUSTED source only
  const res = await fetch('https://your-trusted-cms.com/content.mdx')
  const markdown = await res.text()
  
  return <MDXRemote source={markdown} />
}

For Pages Router:

import { serialize } from 'next-mdx-remote/serialize'
import { MDXRemote } from 'next-mdx-remote'

export async function getStaticProps() {
  // Fetch from TRUSTED source only
  const res = await fetch('https://your-trusted-cms.com/content.mdx')
  const source = await res.text()
  const mdxSource = await serialize(source)
  
  return { props: { mdxSource } }
}

export default function Page({ mdxSource }) {
  return <MDXRemote {...mdxSource} />
}

Critical Safety Rules

  1. Only fetch from sources you control - Your own CMS, database, or verified APIs
  2. Never accept user-submitted MDX - User input can inject arbitrary code
  3. Validate source origin - Whitelist allowed domains/endpoints
  4. Use environment variables for trusted source URLs to prevent hardcoded external domains

Why This Matters

MDX → JavaScript compilation means untrusted content can execute require(), fs.readFile(), or any Node.js operation on your server.

Sources:

95% confidence
A

Configure rehype plugins with @next/mdx by passing them to the rehypePlugins array in the options object when calling createMDX():

import createMDX from '@next/mdx'

/** @type {import('next').NextConfig} */
const nextConfig = {
  pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
}

const withMDX = createMDX({
  options: {
    rehypePlugins: [
      // Without options
      'rehype-slug',
      // With options
      ['rehype-katex', { strict: true, throwOnError: true }],
    ],
  },
})

export default withMDX(nextConfig)

Critical requirements:

  1. Use ESM config: The remark/rehype ecosystem is ESM-only, so use next.config.mjs (not .js)

  2. Turbopack limitation: When using Turbopack, plugins without serializable options cannot be used because JavaScript functions can't be passed to Rust. Use string names for plugins and serializable config objects only.

Sources:

95% confidence

composition_patterns

3 questions
A

Yes. You can pass Server Components as children (or any props) to Client Components.

The Pattern:

// Client Component
'use client'
export default function ClientWrapper({ children }: { children: React.ReactNode }) {
  const [isOpen, setIsOpen] = useState(false)
  return <div>{children}</div>
}

// Server Component
import ClientWrapper from './client-wrapper'
import ServerComponent from './server-component'

export default function Page() {
  return (
    <ClientWrapper>
      <ServerComponent />
    </ClientWrapper>
  )
}

Why This Works:
All Server Components are rendered on the server ahead of time, including those passed as props. The resulting RSC (React Server Components) payload contains references indicating where Client Components should be rendered within the component tree. You're not importing a Server Component into a Client Component file—you're passing the already-rendered server output as a prop from a parent Server Component.

Key Constraint:
You cannot import a Server Component directly inside a Client Component file. The children pattern works because the composition happens in the parent Server Component, which then passes the rendered result to the Client Component.

Sources:

95% confidence
A

No, you cannot pass regular functions as props to Client Components in Next.js. Props passed from Server Components to Client Components must be serializable by React, and functions are not serializable.

However, you CAN pass Server Actions as props by marking them with the "use server" directive.

How to Pass Server Actions

  1. Create a separate file with "use server" at the top
  2. Define async functions (Server Actions) in that file
  3. Import and pass them as props to Client Components

Example:

// actions.ts
'use server'

export async function updateItem(formData: FormData) {
  // server-side logic
}
// ServerComponent.tsx
import { updateItem } from './actions'
import ClientComponent from './ClientComponent'

export default function ServerComponent() {
  return <ClientComponent updateItemAction={updateItem} />
}
// ClientComponent.tsx
'use client'

export default function ClientComponent({ updateItemAction }) {
  return (
    <form action={updateItemAction}>
      <input type="text" name="name" />
      <button type="submit">Submit</button>
    </form>
  )
}

Key Constraints

  • Server Actions must be in a separate file with module-level "use server" directive
  • Cannot define Server Actions inside Client Components
  • Server Actions work with Progressive Enhancement and the .bind() method

Sources:

95% confidence
A

You can pass serializable values as props from Server Components to Client Components. React uses the same serialization rules as Server Actions.

✅ Serializable Types (Allowed)

Primitives:

  • string, number, bigint, boolean, undefined, null
  • Symbols registered globally via Symbol.for()

Data Structures:

  • Arrays
  • Plain objects (with serializable properties)
  • Map, Set
  • TypedArray, ArrayBuffer
  • Date
  • FormData

Special:

  • Server Components (as props, including via children)
  • Server Functions/Actions
  • Promise (streams to client)

❌ Non-Serializable Types (Not Allowed)

  • Functions (except Server Functions)
  • Class instances (except built-ins above)
  • Classes
  • React elements/JSX
  • Event handlers
  • Symbols created with Symbol() (not globally registered)

Example

// ✅ Valid
<ClientComponent 
  name="John"
  count={42}
  data={{ items: [1, 2, 3] }}
  date={new Date()}
>
  <ServerComponent /> {/* Server Component as children prop */}
</ClientComponent>

// ❌ Invalid
<ClientComponent 
  onClick={() => {}} // Function (not a Server Action)
  instance={new MyClass()} // Class instance
/>

Sources:

95% confidence

font_optimization

3 questions
A

Use the variable option to define a CSS variable name, then apply it via the .variable property in className:

import { Inter } from 'next/font/google'

const inter = Inter({
  subsets: ['latin'],
  variable: '--font-inter',
})

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={inter.variable}>
      <body>{children}</body>
    </html>
  )
}

Then reference the CSS variable in your CSS:

.text {
  font-family: var(--font-inter);
}

Or in Tailwind config:

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      fontFamily: {
        sans: ['var(--font-inter)'],
      },
    },
  },
}

For multiple fonts, combine the .variable properties:

const inter = Inter({ variable: '--font-inter' })
const robotoMono = Roboto_Mono({ variable: '--font-roboto-mono' })

<html className={`${inter.variable} ${robotoMono.variable}`}>

Sources:

95% confidence
A

Import the font from next/font/google, configure it with options, and apply its className to your HTML elements.

For variable fonts (recommended):

import { Inter } from 'next/font/google'

const inter = Inter({
  subsets: ['latin'],
})

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={inter.className}>
      <body>{children}</body>
    </html>
  )
}

For non-variable fonts (must specify weight):

import { Roboto } from 'next/font/google'

const roboto = Roboto({
  weight: '400',
  subsets: ['latin'],
})

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={roboto.className}>
      <body>{children}</body>
    </html>
  )
}

Multiple weights:

const roboto = Roboto({
  weight: ['400', '700'],
  subsets: ['latin'],
})

The font is automatically self-hosted as a static asset—no external requests to Google Fonts occur at runtime.

Sources:

95% confidence
A

Import localFont from next/font/local and specify the path to your local font file using the src parameter.

Basic usage (single font file):

import localFont from 'next/font/local'

const myFont = localFont({
  src: './my-font.woff2',
  display: 'swap',
})

export default function RootLayout({ children }) {
  return (
    <html lang="en" className={myFont.className}>
      <body>{children}</body>
    </html>
  )
}

Multiple weights/styles (font family):

import localFont from 'next/font/local'

const roboto = localFont({
  src: [
    {
      path: './Roboto-Regular.woff2',
      weight: '400',
      style: 'normal',
    },
    {
      path: './Roboto-Italic.woff2',
      weight: '400',
      style: 'italic',
    },
    {
      path: './Roboto-Bold.woff2',
      weight: '700',
      style: 'normal',
    },
    {
      path: './Roboto-BoldItalic.woff2',
      weight: '700',
      style: 'italic',
    },
  ],
})

Font file location:

  • Store fonts in the public folder, OR
  • Co-locate them inside the app folder

The src path is relative to where the loader function is called.

Key options:

  • display: Controls font loading behavior ('swap' is default)
  • variable: Creates a CSS variable name for the font
  • preload: Whether to preload the font (default: true)
  • adjustFontFallback: Reduces layout shift (default: 'Arial')

Sources:

95% confidence

nextjs_app_router

2 questions
A

No, you cannot use useState in a Server Component in Next.js App Router.

Server Components run only on the server and cannot use React hooks that require interactivity or state (useState, useEffect, event handlers, etc.). These features are only available in Client Components.

To use useState, you must mark your component as a Client Component by adding the "use client" directive at the top of the file:

'use client'

import { useState } from 'react'

export default function Counter() {
  const [count, setCount] = useState(0)
  
  return (
    <button onClick={() => setCount(count + 1)}>
      Count: {count}
    </button>
  )
}

What happens if you try: Next.js will throw an error if you attempt to use useState (or other client-only hooks) in a Server Component without the "use client" directive, because these APIs are not available in the server environment.

Common pattern: Keep your page as a Server Component for data fetching, then pass data as props to nested Client Components that handle interactivity.

Sources:

95% confidence
A

Server Components render on the server and send HTML to the client. Client Components render in the browser with JavaScript.

Key Differences:

Where they execute:

  • Server Components: Run only on the server during build or request time
  • Client Components: Run in the browser after initial HTML loads (hydration)

How to create them:

  • Server Components: Default in App Router - no directive needed
  • Client Components: Add "use client" directive at top of file (above imports)

What they can do:

  • Server Components: Direct database/backend access, use secrets securely, no JavaScript sent to client for component logic
  • Client Components: useState, useEffect, event handlers (onClick), browser APIs (localStorage, window), interactivity

When to use:

  • Server Components: Data fetching, static content, SEO-critical content, secure operations
  • Client Components: Interactivity, state management, browser-only features, event listeners

Example:

Server Component (default):

// app/page.tsx
async function Page() {
  const data = await fetch('https://api.example.com/data')
  return <div>{data.title}</div>
}

Client Component:

// components/button.tsx
'use client'

import { useState } from 'react'

export function Button() {
  const [count, setCount] = useState(0)
  return <button onClick={() => setCount(count + 1)}>{count}</button>
}

Important: Once you mark a file with "use client", all modules it imports become part of the client bundle.

Sources:

95% confidence

state_management

2 questions
A

React Context cannot be used directly in Server Components. You must use Client Components for any context creation or consumption.

The Pattern:

  1. Create a Client Component provider - Add 'use client' directive and create your context:
'use client'

import { createContext } from 'react'

export const ThemeContext = createContext({})

export default function ThemeProvider({
  children,
}: {
  children: React.ReactNode
}) {
  return <ThemeContext.Provider value="dark">{children}</ThemeContext.Provider>
}
  1. Render the provider in a Server Component - Server Components can render Client Component providers:
import ThemeProvider from './theme-provider'

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html>
      <body>
        <ThemeProvider>{children}</ThemeProvider>
      </body>
    </html>
  )
}
  1. Consume context only in Client Components - Any component that uses useContext must have 'use client':
'use client'

import { useContext } from 'react'
import { ThemeContext } from './theme-provider'

export default function Button() {
  const theme = useContext(ThemeContext)
  // ...
}

Key Rule: Render providers as deep as possible in the component tree (wrap only {children}, not entire layouts unnecessarily). This allows Next.js to optimize static Server Component sections while making context available to all Client Components.

Sources:

95% confidence
A

Place Context Providers in a root layout file (app/layout.tsx), wrapping {children} rather than the entire <html> document.

Pattern:

  1. Create a Client Component provider file:
// app/providers.tsx
'use client'

import { createContext } from 'react'

export const ThemeContext = createContext({})

export function ThemeProvider({ children }: { children: React.ReactNode }) {
  return <ThemeContext.Provider value="dark">{children}</ThemeContext.Provider>
}
  1. Import and use in your Server Component layout:
// app/layout.tsx
import { ThemeProvider } from './providers'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <ThemeProvider>{children}</ThemeProvider>
      </body>
    </html>
  )
}

Best Practice: Render providers as deep as possible in the component tree (not wrapping <html>). This allows Next.js to optimize static portions of Server Components while still making context available to all Client Components in the tree.

Sources:

95% confidence

observability

2 questions
A

The register() function in instrumentation.js is called once when a new Next.js server instance is initiated.

This happens:

  • At server startup/initialization
  • Exactly once per server instance
  • Before your application code runs
  • In all runtime environments (both Node.js and Edge)

Important notes:

  • The function runs during server bootstrap, making it ideal for setting up observability tools, monitoring, and logging
  • It can be an async function
  • You can use process.env.NEXT_RUNTIME to conditionally run code for specific runtimes ('nodejs' or 'edge')

File location: Place instrumentation.js (or .ts) in the root of your project, or inside the src folder if you're using one. Do not place it inside app or pages directories.

Sources:

95% confidence
A

Yes. The instrumentation.js API is stable in Next.js 15.

Previously experimental, it graduated to stable status in this release. The experimental.instrumentationHook config option is no longer needed and can be removed.

The instrumentation.js file allows you to tap into the Next.js server lifecycle to monitor performance, track errors, and integrate with observability libraries like OpenTelemetry using the register() API.

Next.js 15 also introduced a new onRequestError hook (designed with Sentry) that captures important context about server-side errors, including which router and server context generated the error.

Sources:

95% confidence

client_boundary

2 questions
A

A Server Component will not become a Client Component when imported if you pass it as JSX (children or props) instead of importing it directly into a Client Component file.

The Problem

When you import a Server Component directly inside a Client Component file (marked with "use client"), it becomes part of the client bundle and loses its server-only capabilities.

// ❌ DON'T: Direct import in Client Component
'use client'
import ServerComponent from './ServerComponent'

export default function ClientComponent() {
  return <ServerComponent /> // Now runs on client
}

Solution 1: Composition Pattern (Pass as JSX)

Pass Server Components as props (typically children) to Client Components:

// ✅ DO: Pass Server Component as children
'use client'
export default function ClientComponent({ children }) {
  return <div>{children}</div>
}

// Parent Server Component
export default function Page() {
  return (
    <ClientComponent>
      <ServerComponent /> {/* Stays a Server Component */}
    </ClientComponent>
  )
}

This works because the Server Component renders on the server first, then gets passed as a React element (not imported) to the Client Component.

Solution 2: server-only Package (Build-time Protection)

Install and import the server-only package to throw a build error if server-only code is accidentally imported into a Client Component:

npm install server-only
// lib/data.ts
import 'server-only'

export async function getData() {
  const res = await fetch('https://api.example.com/data', {
    headers: {
      authorization: process.env.API_KEY, // Server-only secret
    },
  })
  return res.json()
}

If you try to import this into a Client Component, you'll get a build error.

Sources:

95% confidence
A

No, but they become part of the client bundle.

When you add 'use client' to a file, it creates a boundary between Server and Client Components. All modules imported into that file (and their child components) are included in the client bundle, but they don't become Client Components themselves unless they also have 'use client'.

Key distinction:

  • Client bundle = JavaScript sent to the browser
  • Client Component = A component that can use client-side features (hooks, event handlers, browser APIs)

What happens:

  1. 'use client' marks an entry point
  2. Everything imported into that file gets bundled for the client
  3. But imported modules without 'use client' remain Server Components in behavior (they just get serialized and sent to the client)
  4. You don't need to add 'use client' to every child component - only at the boundary where you need client interactivity

Best practice: Add 'use client' at the highest point where you need client features, not throughout your entire component tree. This minimizes your client JavaScript bundle size.

Sources:

95% confidence

debugging

2 questions
A

When you run next build, Next.js displays symbols next to each route showing whether it's static or dynamic. The legend appears at the bottom of the build output.

Build Output Symbols:

  • (Static) - Prerendered as static content
  • ƒ (Dynamic) - Server-rendered on demand

Example output:

Route (app)
  ┌ ○ /_not-found
  └ ƒ /products/[id]
  
○  (Static)  prerendered as static content
ƒ  (Dynamic) server-rendered on demand

To view this, simply run:

next build

For more detailed output during the build process, use:

next build --debug

Routes opt out of static rendering when they use Dynamic APIs that rely on runtime information (like cookies(), headers(), or dynamic route segments without generateStaticParams()).

Sources:

95% confidence
A

Based on my search of the official documentation, here's how to debug performance issues with React DevTools in Next.js:

Installation

  1. Install the React Developer Tools browser extension for Chrome or Firefox
  2. The extension adds Components and Profiler tabs to your browser's DevTools

Enable Production Profiling in Next.js (Optional)

Add to your next.config.js:

module.exports = {
  reactStrictMode: true,
  // This enables the React Profiler in production builds
  // Note: The standard DevTools Profiler works in development by default
}

Using the Profiler Tab

  1. Open your Next.js app in the browser
  2. Open DevTools and navigate to the Profiler ⚛ tab
  3. Click the Record button (circle icon)
  4. Interact with your app to trigger the performance issues you want to investigate
  5. Click Stop to end the recording

Analyzing Results

The Profiler shows:

  • Commits: Each bar represents a render commit
  • Flame Chart: Visualizes which components rendered and how long each took
  • Ranked Chart: Lists components by render time (slowest first)
  • Component Chart: Shows individual component render history

Key Settings

  • "Record why each component rendered": Enable this checkbox in Profiler settings to see what caused each re-render (props change, state change, hooks change, parent render)

Debugging Server-Side Code

For server-side performance issues, run:

NODE_OPTIONS='--inspect' next dev

Then connect Chrome DevTools to the Node.js debugger.

Note: The official React documentation references the Profiler's capabilities but doesn't provide comprehensive step-by-step usage guides on react.dev. For detailed visual walkthroughs, the React team historically referenced Brian Vaughn's conference talks and the legacy blog post introducing the Profiler.

Sources:

95% confidence

routing_navigation

2 questions
A

307 (Temporary Redirect) is the default HTTP status code returned by redirect() in Next.js.

Exception: When redirect() is called within a Server Action, it returns 303 (See Other) instead.

Why 307?

Next.js uses 307 because it preserves the original HTTP method (e.g., POST remains POST), unlike the legacy 302 status code which browsers often convert from POST to GET.

Example:

import { redirect } from 'next/navigation'

// Returns 307 by default
redirect('/dashboard')

// For permanent redirect, use 308
redirect('/dashboard', 'replace') // or permanent: true

Sources:

95% confidence
A

The key difference is the HTTP status code and caching behavior:

redirect() - Temporary redirect

  • Returns 307 (Temporary Redirect) in most contexts
  • Returns 303 (See Other) in Server Actions
  • Not cached permanently by browsers or search engines
  • Use for temporary URL changes

permanentRedirect() - Permanent redirect

  • Returns 308 (Permanent Redirect) in most contexts
  • Returns 303 (See Other) in Server Actions
  • Cached forever by clients and search engines
  • Use when a resource's canonical URL has permanently changed (e.g., after updating a user's profile URL when they change their username)

Both functions:

  • Can be used in Server Components, Client Components, Route Handlers, and Server Actions
  • Throw an error to stop rendering (use outside try/catch blocks)
  • Don't require a return statement
  • Insert a meta tag for client-side redirection in streaming contexts
// Temporary redirect (307)
redirect('/dashboard')

// Permanent redirect (308)
permanentRedirect('/new-profile-url')

Sources:

95% confidence

seo_metadata

2 questions
A

Create a robots.js or robots.ts file in the app directory root that exports a default function returning a Robots object.

Basic Example:

import type { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
  return {
    rules: {
      userAgent: '*',
      allow: '/',
      disallow: '/private/',
    },
    sitemap: 'https://acme.com/sitemap.xml',
  }
}

Multiple Rules:

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: 'Googlebot',
        allow: ['/'],
        disallow: '/private/',
      },
      {
        userAgent: ['Applebot', 'Bingbot'],
        disallow: ['/'],
      },
    ],
    sitemap: 'https://acme.com/sitemap.xml',
  }
}

Dynamic Generation:

The function can use async/await to fetch data:

export default async function robots(): Promise<MetadataRoute.Robots> {
  const allowedPaths = await fetchAllowedPaths()
  
  return {
    rules: {
      userAgent: '*',
      allow: allowedPaths,
      disallow: '/admin/',
    },
    sitemap: 'https://acme.com/sitemap.xml',
  }
}

The file is cached by default unless it uses dynamic APIs (like database queries, headers, cookies) or dynamic config options.

Sources:

95% confidence
A

Create a sitemap.ts (or .js) file in your app directory that exports a default function returning an array of URLs:

import type { MetadataRoute } from 'next'

export default function sitemap(): MetadataRoute.Sitemap {
  return [
    {
      url: 'https://acme.com',
      lastModified: new Date(),
      changeFrequency: 'yearly',
      priority: 1,
    },
    {
      url: 'https://acme.com/about',
      lastModified: new Date(),
      changeFrequency: 'monthly',
      priority: 0.8,
    },
  ]
}

For dynamic data (e.g., from a database):

import type { MetadataRoute } from 'next'

export default async function sitemap(): MetadataRoute.Sitemap {
  const posts = await fetch('https://api.example.com/posts').then(res => res.json())
  
  const postUrls = posts.map((post) => ({
    url: `https://acme.com/blog/${post.slug}`,
    lastModified: post.updatedAt,
    changeFrequency: 'weekly' as const,
    priority: 0.7,
  }))

  return [
    {
      url: 'https://acme.com',
      lastModified: new Date(),
      changeFrequency: 'yearly',
      priority: 1,
    },
    ...postUrls,
  ]
}

Key details:

  • File location: app/sitemap.ts (App Router)
  • Cached by default unless using dynamic APIs or config
  • For 50,000+ URLs, use generateSitemaps() to create multiple sitemap files
  • Accessible at /sitemap.xml

Sources:

95% confidence

advanced_caching

2 questions
A

Yes. Setting revalidate = 0 forces a route to be dynamically rendered on every request, even if the route contains no dynamic APIs or uncached data fetches.

When you set revalidate = 0, the route:

  • Always renders dynamically (opts out of static rendering)
  • Changes the default behavior of fetch() requests to cache: 'no-store'
  • Bypasses both the Full Route Cache and Data Cache

Example:

// app/page.tsx
export const revalidate = 0

export default function Page() {
  // This page is now dynamically rendered
  return <div>Dynamic content</div>
}

Note: Individual fetch requests can still opt into caching with force-cache or a positive revalidate value, overriding the route-level setting.

Sources:

95% confidence
A

When a Next.js route has multiple fetch requests with different revalidate times, the lowest revalidate time is used for the entire route's ISR interval.

However, individual fetch requests still respect their own revalidate frequencies in the Data Cache.

Example:

// Route with multiple fetches
async function Page() {
  // This has revalidate: 3600 (1 hour)
  const data1 = await fetch('https://api.example.com/data1', {
    next: { revalidate: 3600 }
  })
  
  // This has revalidate: 60 (1 minute)
  const data2 = await fetch('https://api.example.com/data2', {
    next: { revalidate: 60 }
  })
  
  // Route will revalidate every 60 seconds (the lowest value)
}

Special cases:

  • If two fetch requests use the same URL with different revalidate values, the lower value is used
  • If any fetch has revalidate: 0 or cache: 'no-store', the entire route becomes dynamically rendered

Sources:

95% confidence

nextjs_bugs

1 question

security

1 question
A

In Next.js middleware, implement CSP with nonces by generating a unique nonce per request, setting it in both the CSP header and a custom header for retrieval, then accessing it in Server Components.

Middleware Implementation:

import { NextRequest, NextResponse } from 'next/server'

export function middleware(request: NextRequest) {
  const nonce = Buffer.from(crypto.randomUUID()).toString('base64')
  
  const cspHeader = `
    default-src 'self';
    script-src 'self' 'nonce-${nonce}' 'strict-dynamic';
    style-src 'self' 'nonce-${nonce}';
    img-src 'self' blob: data:;
    font-src 'self';
    object-src 'none';
    base-uri 'self';
    form-action 'self';
    frame-ancestors 'none';
    upgrade-insecure-requests;
  `.replace(/\s{2,}/g, ' ').trim()

  const requestHeaders = new Headers(request.headers)
  requestHeaders.set('x-nonce', nonce)
  requestHeaders.set('Content-Security-Policy', cspHeader)

  const response = NextResponse.next({
    request: { headers: requestHeaders },
  })
  response.headers.set('Content-Security-Policy', cspHeader)

  return response
}

export const config = {
  matcher: [
    {
      source: '/((?!api|_next/static|_next/image|favicon.ico).*)',
      missing: [
        { type: 'header', key: 'next-router-prefetch' },
        { type: 'header', key: 'purpose', value: 'prefetch' },
      ],
    },
  ],
}

Reading Nonces in Server Components:

import { headers } from 'next/headers'
import Script from 'next/script'

export default async function Page() {
  const nonce = (await headers()).get('x-nonce')

  return (
    <Script
      src="https://example.com/script.js"
      strategy="afterInteractive"
      nonce={nonce}
    />
  )
}

Critical: Force Dynamic Rendering

Using nonces disables static optimization. Ensure pages render dynamically:

import { connection } from 'next/server'

export default async function Page() {
  await connection()
  // Your page content
}

Sources:

95% confidence

streaming_ssr

1 question
A

Perfect! I found authoritative information from the official Next.js documentation. Let me provide the verified answer.

Common Issues with Next.js Streaming and Suspense on Non-Vercel Platforms

1. Proxy Buffering (Nginx/Reverse Proxies)

When self-hosting with nginx or similar reverse proxies, streaming is disabled by default due to response buffering. You must explicitly configure the proxy to disable buffering.

Solution: Add the X-Accel-Buffering: no header in your Next.js configuration:

// next.config.js
module.exports = {
  async headers() {
    return [
      {
        source: '/:path*{/}?',
        headers: [
          {
            key: 'X-Accel-Buffering',
            value: 'no',
          },
        ],
      },
    ]
  },
}

2. CloudFront Response Buffering

On AWS CloudFront, Suspense fallbacks never display and the UI blocks until data returns, even though streaming works correctly on Vercel.

Solutions:

  • Use the "CachingDisabled" managed cache policy for paths serving your Next.js app
  • Set minimum TTL to 0 and send Cache-Control: no-store headers from Next.js
  • Consider using Lambda@Edge to add Transfer-Encoding: chunked headers

3. CDN/Edge Caching Behavior

CDNs and edge networks often buffer responses by default to optimize caching, which breaks streaming. Any CDN in front of your Next.js app needs explicit configuration to support streaming responses.

4. Platform-Specific Implementations

Next.js streaming features are optimized for Vercel's infrastructure. Self-hosted deployments require additional configuration at the infrastructure layer (proxy, CDN, load balancer) that Vercel handles automatically.

Sources:

95% confidence

routing_patterns

1 question
A

No. Layout components in Next.js do not receive the searchParams prop.

Reason: Layouts do not re-render on navigation, which means searchParams would become stale between navigations. This is by design to prevent displaying outdated query parameter data.

What receives searchParams:

  • Page components (page.tsx) receive searchParams as a prop

Alternatives for accessing search params in layouts:

  1. Client Component with useSearchParams hook:
'use client'
import { useSearchParams } from 'next/navigation'

export function SearchParamsComponent() {
  const searchParams = useSearchParams()
  const query = searchParams.get('query')
  // ...
}
  1. Pass data from Page to Layout via children:
    Access searchParams in your page.tsx and pass the data down as needed.

Sources:

95% confidence

cms_integration

1 question
A

Draft Mode in Next.js App Router enables previewing draft CMS content on statically generated pages without rebuilding your site.

Implementation Steps

Step 1: Create a Route Handler

Create app/api/draft/route.ts:

import { draftMode } from 'next/headers'

export async function GET(request: Request) {
  const draft = await draftMode()
  draft.enable()
  return new Response('Draft mode is enabled')
}

This sets a __prerender_bypass cookie.

Step 2: Secure with CMS Integration

Add secret token validation and redirect to the preview content:

import { draftMode } from 'next/headers'
import { redirect } from 'next/navigation'

export async function GET(request: Request) {
  const { searchParams } = new URL(request.url)
  const secret = searchParams.get('secret')
  const slug = searchParams.get('slug')

  // Validate secret token
  if (secret !== process.env.DRAFT_SECRET_TOKEN || !slug) {
    return new Response('Invalid token', { status: 401 })
  }

  // Verify the slug exists
  const post = await getPostBySlug(slug)
  if (!post) {
    return new Response('Invalid slug', { status: 401 })
  }

  const draft = await draftMode()
  draft.enable()
  
  // Redirect to the preview page
  redirect(post.slug)
}

Configure your CMS with: https://yoursite.com/api/draft?secret=<token>&slug=<path>

Step 3: Fetch Draft Content

In your page component, check draftMode().isEnabled to switch data sources:

import { draftMode } from 'next/headers'

async function getData() {
  const { isEnabled } = await draftMode()
  
  const url = isEnabled
    ? 'https://draft.example.com'
    : 'https://production.example.com'
  
  const res = await fetch(url)
  return res.json()
}

export default async function Page() {
  const { title, desc } = await getData()
  return (
    <main>
      <h1>{title}</h1>
      <p>{desc}</p>
    </main>
  )
}

Step 4: Disable Draft Mode

Create app/api/disable-draft/route.ts:

import { draftMode } from 'next/headers'
import { redirect } from 'next/navigation'

export async function GET(request: Request) {
  const draft = await draftMode()
  draft.disable()
  redirect('/')
}

Sources:

95% confidence

testing

1 question
A

Vitest Setup for Next.js 15 App Router

Install dependencies:

npm install -D vitest @vitejs/plugin-react jsdom @testing-library/react @testing-library/dom

Add vite-tsconfig-paths for TypeScript path aliases:

npm install -D vite-tsconfig-paths

Create vitest.config.mts:

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
  plugins: [react(), tsconfigPaths()],
  test: {
    environment: 'jsdom',
  },
})

Add test script to package.json:

{
  "scripts": {
    "test": "vitest"
  }
}

Vitest runs in watch mode by default.


Jest Setup for Next.js 15 App Router

Install dependencies:

npm install -D jest jest-environment-jsdom @testing-library/react @testing-library/dom @testing-library/jest-dom ts-node

Initialize Jest:

npm init jest@latest

Create/update jest.config.ts:

import type { Config } from 'jest'
import nextJest from 'next/jest'

const createJestConfig = nextJest({
  dir: './',
})

const config: Config = {
  coverageProvider: 'v8',
  testEnvironment: 'jsdom',
  setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
}

export default createJestConfig(config)

Create jest.setup.ts:

import '@testing-library/jest-dom'

Add test scripts to package.json:

{
  "scripts": {
    "test": "jest",
    "test:watch": "jest --watch"
  }
}

Key Difference

Server Components Limitation: Both Vitest and Jest currently do not support testing async Server Components. Use E2E tests for async components. Synchronous Server and Client Components can be unit tested with either framework.

Configuration: Jest uses next/jest which automatically handles Next.js transformations, while Vitest requires manual plugin configuration but is generally faster.

Sources:

95% confidence

data_fetching

1 question
A

In Next.js 15, fetch requests are not cached by default (changed from previous versions). To enable caching for individual fetch requests, use the cache: 'force-cache' option:

const data = await fetch('https://api.example.com/data', { 
  cache: 'force-cache' 
})

This makes Next.js look for a matching cached request in its Data Cache. If found, it returns the cached data. If not found or stale, it fetches from the remote server and updates the cache.

Alternative: Time-based revalidation

Instead of indefinite caching, you can cache with automatic revalidation after a specified number of seconds:

const data = await fetch('https://api.example.com/data', { 
  next: { revalidate: 3600 } // revalidate after 1 hour
})

All cache options:

  • cache: 'force-cache' - Cache indefinitely (opt-in)
  • cache: 'no-store' - Never cache (default in Next.js 15)
  • next: { revalidate: number } - Cache for specified seconds
  • next: { revalidate: false } - Cache indefinitely (equivalent to force-cache)
  • next: { revalidate: 0 } - Never cache (equivalent to no-store)

Sources:

95% confidence

api_security

1 question
A

Perfect! Now I have authoritative sources from both the official Next.js documentation and the official Next.js GitHub repository. Let me provide the comprehensive answer.

Route Handlers (App Router)

Set CORS headers directly in the Response object:

export async function GET(request: Request) {
  return new Response('Hello, Next.js!', {
    status: 200,
    headers: {
      'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
      'Access-Control-Allow-Headers': 'Content-Type, Authorization',
    },
  })
}

For handling preflight OPTIONS requests:

export async function OPTIONS(request: Request) {
  return new Response(null, {
    status: 200,
    headers: {
      'Access-Control-Allow-Origin': '*',
      'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
      'Access-Control-Allow-Headers': 'Content-Type, Authorization',
    },
  })
}

API Routes (Pages Router)

API Routes are same-origin only by default. To enable CORS, use a middleware helper pattern with the cors package:

import Cors from 'cors'
import type { NextApiRequest, NextApiResponse } from 'next'

// Initialize the cors middleware
const cors = Cors({
  methods: ['GET', 'HEAD', 'POST'],
})

// Helper to run middleware
function runMiddleware(
  req: NextApiRequest,
  res: NextApiResponse,
  fn: Function
) {
  return new Promise((resolve, reject) => {
    fn(req, res, (result: any) => {
      if (result instanceof Error) {
        return reject(result)
      }
      return resolve(result)
    })
  })
}

export default async function handler(
  req: NextApiRequest,
  res: NextApiResponse
) {
  await runMiddleware(req, res, cors)
  res.json({ message: 'Hello Everyone!' })
}

Global Configuration

For multiple routes, configure CORS headers in next.config.js:

module.exports = {
  async headers() {
    return [
      {
        source: '/api/:path*',
        headers: [
          { key: 'Access-Control-Allow-Origin', value: '*' },
          { key: 'Access-Control-Allow-Methods', value: 'GET,POST,PUT,DELETE,OPTIONS' },
          { key: 'Access-Control-Allow-Headers', value: 'Content-Type, Authorization' },
        ],
      },
    ]
  },
}

Sources:

95% confidence

runtime_deployment

1 question
A

The Edge Runtime has significant limitations compared to the Node.js runtime in Next.js:

API Restrictions

  • No native Node.js APIs - Cannot read/write to filesystem, no access to Node.js built-ins
  • No require() - Must use ES Modules syntax only
  • npm packages - Only work if they use ES Modules and don't depend on native Node.js APIs

Code Size Limits

  • Edge Runtime: 1 MB to 4 MB (varies by deployment infrastructure on Vercel)
  • Node.js Runtime: 50 MB for Serverless Functions on Vercel

Disabled JavaScript Features

These will throw runtime errors in Edge Runtime:

  • eval()
  • new Function(evalString)
  • WebAssembly.compile()
  • WebAssembly.instantiate()

Feature Limitations

  • No Incremental Static Regeneration (ISR) in Edge Runtime
  • Limited dynamic code evaluation (even with unstable_allowDynamic, code still fails at runtime)

Use Cases

  • Edge Runtime: Best for low-latency, dynamic personalized content with small, simple functions
  • Node.js Runtime: Required when you need Node.js APIs, larger code bundles, or ISR

Sources:

95% confidence

build_optimization

1 question
A

To enable Turbopack for production builds in Next.js 15.5+, use the --turbopack flag with the build command:

next build --turbopack

Configuration: Add Turbopack options in next.config.js:

module.exports = {
  turbopack: {
    rules: {
      // Configure webpack loaders
      '*.svg': {
        loaders: ['@svgr/webpack'],
        as: '*.js',
      },
    },
    resolveAlias: {
      // Map imports
      underscore: 'lodash',
      mocha: { browser: 'mocha/browser-entry.js' },
    },
    resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js'],
  },
}

Status: Turbopack production builds are in beta as of Next.js 15.5. The Next.js team recommends trying it if you've already adopted Turbopack in development. It powers production sites like vercel.com, v0.app, and nextjs.org, handling 1.2+ billion requests.

Note: On smaller projects/machines, build time improvements may be marginal due to Webpack's persistent cache advantage. Turbopack persistent caching is in development.

Sources:

95% confidence

static_generation

1 question
A

generateStaticParams and ISR are complementary features that solve different problems:

generateStaticParams: Determines which dynamic routes to pre-render at build time. It returns an array of parameter objects that specify which page variations to statically generate upfront.

export async function generateStaticParams() {
  const posts = await fetch('https://api.vercel.app/blog').then((res) => res.json())
  
  return posts.map((post) => ({
    id: String(post.id),
  }))
}

ISR (Incremental Static Regeneration): Controls when statically generated pages are revalidated and regenerated after deployment. Set with the revalidate export:

export const revalidate = 60 // Revalidate every 60 seconds

Key Differences:

  • generateStaticParams runs once at build time; ISR is an ongoing runtime mechanism
  • generateStaticParams defines which pages exist; ISR keeps them fresh
  • During ISR revalidation, generateStaticParams is not called again

Important: To use ISR for runtime path revalidation, you must either return an empty array from generateStaticParams OR use export const dynamic = 'force-static'. Returning an empty array means no paths are pre-rendered at build time, but they can be generated and cached on-demand with ISR.

Sources:

95% confidence

internationalization

1 question
A

In Next.js App Router, implement i18n by creating a dynamic [lang] route segment that wraps your application structure:

Directory Structure

app/
└── [lang]/
    ├── layout.tsx
    ├── page.tsx
    └── (other routes)/

Access Locale in Pages/Layouts

export default async function Page({ 
  params 
}: { 
  params: Promise<{ lang: string }> 
}) {
  const { lang } = await params
  return <div>Current locale: {lang}</div>
}

Use Dictionaries for Translations

// dictionaries.ts
const dictionaries = {
  en: () => import('./dictionaries/en.json').then((module) => module.default),
  nl: () => import('./dictionaries/nl.json').then((module) => module.default),
}

export const getDictionary = async (locale: string) => dictionaries[locale]()

// page.tsx
import { getDictionary } from './dictionaries'

export default async function Page({ 
  params 
}: { 
  params: Promise<{ lang: 'en' | 'nl' }> 
}) {
  const { lang } = await params
  const dict = await getDictionary(lang)
  return <button>{dict.products.cart}</button>
}

Generate Static Params for Locales

export async function generateStaticParams() {
  return [{ lang: 'en' }, { lang: 'nl' }, { lang: 'fr' }]
}

Key Point: The App Router removed built-in i18n config from next.config.js. You manually implement routing using dynamic segments and can use libraries like next-intl, next-international, or next-i18n-router.

Sources:

95% confidence

app_router_gotchas

1 question
A

Next.js handles Server/Client Component boundary mistakes through build-time detection and runtime error messages:

Build-Time Detection

server-only package: When you import the server-only package into server-side code and accidentally import it into a Client Component, Next.js throws a build-time error preventing compilation. This prevents accidental exposure of sensitive server code (like API keys) to the client bundle.

import 'server-only'

export async function getData() {
  const res = await fetch('https://external-service.com/data', {
    headers: {
      authorization: process.env.API_KEY,
    },
  })
  return res.json()
}

Runtime Error Detection

Missing "use client" directive: Using onClick and useState in a component will cause an error if the "use client" directive is not defined, because by default all components in the App Router are Server Components where these APIs are not available.

Third-party components: If you try to use a third-party component directly within a Server Component, you'll see an error because Next.js doesn't know the component is using client-only features.

Automatic Protections

Environment variable filtering: Next.js automatically replaces non-NEXT_PUBLIC_ prefixed environment variables with empty strings in client bundles, providing baseline protection against accidental exposure.

Module graph analysis: Once a file is marked with "use client", all its imports and child components are automatically considered part of the client bundle—you don't need to add the directive to every component.

Error Messages

Next.js provides "clearer error messages when a module is used in the wrong environment" to help developers identify boundary violations during development.

Sources:

95% confidence

migration

1 question
A

The _app.tsx and _document.tsx files are replaced by a single root layout file at app/layout.tsx.

Migration Pattern

Create app/layout.tsx with this structure:

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

What to Move

From _app.tsx:

  • Global styles imports
  • React Context providers (must wrap them in a Client Component with 'use client')
  • Global state management
  • Layout components

From _document.tsx:

  • <html> and <body> tag customizations (className, attributes)
  • beforeInteractive scripts
  • Custom fonts

Key Rules

  1. Keep both during migration - Don't delete _app.tsx/_document.tsx until you've fully migrated all pages from pages/* to app/*
  2. Styles don't cross routers - Styles in app/layout.tsx won't apply to pages/* routes during incremental migration
  3. Metadata API - Replace <Head> from next/head with the Metadata API export
  4. Client Components for interactivity - Providers and hooks require 'use client' directive

Example Migration

Before (_app.tsx):

export default function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />
}

After (app/layout.tsx):

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

Sources:

95% confidence

forms

1 question
A

useActionState is a React hook that manages form state and server action execution in Next.js, enabling validation error display and loading states.

Basic Usage:

'use client'
import { useActionState } from 'react'
import { createUser } from '@/app/actions'

const initialState = { message: '' }

export function Signup() {
  const [state, formAction, pending] = useActionState(createUser, initialState)

  return (
    <form action={formAction}>
      <input type="email" name="email" required />
      <p aria-live="polite">{state?.message}</p>
      <button disabled={pending}>Sign up</button>
    </form>
  )
}

Server Action Signature:

When using useActionState, your server action must accept prevState as its first parameter, followed by FormData:

export async function createUser(prevState: any, formData: FormData) {
  // Validation logic
  const email = formData.get('email')
  
  // Return new state
  return { message: 'User created successfully' }
}

Return Values:

  • state - Current state object updated by server action's return value
  • formAction - Action handler to pass to form's action prop
  • pending - Boolean indicating if server action is executing

Key Use Cases:

  • Display validation errors from state
  • Show loading indicators using pending
  • Disable submit buttons during execution
  • Progressive enhancement with server-side validation

Sources:

95% confidence

static_export

1 question
A

When using static export (output: 'export') in Next.js, the following features are not supported because they require a Node.js server or dynamic logic that cannot be computed at build time:

Server-Side Features:

  • Server-Side Rendering (getServerSideProps in Pages Router)
  • Route Handlers that use the Request object
  • Server Actions
  • Cookies
  • Rewrites, Redirects, and Headers (in next.config.js)
  • Incremental Static Regeneration (ISR)
  • Draft Mode

Dynamic Routing:

  • Dynamic Routes with dynamicParams: true
  • Dynamic routes without generateStaticParams()

Image Optimization:

  • Image Optimization with the default loader (next/image requires a custom loader like Cloudinary)

Other Features:

  • Intercepting Routes
  • API Routes (Pages Router)

Why: Static export generates pure HTML/CSS/JS files at build time for deployment on any static host. Features requiring runtime server logic, on-demand computation, or request-time data are incompatible with this model.

Error Prevention: When running next dev with unsupported features, Next.js produces errors (similar to setting dynamic = 'error') to prevent deployment issues.

Workarounds:

  • Use getStaticProps instead of getServerSideProps
  • Define custom image loaders in next.config.js
  • Use generateStaticParams() to pre-generate all dynamic route paths

Sources:

95% confidence

performance_scripts

1 question
A

The Next.js Script component provides four loading strategies via the strategy prop:

1. beforeInteractive

Injects the script into the initial HTML from the server and executes before any Next.js code or page hydration. Must be placed in the root layout (app/layout.tsx for App Router). Use for critical scripts needed across the entire site.

<Script src="/script.js" strategy="beforeInteractive" />

2. afterInteractive (default)

Loads early but after some page hydration occurs. Can be placed in any page or layout. Use for scripts that should load quickly but after first-party Next.js code.

<Script src="/script.js" strategy="afterInteractive" />

3. lazyOnload

Injects during browser idle time, after all page resources are fetched. Use for background or low-priority scripts.

<Script src="/script.js" strategy="lazyOnload" />

4. worker (experimental)

Offloads the script to a web worker to free up the main thread. Advanced use case, not guaranteed to support all third-party scripts.

<Script src="/script.js" strategy="worker" />

Sources:

95% confidence